diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/AadPropertiesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/AadPropertiesOperations.cs index 451d64bce3f3..541fb1b47309 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/AadPropertiesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/AadPropertiesOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// AadPropertiesOperations operations. /// - internal partial class AadPropertiesOperations : IServiceOperations, IAadPropertiesOperations + internal partial class AadPropertiesOperations : Microsoft.Rest.IServiceOperations, IAadPropertiesOperations { /// /// Initializes a new instance of the AadPropertiesOperations class. @@ -37,13 +24,13 @@ internal partial class AadPropertiesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal AadPropertiesOperations(RecoveryServicesBackupClient client) + internal AadPropertiesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,25 +41,25 @@ internal AadPropertiesOperations(RecoveryServicesBackupClient client) /// /// Fetches the AAD properties from target region BCM stamp. /// + /// + /// + /// /// /// Azure region to hit Api /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -81,74 +68,85 @@ internal AadPropertiesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string azureRegion, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string azureRegion, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (azureRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "azureRegion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("azureRegion", azureRegion); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties").ToString(); _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsaadPropertiesQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsaadPropertiesQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsaadPropertiesQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,50 +158,51 @@ internal AadPropertiesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -213,9 +212,10 @@ internal AadPropertiesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -226,24 +226,28 @@ internal AadPropertiesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/AadPropertiesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/AadPropertiesOperationsExtensions.cs index f8f9fc827aae..0627a521c5ac 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/AadPropertiesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/AadPropertiesOperationsExtensions.cs @@ -1,66 +1,55 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for AadPropertiesOperations. + /// Extension methods for AadPropertiesOperations /// public static partial class AadPropertiesOperationsExtensions { - /// - /// Fetches the AAD properties from target region BCM stamp. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// OData parameters to apply to the operation. - /// - public static AADPropertiesResource Get(this IAadPropertiesOperations operations, string azureRegion, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.GetAsync(azureRegion, odataQuery).GetAwaiter().GetResult(); - } + /// + /// Fetches the AAD properties from target region BCM stamp. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Azure region to hit Api + /// + public static AADPropertiesResource Get(this IAadPropertiesOperations operations, string azureRegion, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IAadPropertiesOperations)operations).GetAsync(azureRegion, odataQuery).GetAwaiter().GetResult(); + } - /// - /// Fetches the AAD properties from target region BCM stamp. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IAadPropertiesOperations operations, string azureRegion, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the AAD properties from target region BCM stamp. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Azure region to hit Api + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IAadPropertiesOperations operations, string azureRegion, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, odataQuery, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobDetailsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobDetailsOperations.cs index ce6d2eadc9b4..bee3d34c6284 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobDetailsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobDetailsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupCrrJobDetailsOperations operations. /// - internal partial class BackupCrrJobDetailsOperations : IServiceOperations, IBackupCrrJobDetailsOperations + internal partial class BackupCrrJobDetailsOperations : Microsoft.Rest.IServiceOperations, IBackupCrrJobDetailsOperations { /// /// Initializes a new instance of the BackupCrrJobDetailsOperations class. @@ -36,13 +24,13 @@ internal partial class BackupCrrJobDetailsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client) + internal BackupCrrJobDetailsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -68,13 +56,13 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -83,72 +71,82 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string azureRegion, string resourceId = default(string), string jobName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string azureRegion, string resourceId = default(string), string jobName = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (azureRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "azureRegion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + CrrJobRequest parameters = new CrrJobRequest(); - if (resourceId != null || jobName != null) + if(resourceId != null||jobName != null) { parameters.ResourceId = resourceId; parameters.JobName = jobName; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("azureRegion", azureRegion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob").ToString(); _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,56 +158,57 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -219,9 +218,10 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -232,24 +232,28 @@ internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobDetailsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobDetailsOperationsExtensions.cs index 98c68ad4ac04..41d2d882231d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobDetailsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobDetailsOperationsExtensions.cs @@ -1,71 +1,49 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupCrrJobDetailsOperations. + /// Extension methods for BackupCrrJobDetailsOperations /// public static partial class BackupCrrJobDetailsOperationsExtensions { - /// - /// Get CRR job details from target region. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Entire ARM resource id of the resource - /// - /// - /// Job Name of the job to be fetched - /// - public static JobResource Get(this IBackupCrrJobDetailsOperations operations, string azureRegion, string resourceId = default(string), string jobName = default(string)) - { - return operations.GetAsync(azureRegion, resourceId, jobName).GetAwaiter().GetResult(); - } + /// + /// Get CRR job details from target region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + public static JobResource Get(this IBackupCrrJobDetailsOperations operations, string azureRegion, string resourceId = default(string), string jobName = default(string)) + { + return ((IBackupCrrJobDetailsOperations)operations).GetAsync(azureRegion, resourceId, jobName).GetAwaiter().GetResult(); + } - /// - /// Get CRR job details from target region. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Entire ARM resource id of the resource - /// - /// - /// Job Name of the job to be fetched - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBackupCrrJobDetailsOperations operations, string azureRegion, string resourceId = default(string), string jobName = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Get CRR job details from target region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBackupCrrJobDetailsOperations operations, string azureRegion, string resourceId = default(string), string jobName = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, resourceId, jobName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, resourceId, jobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobsOperations.cs index 4fd7b051d767..4841b78accd5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupCrrJobsOperations operations. /// - internal partial class BackupCrrJobsOperations : IServiceOperations, IBackupCrrJobsOperations + internal partial class BackupCrrJobsOperations : Microsoft.Rest.IServiceOperations, IBackupCrrJobsOperations { /// /// Initializes a new instance of the BackupCrrJobsOperations class. @@ -37,13 +24,13 @@ internal partial class BackupCrrJobsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) + internal BackupCrrJobsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,12 +41,12 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) /// /// Gets the list of CRR jobs from the target region. /// + /// + /// + /// /// /// Azure region to hit Api /// - /// - /// OData parameters to apply to the operation. - /// /// /// skipToken Filter. /// @@ -75,13 +62,13 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -90,57 +77,70 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string azureRegion, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string resourceId = default(string), string jobName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string azureRegion, string resourceId = default(string), string jobName = default(string), Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (azureRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "azureRegion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + CrrJobRequest parameters = new CrrJobRequest(); - if (resourceId != null || jobName != null) + if(resourceId != null||jobName != null) { parameters.ResourceId = resourceId; parameters.JobName = jobName; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("azureRegion", azureRegion); tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs").ToString(); _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _jobQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_jobQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_jobQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -151,25 +151,24 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -181,56 +180,57 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -240,9 +240,10 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -253,25 +254,29 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the list of CRR jobs from the target region. /// @@ -284,13 +289,13 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -299,51 +304,54 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -355,50 +363,51 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -408,9 +417,10 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -421,24 +431,28 @@ internal BackupCrrJobsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobsOperationsExtensions.cs index 7c8bb28995b1..265fe11527fe 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupCrrJobsOperationsExtensions.cs @@ -1,118 +1,94 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupCrrJobsOperations. + /// Extension methods for BackupCrrJobsOperations /// public static partial class BackupCrrJobsOperationsExtensions { - /// - /// Gets the list of CRR jobs from the target region. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// Entire ARM resource id of the resource - /// - /// - /// Job Name of the job to be fetched - /// - public static IPage List(this IBackupCrrJobsOperations operations, string azureRegion, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string resourceId = default(string), string jobName = default(string)) - { - return operations.ListAsync(azureRegion, odataQuery, skipToken, resourceId, jobName).GetAwaiter().GetResult(); - } + /// + /// Gets the list of CRR jobs from the target region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Azure region to hit Api + /// + /// + /// skipToken Filter. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupCrrJobsOperations operations, string azureRegion, string resourceId = default(string), string jobName = default(string), Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupCrrJobsOperations)operations).ListAsync(azureRegion, resourceId, jobName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Gets the list of CRR jobs from the target region. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// Entire ARM resource id of the resource - /// - /// - /// Job Name of the job to be fetched - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupCrrJobsOperations operations, string azureRegion, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string resourceId = default(string), string jobName = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the list of CRR jobs from the target region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Azure region to hit Api + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupCrrJobsOperations operations, string azureRegion, string resourceId = default(string), string jobName = default(string), Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(azureRegion, resourceId, jobName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(azureRegion, odataQuery, skipToken, resourceId, jobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the list of CRR jobs from the target region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupCrrJobsOperations operations, string nextPageLink) + { + return ((IBackupCrrJobsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of CRR jobs from the target region. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupCrrJobsOperations operations, string nextPageLink) + /// + /// Gets the list of CRR jobs from the target region. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupCrrJobsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of CRR jobs from the target region. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IBackupCrrJobsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupProtectedItemsCrrOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupProtectedItemsCrrOperations.cs index 4b6e8555ea1c..c42cdb0d47bc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupProtectedItemsCrrOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupProtectedItemsCrrOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectedItemsCrrOperations operations. /// - internal partial class BackupProtectedItemsCrrOperations : IServiceOperations, IBackupProtectedItemsCrrOperations + internal partial class BackupProtectedItemsCrrOperations : Microsoft.Rest.IServiceOperations, IBackupProtectedItemsCrrOperations { /// /// Initializes a new instance of the BackupProtectedItemsCrrOperations class. @@ -37,13 +24,13 @@ internal partial class BackupProtectedItemsCrrOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) + internal BackupProtectedItemsCrrOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,15 +41,14 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) /// /// Provides a pageable list of all items that are backed up within a vault. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -73,13 +59,13 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -88,56 +74,70 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _protectedItemQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_protectedItemQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_protectedItemQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -148,25 +148,24 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -178,50 +177,51 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -231,9 +231,10 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -244,25 +245,29 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Provides a pageable list of all items that are backed up within a vault. /// @@ -275,13 +280,13 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -290,51 +295,54 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -346,50 +354,51 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -399,9 +408,10 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -412,24 +422,28 @@ internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupProtectedItemsCrrOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupProtectedItemsCrrOperationsExtensions.cs index fece298df751..ef074df9bfa3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupProtectedItemsCrrOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupProtectedItemsCrrOperationsExtensions.cs @@ -1,114 +1,100 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupProtectedItemsCrrOperations. + /// Extension methods for BackupProtectedItemsCrrOperations /// public static partial class BackupProtectedItemsCrrOperationsExtensions { - /// - /// Provides a pageable list of all items that are backed up within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static IPage List(this IBackupProtectedItemsCrrOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); - } + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupProtectedItemsCrrOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupProtectedItemsCrrOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of all items that are backed up within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupProtectedItemsCrrOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupProtectedItemsCrrOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupProtectedItemsCrrOperations operations, string nextPageLink) + { + return ((IBackupProtectedItemsCrrOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of all items that are backed up within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupProtectedItemsCrrOperations operations, string nextPageLink) + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupProtectedItemsCrrOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Provides a pageable list of all items that are backed up within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IBackupProtectedItemsCrrOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupResourceStorageConfigsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupResourceStorageConfigsOperations.cs index 9507ab506f16..c907dff1221d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupResourceStorageConfigsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupResourceStorageConfigsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; 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; /// /// BackupResourceStorageConfigsOperations operations. /// - internal partial class BackupResourceStorageConfigsOperations : IServiceOperations, IBackupResourceStorageConfigsOperations + internal partial class BackupResourceStorageConfigsOperations : Microsoft.Rest.IServiceOperations, IBackupResourceStorageConfigsOperations { /// /// Initializes a new instance of the BackupResourceStorageConfigsOperations class. @@ -36,13 +24,13 @@ internal partial class BackupResourceStorageConfigsOperations : IServiceOperatio /// /// Thrown when a required parameter is null /// - internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient client) + internal BackupResourceStorageConfigsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Headers that will be added to request. @@ -66,13 +53,13 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli /// /// 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 /// /// @@ -81,71 +68,82 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -157,50 +155,51 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -210,9 +209,10 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -223,25 +223,29 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates vault storage model type. /// @@ -249,8 +253,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault storage config request @@ -261,13 +264,13 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli /// /// 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 /// /// @@ -276,76 +279,88 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.SubscriptionId == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -357,56 +372,57 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -416,9 +432,10 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -429,25 +446,29 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates vault storage model type. /// @@ -455,8 +476,7 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault storage config request @@ -467,10 +487,10 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -479,76 +499,87 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli /// /// A response object containing the response body and response headers. /// - public async Task PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.SubscriptionId == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Patch", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Patch", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -560,56 +591,57 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -619,19 +651,24 @@ internal BackupResourceStorageConfigsOperations(RecoveryServicesBackupClient cli throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupResourceStorageConfigsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupResourceStorageConfigsOperationsExtensions.cs index 1c096728dc20..f35a0328dbe6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupResourceStorageConfigsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupResourceStorageConfigsOperationsExtensions.cs @@ -1,160 +1,130 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupResourceStorageConfigsOperations. + /// Extension methods for BackupResourceStorageConfigsOperations /// public static partial class BackupResourceStorageConfigsOperationsExtensions { - /// - /// Fetches resource storage config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - public static BackupResourceConfigResource Get(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName) - { - return operations.GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Fetches resource storage config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates vault storage model type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault storage config request - /// - public static BackupResourceConfigResource Update(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) - { - return operations.UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates vault storage model type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault storage config request - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Fetches resource storage config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static BackupResourceConfigResource Get(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName) + { + return ((IBackupResourceStorageConfigsOperations)operations).GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); + } - /// - /// Updates vault storage model type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault storage config request - /// - public static void Patch(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) + /// + /// Fetches resource storage config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { - operations.PatchAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static BackupResourceConfigResource Update(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) + { + return ((IBackupResourceStorageConfigsOperations)operations).UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Updates vault storage model type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault storage config request - /// - /// - /// The cancellation token. - /// - public static async Task PatchAsync(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) { - (await operations.PatchWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void Patch(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) + { + ((IBackupResourceStorageConfigsOperations)operations).PatchAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PatchAsync(this IBackupResourceStorageConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.PatchWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupUsageSummariesCRROperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupUsageSummariesCRROperations.cs index dc7f46792d16..72d5ce1840d2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupUsageSummariesCRROperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupUsageSummariesCRROperations.cs @@ -1,35 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// - /// BackupUsageSummariesCRROperations operations. + /// BackupUsageSummariesCrrOperations operations. /// - internal partial class BackupUsageSummariesCRROperations : IServiceOperations, IBackupUsageSummariesCRROperations + internal partial class BackupUsageSummariesCrrOperations : Microsoft.Rest.IServiceOperations, IBackupUsageSummariesCrrOperations { /// - /// Initializes a new instance of the BackupUsageSummariesCRROperations class. + /// Initializes a new instance of the BackupUsageSummariesCrrOperations class. /// /// /// Reference to the service client. @@ -37,13 +24,13 @@ internal partial class BackupUsageSummariesCRROperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupUsageSummariesCRROperations(RecoveryServicesBackupClient client) + internal BackupUsageSummariesCrrOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,15 +41,14 @@ internal BackupUsageSummariesCRROperations(RecoveryServicesBackupClient client) /// /// Fetches the backup management usage summaries of the vault. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -73,13 +59,13 @@ internal BackupUsageSummariesCRROperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -88,56 +74,70 @@ internal BackupUsageSummariesCRROperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsBackupSummariesQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsBackupSummariesQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsBackupSummariesQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -148,25 +148,24 @@ internal BackupUsageSummariesCRROperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -178,50 +177,51 @@ internal BackupUsageSummariesCRROperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -231,9 +231,10 @@ internal BackupUsageSummariesCRROperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -244,24 +245,28 @@ internal BackupUsageSummariesCRROperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupUsageSummariesCRROperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupUsageSummariesCRROperationsExtensions.cs index e4ccb7b7987a..86bf234739ea 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupUsageSummariesCRROperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/BackupUsageSummariesCRROperationsExtensions.cs @@ -1,82 +1,67 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupUsageSummariesCRROperations. + /// Extension methods for BackupUsageSummariesCrrOperations /// - public static partial class BackupUsageSummariesCRROperationsExtensions + public static partial class BackupUsageSummariesCrrOperationsExtensions { - /// - /// Fetches the backup management usage summaries of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static IEnumerable List(this IBackupUsageSummariesCRROperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); - } + /// + /// Fetches the backup management usage summaries of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + public static System.Collections.Generic.IEnumerable List(this IBackupUsageSummariesCrrOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupUsageSummariesCrrOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Fetches the backup management usage summaries of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupUsageSummariesCRROperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the backup management usage summaries of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupUsageSummariesCrrOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrossRegionRestoreOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrossRegionRestoreOperations.cs index ae47f7ec8b68..1cb5478cdb3d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrossRegionRestoreOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrossRegionRestoreOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// CrossRegionRestoreOperations operations. /// - internal partial class CrossRegionRestoreOperations : IServiceOperations, ICrossRegionRestoreOperations + internal partial class CrossRegionRestoreOperations : Microsoft.Rest.IServiceOperations, ICrossRegionRestoreOperations { /// /// Initializes a new instance of the CrossRegionRestoreOperations class. @@ -36,13 +24,13 @@ internal partial class CrossRegionRestoreOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client) + internal CrossRegionRestoreOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,8 +39,7 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Restores the specified backed up data in a different region as compared to - /// where the data is backed up. + /// Restores the specified backed up data in a different region as compared to where the data is backed up. /// /// /// Azure region to hit Api @@ -64,21 +51,20 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client) /// Request object for triggering restore /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task TriggerWithHttpMessagesAsync(string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginTriggerWithHttpMessagesAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginTriggerWithHttpMessagesAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Restores the specified backed up data in a different region as compared to - /// where the data is backed up. + /// Restores the specified backed up data in a different region as compared to where the data is backed up. /// /// /// Azure region to hit Api @@ -95,10 +81,10 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -107,72 +93,82 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginTriggerWithHttpMessagesAsync(string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginTriggerWithHttpMessagesAsync(string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (azureRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "azureRegion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + CrossRegionRestoreRequest parameters = new CrossRegionRestoreRequest(); - if (crossRegionRestoreAccessDetails != null || restoreRequest != null) + if(crossRegionRestoreAccessDetails != null||restoreRequest != null) { parameters.CrossRegionRestoreAccessDetails = crossRegionRestoreAccessDetails; parameters.RestoreRequest = restoreRequest; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("azureRegion", azureRegion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginTrigger", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTrigger", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore").ToString(); _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -184,56 +180,57 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -243,19 +240,24 @@ internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrossRegionRestoreOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrossRegionRestoreOperationsExtensions.cs index 7a0c80369f83..337007abc60e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrossRegionRestoreOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrossRegionRestoreOperationsExtensions.cs @@ -1,115 +1,76 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for CrossRegionRestoreOperations. + /// Extension methods for CrossRegionRestoreOperations /// public static partial class CrossRegionRestoreOperationsExtensions { - /// - /// Restores the specified backed up data in a different region as compared to - /// where the data is backed up. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Access details for cross region restore - /// - /// - /// Request object for triggering restore - /// - public static void Trigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest)) - { - operations.TriggerAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest).GetAwaiter().GetResult(); - } - - /// - /// Restores the specified backed up data in a different region as compared to - /// where the data is backed up. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Access details for cross region restore - /// - /// - /// Request object for triggering restore - /// - /// - /// The cancellation token. - /// - public static async Task TriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.TriggerWithHttpMessagesAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores the specified backed up data in a different region as compared to - /// where the data is backed up. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Access details for cross region restore - /// - /// - /// Request object for triggering restore - /// - public static void BeginTrigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest)) - { - operations.BeginTriggerAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest).GetAwaiter().GetResult(); - } + /// + /// Restores the specified backed up data in a different region as compared to where the data is backed up. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + public static void Trigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest)) + { + ((ICrossRegionRestoreOperations)operations).TriggerAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest).GetAwaiter().GetResult(); + } - /// - /// Restores the specified backed up data in a different region as compared to - /// where the data is backed up. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Access details for cross region restore - /// - /// - /// Request object for triggering restore - /// - /// - /// The cancellation token. - /// - public static async Task BeginTriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginTriggerWithHttpMessagesAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Restores the specified backed up data in a different region as compared to where the data is backed up. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.TriggerWithHttpMessagesAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Restores the specified backed up data in a different region as compared to where the data is backed up. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + public static void BeginTrigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest)) + { + ((ICrossRegionRestoreOperations)operations).BeginTriggerAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest).GetAwaiter().GetResult(); + } + /// + /// Restores the specified backed up data in a different region as compared to where the data is backed up. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginTriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginTriggerWithHttpMessagesAsync(azureRegion, crossRegionRestoreAccessDetails, restoreRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationResultsOperations.cs index 7ccd43e482b7..932fbab9e4b4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// CrrOperationResultsOperations operations. /// - internal partial class CrrOperationResultsOperations : IServiceOperations, ICrrOperationResultsOperations + internal partial class CrrOperationResultsOperations : Microsoft.Rest.IServiceOperations, ICrrOperationResultsOperations { /// /// Initializes a new instance of the CrrOperationResultsOperations class. @@ -36,13 +24,13 @@ internal partial class CrrOperationResultsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal CrrOperationResultsOperations(RecoveryServicesBackupClient client) + internal CrrOperationResultsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,6 +42,7 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client) /// Azure region to hit Api /// /// + /// /// /// /// Headers that will be added to request. @@ -61,10 +50,10 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -73,71 +62,82 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task GetWithHttpMessagesAsync(string azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task GetWithHttpMessagesAsync(string azureRegion, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (azureRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "azureRegion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("azureRegion", azureRegion); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}").ToString(); _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -149,50 +149,51 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -202,19 +203,24 @@ internal CrrOperationResultsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationResultsOperationsExtensions.cs index 21884624d6b3..085debc50138 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationResultsOperationsExtensions.cs @@ -1,54 +1,52 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for CrrOperationResultsOperations. + /// Extension methods for CrrOperationResultsOperations /// public static partial class CrrOperationResultsOperationsExtensions { - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// - public static void Get(this ICrrOperationResultsOperations operations, string azureRegion, string operationId) - { - operations.GetAsync(azureRegion, operationId).GetAwaiter().GetResult(); - } - - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ICrrOperationResultsOperations operations, string azureRegion, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.GetWithHttpMessagesAsync(azureRegion, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// + /// + public static void Get(this ICrrOperationResultsOperations operations, string azureRegion, string operationId) + { + ((ICrrOperationResultsOperations)operations).GetAsync(azureRegion, operationId).GetAwaiter().GetResult(); + } + /// + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this ICrrOperationResultsOperations operations, string azureRegion, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.GetWithHttpMessagesAsync(azureRegion, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationStatusOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationStatusOperations.cs index be298b9e46d1..507dc3c0e7f0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationStatusOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationStatusOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// CrrOperationStatusOperations operations. /// - internal partial class CrrOperationStatusOperations : IServiceOperations, ICrrOperationStatusOperations + internal partial class CrrOperationStatusOperations : Microsoft.Rest.IServiceOperations, ICrrOperationStatusOperations { /// /// Initializes a new instance of the CrrOperationStatusOperations class. @@ -36,13 +24,13 @@ internal partial class CrrOperationStatusOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal CrrOperationStatusOperations(RecoveryServicesBackupClient client) + internal CrrOperationStatusOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,6 +42,7 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client) /// Azure region to hit Api /// /// + /// /// /// /// Headers that will be added to request. @@ -61,13 +50,13 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -76,71 +65,82 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string azureRegion, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (azureRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "azureRegion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("azureRegion", azureRegion); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}").ToString(); _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -152,50 +152,51 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -205,9 +206,10 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -218,24 +220,28 @@ internal CrrOperationStatusOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationStatusOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationStatusOperationsExtensions.cs index 8af572f9f894..e7ae3913b3ed 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationStatusOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/CrrOperationStatusOperationsExtensions.cs @@ -1,57 +1,55 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for CrrOperationStatusOperations. + /// Extension methods for CrrOperationStatusOperations /// public static partial class CrrOperationStatusOperationsExtensions { - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// - public static OperationStatus Get(this ICrrOperationStatusOperations operations, string azureRegion, string operationId) - { - return operations.GetAsync(azureRegion, operationId).GetAwaiter().GetResult(); - } + /// + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// + /// + public static OperationStatus Get(this ICrrOperationStatusOperations operations, string azureRegion, string operationId) + { + return ((ICrrOperationStatusOperations)operations).GetAsync(azureRegion, operationId).GetAwaiter().GetResult(); + } - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ICrrOperationStatusOperations operations, string azureRegion, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this ICrrOperationStatusOperations operations, string azureRegion, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IAadPropertiesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IAadPropertiesOperations.cs index 301b45861417..04d992d99ade 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IAadPropertiesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IAadPropertiesOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// AadPropertiesOperations operations. @@ -27,27 +16,28 @@ public partial interface IAadPropertiesOperations /// /// Fetches the AAD properties from target region BCM stamp. /// + /// + /// Fetches the AAD properties from target region BCM stamp. + /// + /// + /// + /// /// /// Azure region to hit Api /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string azureRegion, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string azureRegion, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupCrrJobDetailsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupCrrJobDetailsOperations.cs index e890b3b4fe4f..dd22701786fc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupCrrJobDetailsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupCrrJobDetailsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupCrrJobDetailsOperations operations. @@ -26,6 +16,9 @@ public partial interface IBackupCrrJobDetailsOperations /// /// Get CRR job details from target region. /// + /// + /// Get CRR job details from target region. + /// /// /// Azure region to hit Api /// @@ -41,15 +34,13 @@ public partial interface IBackupCrrJobDetailsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string azureRegion, string resourceId = default(string), string jobName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string azureRegion, string resourceId = default(string), string jobName = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupCrrJobsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupCrrJobsOperations.cs index 41332b5985a1..4f5f36efd089 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupCrrJobsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupCrrJobsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupCrrJobsOperations operations. @@ -27,12 +16,15 @@ public partial interface IBackupCrrJobsOperations /// /// Gets the list of CRR jobs from the target region. /// + /// + /// Gets the list of CRR jobs from the target region. + /// + /// + /// + /// /// /// Azure region to hit Api /// - /// - /// OData parameters to apply to the operation. - /// /// /// skipToken Filter. /// @@ -48,19 +40,20 @@ public partial interface IBackupCrrJobsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string azureRegion, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string resourceId = default(string), string jobName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string azureRegion, string resourceId = default(string), string jobName = default(string), Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the list of CRR jobs from the target region. /// + /// + /// Gets the list of CRR jobs from the target region. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -70,15 +63,13 @@ public partial interface IBackupCrrJobsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupProtectedItemsCrrOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupProtectedItemsCrrOperations.cs index edd6c06d9077..e3c60dabe719 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupProtectedItemsCrrOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupProtectedItemsCrrOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectedItemsCrrOperations operations. @@ -25,18 +14,19 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore public partial interface IBackupProtectedItemsCrrOperations { /// - /// Provides a pageable list of all items that are backed up within a - /// vault. + /// Provides a pageable list of all items that are backed up within a vault. /// + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -47,20 +37,20 @@ public partial interface IBackupProtectedItemsCrrOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Provides a pageable list of all items that are backed up within a - /// vault. + /// Provides a pageable list of all items that are backed up within a vault. /// + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -70,15 +60,13 @@ public partial interface IBackupProtectedItemsCrrOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupResourceStorageConfigsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupResourceStorageConfigsOperations.cs index 4fa13353bc26..2c1cd46ac8b5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupResourceStorageConfigsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupResourceStorageConfigsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupResourceStorageConfigsOperations operations. @@ -26,12 +16,14 @@ public partial interface IBackupResourceStorageConfigsOperations /// /// Fetches resource storage config. /// + /// + /// Fetches resource storage config. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The headers that will be added to request. @@ -39,25 +31,25 @@ public partial interface IBackupResourceStorageConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates vault storage model type. /// + /// + /// Updates vault storage model type. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault storage config request @@ -68,25 +60,25 @@ public partial interface IBackupResourceStorageConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates vault storage model type. /// + /// + /// Updates vault storage model type. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault storage config request @@ -97,12 +89,10 @@ public partial interface IBackupResourceStorageConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupUsageSummariesCRROperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupUsageSummariesCRROperations.cs index 8f8382c2add7..9ed34d65df17 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupUsageSummariesCRROperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IBackupUsageSummariesCRROperations.cs @@ -1,41 +1,32 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// BackupUsageSummariesCRROperations operations. + /// BackupUsageSummariesCrrOperations operations. /// - public partial interface IBackupUsageSummariesCRROperations + public partial interface IBackupUsageSummariesCrrOperations { /// /// Fetches the backup management usage summaries of the vault. /// + /// + /// Fetches the backup management usage summaries of the vault. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -46,15 +37,13 @@ public partial interface IBackupUsageSummariesCRROperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrossRegionRestoreOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrossRegionRestoreOperations.cs index e1652bd6043e..7d83735312b0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrossRegionRestoreOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrossRegionRestoreOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// CrossRegionRestoreOperations operations. @@ -24,9 +14,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore public partial interface ICrossRegionRestoreOperations { /// - /// Restores the specified backed up data in a different region as - /// compared to where the data is backed up. + /// Restores the specified backed up data in a different region as compared to where the data is backed up. /// + /// + /// Restores the specified backed up data in a different region as compared to where the data is backed up. + /// /// /// Azure region to hit Api /// @@ -42,17 +34,17 @@ public partial interface ICrossRegionRestoreOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task TriggerWithHttpMessagesAsync(string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Restores the specified backed up data in a different region as - /// compared to where the data is backed up. + /// Restores the specified backed up data in a different region as compared to where the data is backed up. /// + /// + /// Restores the specified backed up data in a different region as compared to where the data is backed up. + /// /// /// Azure region to hit Api /// @@ -68,12 +60,10 @@ public partial interface ICrossRegionRestoreOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginTriggerWithHttpMessagesAsync(string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginTriggerWithHttpMessagesAsync(string azureRegion, CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrrOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrrOperationResultsOperations.cs index e80d00432723..58d84c1ddbb9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrrOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrrOperationResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// CrrOperationResultsOperations operations. @@ -27,6 +17,7 @@ public partial interface ICrrOperationResultsOperations /// Azure region to hit Api /// /// + /// /// /// /// The headers that will be added to request. @@ -34,12 +25,10 @@ public partial interface ICrrOperationResultsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task GetWithHttpMessagesAsync(string azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task GetWithHttpMessagesAsync(string azureRegion, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrrOperationStatusOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrrOperationStatusOperations.cs index 012525ff277e..18f66494f36a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrrOperationStatusOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/ICrrOperationStatusOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// CrrOperationStatusOperations operations. @@ -27,6 +17,7 @@ public partial interface ICrrOperationStatusOperations /// Azure region to hit Api /// /// + /// /// /// /// The headers that will be added to request. @@ -34,15 +25,13 @@ public partial interface ICrrOperationStatusOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string azureRegion, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryPointsCrrOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryPointsCrrOperations.cs index f9605ca33a61..5466a0502a26 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryPointsCrrOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryPointsCrrOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// RecoveryPointsCrrOperations operations. @@ -27,12 +16,17 @@ public partial interface IRecoveryPointsCrrOperations /// /// Lists the backup copies for the backed up item. /// + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -43,35 +37,31 @@ public partial interface IRecoveryPointsCrrOperations /// /// Backed up item whose backup copies are to be fetched. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Provides the information of the backed up data identified using - /// RecoveryPointID. + /// Provides the information of the backed up data identified using RecoveryPointID. /// + /// + /// Provides the information of the backed up data identified using RecoveryPointID. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with backed up item. @@ -91,19 +81,20 @@ public partial interface IRecoveryPointsCrrOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists the backup copies for the backed up item. /// + /// + /// Lists the backup copies for the backed up item. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -113,15 +104,13 @@ public partial interface IRecoveryPointsCrrOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryPointsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryPointsOperations.cs index 444236e9ea45..c0200a68a173 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryPointsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryPointsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// RecoveryPointsOperations operations. @@ -24,15 +14,16 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore public partial interface IRecoveryPointsOperations { /// - /// Returns the Access token for communication between BMS and - /// Protection service + /// Returns the Access token for communication between BMS and Protection service /// + /// + /// Returns the Access token for communication between BMS and Protection service + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. @@ -55,15 +46,13 @@ public partial interface IRecoveryPointsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAccessTokenWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, AADPropertiesResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAccessTokenWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, AADPropertiesResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryServicesBackupClient.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryServicesBackupClient.cs index 99f67c06ab32..6cd8baa30ce2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryServicesBackupClient.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/IRecoveryServicesBackupClient.cs @@ -1,23 +1,18 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; /// + /// /// - public partial interface IRecoveryServicesBackupClient : System.IDisposable + public partial interface IRecoveryServicesBackupClient : System.IDisposable { /// /// The base URI of the service. @@ -27,101 +22,106 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// - /// The subscription Id. + /// The API version to use for this operation. /// - string SubscriptionId { get; set; } + string ApiVersion { get;} + /// - /// Client Api Version. + /// The subscription Id. /// - string ApiVersion { get; } + string SubscriptionId { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// - /// 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 + /// 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; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the IBackupUsageSummariesCRROperations. + /// Gets the IBackupUsageSummariesCrrOperations /// - IBackupUsageSummariesCRROperations BackupUsageSummariesCRR { get; } + IBackupUsageSummariesCrrOperations BackupUsageSummariesCrr { get; } /// - /// Gets the IAadPropertiesOperations. + /// Gets the IAadPropertiesOperations /// IAadPropertiesOperations AadProperties { get; } /// - /// Gets the ICrossRegionRestoreOperations. + /// Gets the ICrossRegionRestoreOperations /// ICrossRegionRestoreOperations CrossRegionRestore { get; } /// - /// Gets the IBackupCrrJobDetailsOperations. + /// Gets the IBackupCrrJobDetailsOperations /// IBackupCrrJobDetailsOperations BackupCrrJobDetails { get; } /// - /// Gets the IBackupCrrJobsOperations. + /// Gets the IBackupCrrJobsOperations /// IBackupCrrJobsOperations BackupCrrJobs { get; } /// - /// Gets the ICrrOperationResultsOperations. + /// Gets the ICrrOperationResultsOperations /// ICrrOperationResultsOperations CrrOperationResults { get; } /// - /// Gets the ICrrOperationStatusOperations. + /// Gets the ICrrOperationStatusOperations /// ICrrOperationStatusOperations CrrOperationStatus { get; } /// - /// Gets the IRecoveryPointsOperations. + /// Gets the IRecoveryPointsOperations /// IRecoveryPointsOperations RecoveryPoints { get; } /// - /// Gets the IBackupResourceStorageConfigsOperations. + /// Gets the IBackupResourceStorageConfigsOperations /// IBackupResourceStorageConfigsOperations BackupResourceStorageConfigs { get; } /// - /// Gets the IRecoveryPointsCrrOperations. + /// Gets the IRecoveryPointsCrrOperations /// IRecoveryPointsCrrOperations RecoveryPointsCrr { get; } /// - /// Gets the IBackupProtectedItemsCrrOperations. + /// Gets the IBackupProtectedItemsCrrOperations /// IBackupProtectedItemsCrrOperations BackupProtectedItemsCrr { get; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AADProperties.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AADProperties.cs index 6f43ef129f68..32bbff7ac554 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AADProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AADProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; public partial class AADProperties @@ -26,13 +20,29 @@ public AADProperties() /// /// Initializes a new instance of the AADProperties class. /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// public AADProperties(string servicePrincipalClientId = default(string), string tenantId = default(string), string authority = default(string), string audience = default(string), string servicePrincipalObjectId = default(string)) + { - ServicePrincipalClientId = servicePrincipalClientId; - TenantId = tenantId; - Authority = authority; - Audience = audience; - ServicePrincipalObjectId = servicePrincipalObjectId; + this.ServicePrincipalClientId = servicePrincipalClientId; + this.TenantId = tenantId; + this.Authority = authority; + this.Audience = audience; + this.ServicePrincipalObjectId = servicePrincipalObjectId; CustomInit(); } @@ -41,30 +51,35 @@ public AADProperties() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "servicePrincipalClientId")] - public string ServicePrincipalClientId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "servicePrincipalClientId")] + public string ServicePrincipalClientId {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "authority")] - public string Authority { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "authority")] + public string Authority {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "audience")] - public string Audience { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "audience")] + public string Audience {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "servicePrincipalObjectId")] - public string ServicePrincipalObjectId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "servicePrincipalObjectId")] + public string ServicePrincipalObjectId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AADPropertiesResource.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AADPropertiesResource.cs index 5b552c8166ab..37fdb9bf0ca7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AADPropertiesResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AADPropertiesResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class AADPropertiesResource : Resource @@ -28,20 +20,33 @@ public AADPropertiesResource() /// /// Initializes a new instance of the AADPropertiesResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// AADPropertiesResource properties - public AADPropertiesResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), AADProperties properties = default(AADProperties)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// AADPropertiesResource properties + /// + public AADPropertiesResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), AADProperties properties = default(AADProperties)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -50,11 +55,11 @@ public AADPropertiesResource() /// partial void CustomInit(); + /// /// Gets or sets aADPropertiesResource properties /// - [JsonProperty(PropertyName = "properties")] - public AADProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public AADProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileShareRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileShareRecoveryPoint.cs index fac4478decc9..e21044fc9de7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileShareRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileShareRecoveryPoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureFileShareRecoveryPoint : RecoveryPoint { /// - /// Initializes a new instance of the AzureFileShareRecoveryPoint - /// class. + /// Initializes a new instance of the AzureFileShareRecoveryPoint class. /// public AzureFileShareRecoveryPoint() { @@ -29,23 +22,28 @@ public AzureFileShareRecoveryPoint() } /// - /// Initializes a new instance of the AzureFileShareRecoveryPoint - /// class. + /// Initializes a new instance of the AzureFileShareRecoveryPoint class. /// - /// Type of the backup copy. Specifies - /// whether it is a crash consistent backup or app consistent. - /// Time at which this backup copy was - /// created. - /// Contains Url to the snapshot of - /// fileshare, if applicable - /// Contains recovery point - /// size - public AzureFileShareRecoveryPoint(string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string fileShareSnapshotUri = default(string), int? recoveryPointSizeInGB = default(int?)) + + /// Type of the backup copy. Specifies whether it is a crash consistent backup + /// or app consistent. + /// + + /// Time at which this backup copy was created. + /// + + /// Contains Url to the snapshot of fileshare, if applicable + /// + + /// Contains recovery point size + /// + public AzureFileShareRecoveryPoint(string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string fileShareSnapshotUri = default(string), int? recoveryPointSizeInGb = default(int?)) + { - RecoveryPointType = recoveryPointType; - RecoveryPointTime = recoveryPointTime; - FileShareSnapshotUri = fileShareSnapshotUri; - RecoveryPointSizeInGB = recoveryPointSizeInGB; + this.RecoveryPointType = recoveryPointType; + this.RecoveryPointTime = recoveryPointTime; + this.FileShareSnapshotUri = fileShareSnapshotUri; + this.RecoveryPointSizeInGb = recoveryPointSizeInGb; CustomInit(); } @@ -54,30 +52,30 @@ public AzureFileShareRecoveryPoint() /// partial void CustomInit(); + /// - /// Gets type of the backup copy. Specifies whether it is a crash - /// consistent backup or app consistent. + /// Gets type of the backup copy. Specifies whether it is a crash consistent + /// backup or app consistent. /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; private set; } /// /// Gets time at which this backup copy was created. /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public System.DateTime? RecoveryPointTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime {get; private set; } /// /// Gets contains Url to the snapshot of fileshare, if applicable /// - [JsonProperty(PropertyName = "fileShareSnapshotUri")] - public string FileShareSnapshotUri { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fileShareSnapshotUri")] + public string FileShareSnapshotUri {get; private set; } /// /// Gets contains recovery point size /// - [JsonProperty(PropertyName = "recoveryPointSizeInGB")] - public int? RecoveryPointSizeInGB { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointSizeInGB")] + public int? RecoveryPointSizeInGb {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileShareRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileShareRestoreRequest.cs index d63f4f072a52..16278c7a02e2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileShareRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileShareRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureFileShareRestoreRequest : RestoreRequest { /// - /// Initializes a new instance of the AzureFileShareRestoreRequest - /// class. + /// Initializes a new instance of the AzureFileShareRestoreRequest class. /// public AzureFileShareRestoreRequest() { @@ -31,31 +22,38 @@ public AzureFileShareRestoreRequest() } /// - /// Initializes a new instance of the AzureFileShareRestoreRequest - /// class. + /// Initializes a new instance of the AzureFileShareRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Source storage account ARM - /// Id + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Source storage account ARM Id + /// + /// Options to resolve copy conflicts. - /// Possible values include: 'Invalid', 'CreateCopy', 'Skip', - /// 'Overwrite', 'FailOnConflict' - /// Restore Type (FullShareRestore or - /// ItemLevelRestore). Possible values include: 'Invalid', - /// 'FullShareRestore', 'ItemLevelRestore' - /// List of Source Files/Folders(which - /// need to recover) and TargetFolderPath details - /// Target File Share Details - public AzureFileShareRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), string copyOptions = default(string), string restoreRequestType = default(string), IList restoreFileSpecs = default(IList), TargetAFSRestoreInfo targetDetails = default(TargetAFSRestoreInfo)) + /// Possible values include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', + /// 'FailOnConflict' + + /// Restore Type (FullShareRestore or ItemLevelRestore) + /// Possible values include: 'Invalid', 'FullShareRestore', 'ItemLevelRestore' + + /// List of Source Files/Folders(which need to recover) and TargetFolderPath + /// details + /// + + /// Target File Share Details + /// + public AzureFileShareRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), string copyOptions = default(string), string restoreRequestType = default(string), System.Collections.Generic.IList restoreFileSpecs = default(System.Collections.Generic.IList), TargetAFSRestoreInfo targetDetails = default(TargetAFSRestoreInfo)) + { - RecoveryType = recoveryType; - SourceResourceId = sourceResourceId; - CopyOptions = copyOptions; - RestoreRequestType = restoreRequestType; - RestoreFileSpecs = restoreFileSpecs; - TargetDetails = targetDetails; + this.RecoveryType = recoveryType; + this.SourceResourceId = sourceResourceId; + this.CopyOptions = copyOptions; + this.RestoreRequestType = restoreRequestType; + this.RestoreFileSpecs = restoreFileSpecs; + this.TargetDetails = targetDetails; CustomInit(); } @@ -64,48 +62,42 @@ public AzureFileShareRestoreRequest() /// partial void CustomInit(); + /// - /// Gets or sets type of this recovery. Possible values include: - /// 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', - /// 'Offline' + /// Gets or sets type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', 'Offline' /// - [JsonProperty(PropertyName = "recoveryType")] - public string RecoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryType")] + public string RecoveryType {get; set; } /// /// Gets or sets source storage account ARM Id /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// - /// Gets or sets options to resolve copy conflicts. Possible values - /// include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', - /// 'FailOnConflict' + /// Gets or sets options to resolve copy conflicts. Possible values include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', 'FailOnConflict' /// - [JsonProperty(PropertyName = "copyOptions")] - public string CopyOptions { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "copyOptions")] + public string CopyOptions {get; set; } /// - /// Gets or sets restore Type (FullShareRestore or ItemLevelRestore). - /// Possible values include: 'Invalid', 'FullShareRestore', - /// 'ItemLevelRestore' + /// Gets or sets restore Type (FullShareRestore or ItemLevelRestore) Possible values include: 'Invalid', 'FullShareRestore', 'ItemLevelRestore' /// - [JsonProperty(PropertyName = "restoreRequestType")] - public string RestoreRequestType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreRequestType")] + public string RestoreRequestType {get; set; } /// - /// Gets or sets list of Source Files/Folders(which need to recover) - /// and TargetFolderPath details + /// Gets or sets list of Source Files/Folders(which need to recover) and + /// TargetFolderPath details /// - [JsonProperty(PropertyName = "restoreFileSpecs")] - public IList RestoreFileSpecs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreFileSpecs")] + public System.Collections.Generic.IList RestoreFileSpecs {get; set; } /// /// Gets or sets target File Share Details /// - [JsonProperty(PropertyName = "targetDetails")] - public TargetAFSRestoreInfo TargetDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDetails")] + public TargetAFSRestoreInfo TargetDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileshareProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileshareProtectedItem.cs index 49a802ee6c66..40fefab540ee 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileshareProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileshareProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureFileshareProtectedItem : ProtectedItem { /// - /// Initializes a new instance of the AzureFileshareProtectedItem - /// class. + /// Initializes a new instance of the AzureFileshareProtectedItem class. /// public AzureFileshareProtectedItem() { @@ -31,71 +22,96 @@ public AzureFileshareProtectedItem() } /// - /// Initializes a new instance of the AzureFileshareProtectedItem - /// class. + /// Initializes a new instance of the AzureFileshareProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the fileshare - /// represented by this backup item. - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the fileshare represented by this backup item. + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - /// backups running status for this backup - /// item. Possible values include: 'Passed', 'ActionRequired', - /// 'ActionSuggested', 'Invalid' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. - /// Timestamp of the last backup operation - /// on this backup item. - /// Health details of different KPIs - /// Additional information with this backup - /// item. - public AzureFileshareProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), IDictionary kpisHealths = default(IDictionary), AzureFileshareProtectedItemExtendedInfo extendedInfo = default(AzureFileshareProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) + + /// backups running status for this backup item. + /// Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + /// 'Invalid' + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Health details of different KPIs + /// + + /// Additional information with this backup item. + /// + public AzureFileshareProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary), AzureFileshareProtectedItemExtendedInfo extendedInfo = default(AzureFileshareProtectedItemExtendedInfo)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { - FriendlyName = friendlyName; - ProtectionStatus = protectionStatus; - ProtectionState = protectionState; - HealthStatus = healthStatus; - LastBackupStatus = lastBackupStatus; - LastBackupTime = lastBackupTime; - KpisHealths = kpisHealths; - ExtendedInfo = extendedInfo; + this.FriendlyName = friendlyName; + this.ProtectionStatus = protectionStatus; + this.ProtectionState = protectionState; + this.HealthStatus = healthStatus; + this.LastBackupStatus = lastBackupStatus; + this.LastBackupTime = lastBackupTime; + this.KpisHealths = kpisHealths; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -104,60 +120,55 @@ public AzureFileshareProtectedItem() /// partial void CustomInit(); + /// - /// Gets or sets friendly name of the fileshare represented by this - /// backup item. + /// Gets or sets friendly name of the fileshare represented by this backup + /// item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets backup status of this backup item. /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; set; } /// - /// Gets or sets backup state of this backup item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused' + /// Gets or sets backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// - /// Gets or sets backups running status for this backup item. Possible - /// values include: 'Passed', 'ActionRequired', 'ActionSuggested', - /// 'Invalid' + /// Gets or sets backups running status for this backup item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' /// - [JsonProperty(PropertyName = "healthStatus")] - public string HealthStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthStatus")] + public string HealthStatus {get; set; } /// - /// Gets or sets last backup operation status. Possible values: - /// Healthy, Unhealthy. + /// Gets or sets last backup operation status. Possible values: Healthy, + /// Unhealthy. /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// - /// Gets or sets timestamp of the last backup operation on this backup - /// item. + /// Gets or sets timestamp of the last backup operation on this backup item. /// - [JsonProperty(PropertyName = "lastBackupTime")] - public System.DateTime? LastBackupTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupTime")] + public System.DateTime? LastBackupTime {get; set; } /// /// Gets or sets health details of different KPIs /// - [JsonProperty(PropertyName = "kpisHealths")] - public IDictionary KpisHealths { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kpisHealths")] + public System.Collections.Generic.IDictionary KpisHealths {get; set; } /// /// Gets or sets additional information with this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureFileshareProtectedItemExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureFileshareProtectedItemExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileshareProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileshareProtectedItemExtendedInfo.cs index ff1d15eea55c..1d778f03eff5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileshareProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureFileshareProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureFileshareProtectedItemExtendedInfo { /// - /// Initializes a new instance of the - /// AzureFileshareProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureFileshareProtectedItemExtendedInfo class. /// public AzureFileshareProtectedItemExtendedInfo() { @@ -28,27 +21,33 @@ public AzureFileshareProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the - /// AzureFileshareProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureFileshareProtectedItemExtendedInfo class. /// - /// The oldest backup copy available - /// for this item in the service. - /// Number of available backup copies - /// associated with this backup item. - /// Indicates consistency of policy object - /// and policy applied to this backup item. - /// Indicates the state of this resource. - /// Possible values are from enum ResourceState {Invalid, Active, - /// SoftDeleted, Deleted} - /// The resource state sync time - /// for this backup item. + + /// The oldest backup copy available for this item in the service. + /// + + /// Number of available backup copies associated with this backup item. + /// + + /// Indicates consistency of policy object and policy applied to this backup + /// item. + /// + + /// Indicates the state of this resource. Possible values are from enum + /// ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// + + /// The resource state sync time for this backup item. + /// public AzureFileshareProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), string policyState = default(string), string resourceState = default(string), System.DateTime? resourceStateSyncTime = default(System.DateTime?)) + { - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; - PolicyState = policyState; - ResourceState = resourceState; - ResourceStateSyncTime = resourceStateSyncTime; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; + this.PolicyState = policyState; + this.ResourceState = resourceState; + this.ResourceStateSyncTime = resourceStateSyncTime; CustomInit(); } @@ -57,39 +56,38 @@ public AzureFileshareProtectedItemExtendedInfo() /// partial void CustomInit(); + /// - /// Gets or sets the oldest backup copy available for this item in the - /// service. + /// Gets or sets the oldest backup copy available for this item in the service. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets number of available backup copies associated with this - /// backup item. + /// Gets or sets number of available backup copies associated with this backup + /// item. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } /// - /// Gets or sets indicates consistency of policy object and policy - /// applied to this backup item. + /// Gets or sets indicates consistency of policy object and policy applied to + /// this backup item. /// - [JsonProperty(PropertyName = "policyState")] - public string PolicyState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyState")] + public string PolicyState {get; set; } /// - /// Gets indicates the state of this resource. Possible values are from - /// enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// Gets indicates the state of this resource. Possible values are from enum + /// ResourceState {Invalid, Active, SoftDeleted, Deleted} /// - [JsonProperty(PropertyName = "resourceState")] - public string ResourceState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceState")] + public string ResourceState {get; private set; } /// /// Gets the resource state sync time for this backup item. /// - [JsonProperty(PropertyName = "resourceStateSyncTime")] - public System.DateTime? ResourceStateSyncTime { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceStateSyncTime")] + public System.DateTime? ResourceStateSyncTime {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs index 63d552a4a333..d5658be40cb1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs @@ -1,30 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// IaaS VM workload-specific backup item representing the Classic Compute - /// VM. + /// IaaS VM workload-specific backup item representing the Classic Compute VM. /// [Newtonsoft.Json.JsonObject("Microsoft.ClassicCompute/virtualMachines")] public partial class AzureIaaSClassicComputeVMProtectedItem : AzureIaaSVMProtectedItem { /// - /// Initializes a new instance of the - /// AzureIaaSClassicComputeVMProtectedItem class. + /// Initializes a new instance of the AzureIaaSClassicComputeVMProtectedItem class. /// public AzureIaaSClassicComputeVMProtectedItem() { @@ -32,68 +22,99 @@ public AzureIaaSClassicComputeVMProtectedItem() } /// - /// Initializes a new instance of the - /// AzureIaaSClassicComputeVMProtectedItem class. + /// Initializes a new instance of the AzureIaaSClassicComputeVMProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the VM represented by - /// this backup item. - /// Fully qualified ARM ID of the - /// virtual machine represented by this item. - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the VM represented by this backup item. + /// + + /// Fully qualified ARM ID of the virtual machine represented by this item. + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' + /// Health status of protected item. - /// Possible values include: 'Passed', 'ActionRequired', - /// 'ActionSuggested', 'Invalid' - /// Health details on this backup - /// item. - /// Health details of different KPIs - /// Last backup operation - /// status. - /// Timestamp of the last backup operation - /// on this backup item. - /// Data ID of the protected - /// item. - /// Additional information for this backup - /// item. - public AzureIaaSClassicComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) + /// Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + /// 'Invalid' + + /// Health details on this backup item. + /// + + /// Health details of different KPIs + /// + + /// Last backup operation status. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Data ID of the protected item. + /// + + /// Additional information for this backup item. + /// + + /// Extended Properties for Azure IaasVM Backup. + /// + public AzureIaaSClassicComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), System.Collections.Generic.IList healthDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) { CustomInit(); } @@ -104,4 +125,4 @@ public AzureIaaSClassicComputeVMProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectedItem.cs index 69753f424041..ae6545e200c3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureIaaSComputeVMProtectedItem : AzureIaaSVMProtectedItem { /// - /// Initializes a new instance of the AzureIaaSComputeVMProtectedItem - /// class. + /// Initializes a new instance of the AzureIaaSComputeVMProtectedItem class. /// public AzureIaaSComputeVMProtectedItem() { @@ -32,68 +23,99 @@ public AzureIaaSComputeVMProtectedItem() } /// - /// Initializes a new instance of the AzureIaaSComputeVMProtectedItem - /// class. + /// Initializes a new instance of the AzureIaaSComputeVMProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the VM represented by - /// this backup item. - /// Fully qualified ARM ID of the - /// virtual machine represented by this item. - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the VM represented by this backup item. + /// + + /// Fully qualified ARM ID of the virtual machine represented by this item. + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' + /// Health status of protected item. - /// Possible values include: 'Passed', 'ActionRequired', - /// 'ActionSuggested', 'Invalid' - /// Health details on this backup - /// item. - /// Health details of different KPIs - /// Last backup operation - /// status. - /// Timestamp of the last backup operation - /// on this backup item. - /// Data ID of the protected - /// item. - /// Additional information for this backup - /// item. - public AzureIaaSComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) + /// Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + /// 'Invalid' + + /// Health details on this backup item. + /// + + /// Health details of different KPIs + /// + + /// Last backup operation status. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Data ID of the protected item. + /// + + /// Additional information for this backup item. + /// + + /// Extended Properties for Azure IaasVM Backup. + /// + public AzureIaaSComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), System.Collections.Generic.IList healthDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) { CustomInit(); } @@ -104,4 +126,4 @@ public AzureIaaSComputeVMProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMErrorInfo.cs index 4060acd30461..72bc6bcd6ff9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,18 +23,25 @@ public AzureIaaSVMErrorInfo() /// /// Initializes a new instance of the AzureIaaSVMErrorInfo class. /// - /// Error code. - /// Title: Typically, the entity that the - /// error pertains to. - /// Localized error string. - /// List of localized recommendations for - /// above error code. - public AzureIaaSVMErrorInfo(int? errorCode = default(int?), string errorTitle = default(string), string errorString = default(string), IList recommendations = default(IList)) + + /// Error code. + /// + + /// Title: Typically, the entity that the error pertains to. + /// + + /// Localized error string. + /// + + /// List of localized recommendations for above error code. + /// + public AzureIaaSVMErrorInfo(int? errorCode = default(int?), string errorTitle = default(string), string errorString = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - ErrorCode = errorCode; - ErrorTitle = errorTitle; - ErrorString = errorString; - Recommendations = recommendations; + this.ErrorCode = errorCode; + this.ErrorTitle = errorTitle; + this.ErrorString = errorString; + this.Recommendations = recommendations; CustomInit(); } @@ -51,29 +50,29 @@ public AzureIaaSVMErrorInfo() /// partial void CustomInit(); + /// /// Gets error code. /// - [JsonProperty(PropertyName = "errorCode")] - public int? ErrorCode { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode {get; private set; } /// /// Gets title: Typically, the entity that the error pertains to. /// - [JsonProperty(PropertyName = "errorTitle")] - public string ErrorTitle { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorTitle")] + public string ErrorTitle {get; private set; } /// /// Gets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; private set; } /// /// Gets list of localized recommendations for above error code. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMHealthDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMHealthDetails.cs index cb853c142d78..439c28f1064a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMHealthDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMHealthDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -30,12 +23,21 @@ public AzureIaaSVMHealthDetails() /// /// Initializes a new instance of the AzureIaaSVMHealthDetails class. /// - /// Health Code - /// Health Title - /// Health Message - /// Health Recommended Actions - public AzureIaaSVMHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), IList recommendations = default(IList)) - : base(code, title, message, recommendations) + + /// Health Code + /// + + /// Health Title + /// + + /// Health Message + /// + + /// Health Recommended Actions + /// + public AzureIaaSVMHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + + : base(code, title, message, recommendations) { CustomInit(); } @@ -46,4 +48,4 @@ public AzureIaaSVMHealthDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJob.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJob.cs index f31a30bf36c0..8c79d053a427 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,35 +24,54 @@ public AzureIaaSVMJob() /// /// Initializes a new instance of the AzureIaaSVMJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Time elapsed during the execution of this - /// job. - /// Gets or sets the state/actions applicable - /// on this job like cancel/retry. - /// Error details on execution of this - /// job. - /// Specifies whether the backup - /// item is a Classic or an Azure Resource Manager VM. - /// Additional information for this - /// job. - public AzureIaaSVMJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), IList errorDetails = default(IList), string virtualMachineVersion = default(string), AzureIaaSVMJobExtendedInfo extendedInfo = default(AzureIaaSVMJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Time elapsed during the execution of this job. + /// + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + /// + + /// Error details on execution of this job. + /// + + /// Specifies whether the backup item is a Classic or an Azure Resource Manager + /// VM. + /// + + /// Additional information for this job. + /// + public AzureIaaSVMJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), string virtualMachineVersion = default(string), AzureIaaSVMJobExtendedInfo extendedInfo = default(AzureIaaSVMJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - Duration = duration; - ActionsInfo = actionsInfo; - ErrorDetails = errorDetails; - VirtualMachineVersion = virtualMachineVersion; - ExtendedInfo = extendedInfo; + this.Duration = duration; + this.ActionsInfo = actionsInfo; + this.ErrorDetails = errorDetails; + this.VirtualMachineVersion = virtualMachineVersion; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -69,37 +80,37 @@ public AzureIaaSVMJob() /// partial void CustomInit(); + /// /// Gets or sets time elapsed during the execution of this job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets the state/actions applicable on this job like + /// Gets or sets gets or sets the state/actions applicable on this job like /// cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets error details on execution of this job. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// - /// Gets or sets specifies whether the backup item is a Classic or an - /// Azure Resource Manager VM. + /// Gets or sets specifies whether the backup item is a Classic or an Azure + /// Resource Manager VM. /// - [JsonProperty(PropertyName = "virtualMachineVersion")] - public string VirtualMachineVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineVersion")] + public string VirtualMachineVersion {get; set; } /// /// Gets or sets additional information for this job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureIaaSVMJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureIaaSVMJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJobExtendedInfo.cs index 6afa9a778e4b..93be894a849b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,24 +23,33 @@ public AzureIaaSVMJobExtendedInfo() /// /// Initializes a new instance of the AzureIaaSVMJobExtendedInfo class. /// - /// List of tasks associated with this - /// job. - /// Job properties. - /// Job internal properties. - /// Indicates progress of the job. - /// Null if it has not started or completed. - /// Time remaining for - /// execution of this job. - /// Non localized error message on - /// job execution. - public AzureIaaSVMJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), IDictionary internalPropertyBag = default(IDictionary), double? progressPercentage = default(double?), string estimatedRemainingDuration = default(string), string dynamicErrorMessage = default(string)) + + /// List of tasks associated with this job. + /// + + /// Job properties. + /// + + /// Job internal properties. + /// + + /// Indicates progress of the job. Null if it has not started or completed. + /// + + /// Time remaining for execution of this job. + /// + + /// Non localized error message on job execution. + /// + public AzureIaaSVMJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary internalPropertyBag = default(System.Collections.Generic.IDictionary), double? progressPercentage = default(double?), string estimatedRemainingDuration = default(string), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - InternalPropertyBag = internalPropertyBag; - ProgressPercentage = progressPercentage; - EstimatedRemainingDuration = estimatedRemainingDuration; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.InternalPropertyBag = internalPropertyBag; + this.ProgressPercentage = progressPercentage; + this.EstimatedRemainingDuration = estimatedRemainingDuration; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -57,42 +58,42 @@ public AzureIaaSVMJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks associated with this job. /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets job internal properties. /// - [JsonProperty(PropertyName = "internalPropertyBag")] - public IDictionary InternalPropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "internalPropertyBag")] + public System.Collections.Generic.IDictionary InternalPropertyBag {get; set; } /// - /// Gets or sets indicates progress of the job. Null if it has not - /// started or completed. + /// Gets or sets indicates progress of the job. Null if it has not started or + /// completed. /// - [JsonProperty(PropertyName = "progressPercentage")] - public double? ProgressPercentage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "progressPercentage")] + public double? ProgressPercentage {get; set; } /// /// Gets or sets time remaining for execution of this job. /// - [JsonProperty(PropertyName = "estimatedRemainingDuration")] - public string EstimatedRemainingDuration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "estimatedRemainingDuration")] + public string EstimatedRemainingDuration {get; set; } /// /// Gets or sets non localized error message on job execution. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJobTaskDetails.cs index 5aafa0068933..74c058d3dabe 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,26 +23,42 @@ public AzureIaaSVMJobTaskDetails() /// /// Initializes a new instance of the AzureIaaSVMJobTaskDetails class. /// - /// The task display name. - /// The start time. - /// The end time. - /// The instanceId. - /// Time elapsed for task. - /// The status. - /// Progress of the task. - /// Details about execution of the - /// task. - /// eg: number of bytes transferred etc + + /// The task display name. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// The instanceId. + /// + + /// Time elapsed for task. + /// + + /// The status. + /// + + /// Progress of the task. + /// + + /// Details about execution of the task. + /// eg: number of bytes transferred etc + /// public AzureIaaSVMJobTaskDetails(string taskId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string instanceId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), string status = default(string), double? progressPercentage = default(double?), string taskExecutionDetails = default(string)) + { - TaskId = taskId; - StartTime = startTime; - EndTime = endTime; - InstanceId = instanceId; - Duration = duration; - Status = status; - ProgressPercentage = progressPercentage; - TaskExecutionDetails = taskExecutionDetails; + this.TaskId = taskId; + this.StartTime = startTime; + this.EndTime = endTime; + this.InstanceId = instanceId; + this.Duration = duration; + this.Status = status; + this.ProgressPercentage = progressPercentage; + this.TaskExecutionDetails = taskExecutionDetails; CustomInit(); } @@ -57,54 +67,54 @@ public AzureIaaSVMJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets the instanceId. /// - [JsonProperty(PropertyName = "instanceId")] - public string InstanceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "instanceId")] + public string InstanceId {get; set; } /// /// Gets or sets time elapsed for task. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets progress of the task. /// - [JsonProperty(PropertyName = "progressPercentage")] - public double? ProgressPercentage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "progressPercentage")] + public double? ProgressPercentage {get; set; } /// /// Gets or sets details about execution of the task. /// eg: number of bytes transferred etc /// - [JsonProperty(PropertyName = "taskExecutionDetails")] - public string TaskExecutionDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "taskExecutionDetails")] + public string TaskExecutionDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItem.cs index b0a07c63bfbe..d8a9cf20a079 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,78 +24,110 @@ public AzureIaaSVMProtectedItem() /// /// Initializes a new instance of the AzureIaaSVMProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the VM represented by - /// this backup item. - /// Fully qualified ARM ID of the - /// virtual machine represented by this item. - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the VM represented by this backup item. + /// + + /// Fully qualified ARM ID of the virtual machine represented by this item. + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' + /// Health status of protected item. - /// Possible values include: 'Passed', 'ActionRequired', - /// 'ActionSuggested', 'Invalid' - /// Health details on this backup - /// item. - /// Health details of different KPIs - /// Last backup operation - /// status. - /// Timestamp of the last backup operation - /// on this backup item. - /// Data ID of the protected - /// item. - /// Additional information for this backup - /// item. - public AzureIaaSVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) + /// Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + /// 'Invalid' + + /// Health details on this backup item. + /// + + /// Health details of different KPIs + /// + + /// Last backup operation status. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Data ID of the protected item. + /// + + /// Additional information for this backup item. + /// + + /// Extended Properties for Azure IaasVM Backup. + /// + public AzureIaaSVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), System.Collections.Generic.IList healthDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { - FriendlyName = friendlyName; - VirtualMachineId = virtualMachineId; - ProtectionStatus = protectionStatus; - ProtectionState = protectionState; - HealthStatus = healthStatus; - HealthDetails = healthDetails; - KpisHealths = kpisHealths; - LastBackupStatus = lastBackupStatus; - LastBackupTime = lastBackupTime; - ProtectedItemDataId = protectedItemDataId; - ExtendedInfo = extendedInfo; - ExtendedProperties = extendedProperties; + this.FriendlyName = friendlyName; + this.VirtualMachineId = virtualMachineId; + this.ProtectionStatus = protectionStatus; + this.ProtectionState = protectionState; + this.HealthStatus = healthStatus; + this.HealthDetails = healthDetails; + this.KpisHealths = kpisHealths; + this.LastBackupStatus = lastBackupStatus; + this.LastBackupTime = lastBackupTime; + this.ProtectedItemDataId = protectedItemDataId; + this.ExtendedInfo = extendedInfo; + this.ExtendedProperties = extendedProperties; CustomInit(); } @@ -112,82 +136,78 @@ public AzureIaaSVMProtectedItem() /// partial void CustomInit(); + /// - /// Gets or sets friendly name of the VM represented by this backup - /// item. + /// Gets or sets friendly name of the VM represented by this backup item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets fully qualified ARM ID of the virtual machine - /// represented by this item. + /// Gets or sets fully qualified ARM ID of the virtual machine represented by + /// this item. /// - [JsonProperty(PropertyName = "virtualMachineId")] - public string VirtualMachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineId")] + public string VirtualMachineId {get; set; } /// /// Gets or sets backup status of this backup item. /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; set; } /// - /// Gets or sets backup state of this backup item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused' + /// Gets or sets backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// - /// Gets or sets health status of protected item. Possible values - /// include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + /// Gets or sets health status of protected item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' /// - [JsonProperty(PropertyName = "healthStatus")] - public string HealthStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthStatus")] + public string HealthStatus {get; set; } /// /// Gets or sets health details on this backup item. /// - [JsonProperty(PropertyName = "healthDetails")] - public IList HealthDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthDetails")] + public System.Collections.Generic.IList HealthDetails {get; set; } /// /// Gets or sets health details of different KPIs /// - [JsonProperty(PropertyName = "kpisHealths")] - public IDictionary KpisHealths { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kpisHealths")] + public System.Collections.Generic.IDictionary KpisHealths {get; set; } /// /// Gets or sets last backup operation status. /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// - /// Gets or sets timestamp of the last backup operation on this backup - /// item. + /// Gets or sets timestamp of the last backup operation on this backup item. /// - [JsonProperty(PropertyName = "lastBackupTime")] - public System.DateTime? LastBackupTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupTime")] + public System.DateTime? LastBackupTime {get; set; } /// /// Gets or sets data ID of the protected item. /// - [JsonProperty(PropertyName = "protectedItemDataId")] - public string ProtectedItemDataId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemDataId")] + public string ProtectedItemDataId {get; set; } /// /// Gets or sets additional information for this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureIaaSVMProtectedItemExtendedInfo ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureIaaSVMProtectedItemExtendedInfo ExtendedInfo {get; set; } /// + /// Gets or sets extended Properties for Azure IaasVM Backup. /// - [JsonProperty(PropertyName = "extendedProperties")] - public ExtendedProperties ExtendedProperties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedProperties")] + public ExtendedProperties ExtendedProperties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs index 065eacf1c06c..1b146291bb95 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureIaaSVMProtectedItemExtendedInfo { /// - /// Initializes a new instance of the - /// AzureIaaSVMProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureIaaSVMProtectedItemExtendedInfo class. /// public AzureIaaSVMProtectedItemExtendedInfo() { @@ -28,20 +21,23 @@ public AzureIaaSVMProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the - /// AzureIaaSVMProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureIaaSVMProtectedItemExtendedInfo class. /// - /// The oldest backup copy available - /// for this backup item. - /// Number of backup copies available - /// for this backup item. - /// Specifies if backup policy - /// associated with the backup item is inconsistent. + + /// The oldest backup copy available for this backup item. + /// + + /// Number of backup copies available for this backup item. + /// + + /// Specifies if backup policy associated with the backup item is inconsistent. + /// public AzureIaaSVMProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), bool? policyInconsistent = default(bool?)) + { - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; - PolicyInconsistent = policyInconsistent; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; + this.PolicyInconsistent = policyInconsistent; CustomInit(); } @@ -50,25 +46,24 @@ public AzureIaaSVMProtectedItemExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets the oldest backup copy available for this backup item. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets number of backup copies available for this backup - /// item. + /// Gets or sets number of backup copies available for this backup item. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } /// - /// Gets or sets specifies if backup policy associated with the backup - /// item is inconsistent. + /// Gets or sets specifies if backup policy associated with the backup item is + /// inconsistent. /// - [JsonProperty(PropertyName = "policyInconsistent")] - public bool? PolicyInconsistent { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "policyInconsistent")] + public bool? PolicyInconsistent {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureSqlProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureSqlProtectedItem.cs index c5529182a3b7..243e14890383 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureSqlProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureSqlProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,54 +24,74 @@ public AzureSqlProtectedItem() /// /// Initializes a new instance of the AzureSqlProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Internal ID of a backup item. - /// Used by Azure SQL Backup engine to contact Recovery - /// Services. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Internal ID of a backup item. Used by Azure SQL Backup engine to contact + /// Recovery Services. + /// + /// Backup state of the backed up item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - /// Additional information for this backup - /// item. - public AzureSqlProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string protectedItemDataId = default(string), string protectionState = default(string), AzureSqlProtectedItemExtendedInfo extendedInfo = default(AzureSqlProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) + + /// Additional information for this backup item. + /// + public AzureSqlProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string protectedItemDataId = default(string), string protectionState = default(string), AzureSqlProtectedItemExtendedInfo extendedInfo = default(AzureSqlProtectedItemExtendedInfo)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { - ProtectedItemDataId = protectedItemDataId; - ProtectionState = protectionState; - ExtendedInfo = extendedInfo; + this.ProtectedItemDataId = protectedItemDataId; + this.ProtectionState = protectionState; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -88,26 +100,24 @@ public AzureSqlProtectedItem() /// partial void CustomInit(); + /// - /// Gets or sets internal ID of a backup item. Used by Azure SQL Backup - /// engine to contact Recovery Services. + /// Gets or sets internal ID of a backup item. Used by Azure SQL Backup engine + /// to contact Recovery Services. /// - [JsonProperty(PropertyName = "protectedItemDataId")] - public string ProtectedItemDataId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemDataId")] + public string ProtectedItemDataId {get; set; } /// - /// Gets or sets backup state of the backed up item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused' + /// Gets or sets backup state of the backed up item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// /// Gets or sets additional information for this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureSqlProtectedItemExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureSqlProtectedItemExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureSqlProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureSqlProtectedItemExtendedInfo.cs index ffecfa71b825..d3340234f679 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureSqlProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureSqlProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureSqlProtectedItemExtendedInfo { /// - /// Initializes a new instance of the AzureSqlProtectedItemExtendedInfo - /// class. + /// Initializes a new instance of the AzureSqlProtectedItemExtendedInfo class. /// public AzureSqlProtectedItemExtendedInfo() { @@ -28,20 +21,23 @@ public AzureSqlProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the AzureSqlProtectedItemExtendedInfo - /// class. + /// Initializes a new instance of the AzureSqlProtectedItemExtendedInfo class. /// - /// The oldest backup copy available - /// for this item in the service. - /// Number of available backup copies - /// associated with this backup item. - /// State of the backup policy associated - /// with this backup item. + + /// The oldest backup copy available for this item in the service. + /// + + /// Number of available backup copies associated with this backup item. + /// + + /// State of the backup policy associated with this backup item. + /// public AzureSqlProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), string policyState = default(string)) + { - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; - PolicyState = policyState; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; + this.PolicyState = policyState; CustomInit(); } @@ -50,26 +46,24 @@ public AzureSqlProtectedItemExtendedInfo() /// partial void CustomInit(); - /// - /// Gets or sets the oldest backup copy available for this item in the - /// service. - /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } /// - /// Gets or sets number of available backup copies associated with this - /// backup item. + /// Gets or sets the oldest backup copy available for this item in the service. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets state of the backup policy associated with this backup + /// Gets or sets number of available backup copies associated with this backup /// item. /// - [JsonProperty(PropertyName = "policyState")] - public string PolicyState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } + /// + /// Gets or sets state of the backup policy associated with this backup item. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "policyState")] + public string PolicyState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageErrorInfo.cs index 63aab3e39c07..44b78577f9a5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public AzureStorageErrorInfo() /// /// Initializes a new instance of the AzureStorageErrorInfo class. /// - /// Error code. - /// Localized error string. - /// List of localized recommendations for - /// above error code. - public AzureStorageErrorInfo(int? errorCode = default(int?), string errorString = default(string), IList recommendations = default(IList)) + + /// Error code. + /// + + /// Localized error string. + /// + + /// List of localized recommendations for above error code. + /// + public AzureStorageErrorInfo(int? errorCode = default(int?), string errorString = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - ErrorCode = errorCode; - ErrorString = errorString; - Recommendations = recommendations; + this.ErrorCode = errorCode; + this.ErrorString = errorString; + this.Recommendations = recommendations; CustomInit(); } @@ -48,24 +46,23 @@ public AzureStorageErrorInfo() /// partial void CustomInit(); + /// /// Gets or sets error code. /// - [JsonProperty(PropertyName = "errorCode")] - public int? ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode {get; set; } /// /// Gets or sets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; set; } /// - /// Gets or sets list of localized recommendations for above error - /// code. + /// Gets or sets list of localized recommendations for above error code. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJob.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJob.cs index 8307974cee21..f064d6638784 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,39 +24,58 @@ public AzureStorageJob() /// /// Initializes a new instance of the AzureStorageJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Time elapsed during the execution of this - /// job. - /// Gets or sets the state/actions applicable - /// on this job like cancel/retry. - /// Error details on execution of this - /// job. - /// Specifies friendly name of the - /// storage account. - /// Specifies whether the Storage - /// account is a Classic or an Azure Resource Manager Storage - /// account. - /// Additional information about the - /// job. - public AzureStorageJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), IList errorDetails = default(IList), string storageAccountName = default(string), string storageAccountVersion = default(string), AzureStorageJobExtendedInfo extendedInfo = default(AzureStorageJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Time elapsed during the execution of this job. + /// + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + /// + + /// Error details on execution of this job. + /// + + /// Specifies friendly name of the storage account. + /// + + /// Specifies whether the Storage account is a Classic or an Azure Resource + /// Manager Storage account. + /// + + /// Additional information about the job. + /// + public AzureStorageJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), string storageAccountName = default(string), string storageAccountVersion = default(string), AzureStorageJobExtendedInfo extendedInfo = default(AzureStorageJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - Duration = duration; - ActionsInfo = actionsInfo; - ErrorDetails = errorDetails; - StorageAccountName = storageAccountName; - StorageAccountVersion = storageAccountVersion; - ExtendedInfo = extendedInfo; + this.Duration = duration; + this.ActionsInfo = actionsInfo; + this.ErrorDetails = errorDetails; + this.StorageAccountName = storageAccountName; + this.StorageAccountVersion = storageAccountVersion; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -73,43 +84,43 @@ public AzureStorageJob() /// partial void CustomInit(); + /// /// Gets or sets time elapsed during the execution of this job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets the state/actions applicable on this job like + /// Gets or sets gets or sets the state/actions applicable on this job like /// cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets error details on execution of this job. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// /// Gets or sets specifies friendly name of the storage account. /// - [JsonProperty(PropertyName = "storageAccountName")] - public string StorageAccountName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountName")] + public string StorageAccountName {get; set; } /// - /// Gets or sets specifies whether the Storage account is a Classic or - /// an Azure Resource Manager Storage account. + /// Gets or sets specifies whether the Storage account is a Classic or an Azure + /// Resource Manager Storage account. /// - [JsonProperty(PropertyName = "storageAccountVersion")] - public string StorageAccountVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountVersion")] + public string StorageAccountVersion {get; set; } /// /// Gets or sets additional information about the job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureStorageJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureStorageJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJobExtendedInfo.cs index df31866c7de8..7ffecd7c0b90 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureStorageJobExtendedInfo { /// - /// Initializes a new instance of the AzureStorageJobExtendedInfo - /// class. + /// Initializes a new instance of the AzureStorageJobExtendedInfo class. /// public AzureStorageJobExtendedInfo() { @@ -30,18 +21,23 @@ public AzureStorageJobExtendedInfo() } /// - /// Initializes a new instance of the AzureStorageJobExtendedInfo - /// class. + /// Initializes a new instance of the AzureStorageJobExtendedInfo class. /// - /// List of tasks for this job - /// Job properties. - /// Non localized error message on - /// job execution. - public AzureStorageJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), string dynamicErrorMessage = default(string)) + + /// List of tasks for this job + /// + + /// Job properties. + /// + + /// Non localized error message on job execution. + /// + public AzureStorageJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -50,23 +46,23 @@ public AzureStorageJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks for this job /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets non localized error message on job execution. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJobTaskDetails.cs index 6732c474d8e3..97fdb4e09147 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureStorageJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public AzureStorageJobTaskDetails() /// /// Initializes a new instance of the AzureStorageJobTaskDetails class. /// - /// The task display name. - /// The status. + + /// The task display name. + /// + + /// The status. + /// public AzureStorageJobTaskDetails(string taskId = default(string), string status = default(string)) + { - TaskId = taskId; - Status = status; + this.TaskId = taskId; + this.Status = status; CustomInit(); } @@ -43,17 +42,17 @@ public AzureStorageJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItem.cs index 4aafcb136feb..e7ecdbdb5d5c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureVmWorkloadProtectedItem : ProtectedItem { /// - /// Initializes a new instance of the AzureVmWorkloadProtectedItem - /// class. + /// Initializes a new instance of the AzureVmWorkloadProtectedItem class. /// public AzureVmWorkloadProtectedItem() { @@ -31,88 +22,118 @@ public AzureVmWorkloadProtectedItem() } /// - /// Initializes a new instance of the AzureVmWorkloadProtectedItem - /// class. + /// Initializes a new instance of the AzureVmWorkloadProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the DB represented by - /// this backup item. - /// Host/Cluster Name for instance or - /// AG - /// Parent name of the DB such as Instance or - /// Availability Group. - /// Parent type of protected item, example: - /// for a DB, standalone server or distributed - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the DB represented by this backup item. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Parent name of the DB such as Instance or Availability Group. + /// + + /// Parent type of protected item, example: for a DB, standalone server or + /// distributed + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. Possible values include: - /// 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' - /// Timestamp of the last backup operation - /// on this backup item. - /// Error details in last - /// backup - /// Data ID of the protected - /// item. - /// Health status of the backup - /// item, evaluated based on last heartbeat received. Possible values - /// include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Error details in last backup + /// + + /// Data ID of the protected item. + /// + + /// Health status of the backup item, evaluated based on last heartbeat + /// received + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', /// 'IRPending' - /// Additional information for this backup - /// item. - /// Health details of different KPIs - public AzureVmWorkloadProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) + + /// Additional information for this backup item. + /// + + /// Health details of different KPIs + /// + public AzureVmWorkloadProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { - FriendlyName = friendlyName; - ServerName = serverName; - ParentName = parentName; - ParentType = parentType; - ProtectionStatus = protectionStatus; - ProtectionState = protectionState; - LastBackupStatus = lastBackupStatus; - LastBackupTime = lastBackupTime; - LastBackupErrorDetail = lastBackupErrorDetail; - ProtectedItemDataSourceId = protectedItemDataSourceId; - ProtectedItemHealthStatus = protectedItemHealthStatus; - ExtendedInfo = extendedInfo; - KpisHealths = kpisHealths; + this.FriendlyName = friendlyName; + this.ServerName = serverName; + this.ParentName = parentName; + this.ParentType = parentType; + this.ProtectionStatus = protectionStatus; + this.ProtectionState = protectionState; + this.LastBackupStatus = lastBackupStatus; + this.LastBackupTime = lastBackupTime; + this.LastBackupErrorDetail = lastBackupErrorDetail; + this.ProtectedItemDataSourceId = protectedItemDataSourceId; + this.ProtectedItemHealthStatus = protectedItemHealthStatus; + this.ExtendedInfo = extendedInfo; + this.KpisHealths = kpisHealths; CustomInit(); } @@ -121,93 +142,86 @@ public AzureVmWorkloadProtectedItem() /// partial void CustomInit(); + /// - /// Gets or sets friendly name of the DB represented by this backup - /// item. + /// Gets or sets friendly name of the DB represented by this backup item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets host/Cluster Name for instance or AG /// - [JsonProperty(PropertyName = "serverName")] - public string ServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serverName")] + public string ServerName {get; set; } /// - /// Gets or sets parent name of the DB such as Instance or Availability - /// Group. + /// Gets or sets parent name of the DB such as Instance or Availability Group. /// - [JsonProperty(PropertyName = "parentName")] - public string ParentName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentName")] + public string ParentName {get; set; } /// - /// Gets or sets parent type of protected item, example: for a DB, - /// standalone server or distributed + /// Gets or sets parent type of protected item, example: for a DB, standalone + /// server or distributed /// - [JsonProperty(PropertyName = "parentType")] - public string ParentType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentType")] + public string ParentType {get; set; } /// /// Gets or sets backup status of this backup item. /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; set; } /// - /// Gets or sets backup state of this backup item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused' + /// Gets or sets backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// - /// Gets or sets last backup operation status. Possible values: - /// Healthy, Unhealthy. Possible values include: 'Invalid', 'Healthy', - /// 'Unhealthy', 'IRPending' + /// Gets or sets last backup operation status. Possible values: Healthy, + /// Unhealthy. Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// - /// Gets or sets timestamp of the last backup operation on this backup - /// item. + /// Gets or sets timestamp of the last backup operation on this backup item. /// - [JsonProperty(PropertyName = "lastBackupTime")] - public System.DateTime? LastBackupTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupTime")] + public System.DateTime? LastBackupTime {get; set; } /// /// Gets or sets error details in last backup /// - [JsonProperty(PropertyName = "lastBackupErrorDetail")] - public ErrorDetail LastBackupErrorDetail { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupErrorDetail")] + public ErrorDetail LastBackupErrorDetail {get; set; } /// /// Gets or sets data ID of the protected item. /// - [JsonProperty(PropertyName = "protectedItemDataSourceId")] - public string ProtectedItemDataSourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemDataSourceId")] + public string ProtectedItemDataSourceId {get; set; } /// - /// Gets or sets health status of the backup item, evaluated based on - /// last heartbeat received. Possible values include: 'Invalid', - /// 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' + /// Gets or sets health status of the backup item, evaluated based on last + /// heartbeat received Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' /// - [JsonProperty(PropertyName = "protectedItemHealthStatus")] - public string ProtectedItemHealthStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemHealthStatus")] + public string ProtectedItemHealthStatus {get; set; } /// /// Gets or sets additional information for this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureVmWorkloadProtectedItemExtendedInfo ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureVmWorkloadProtectedItemExtendedInfo ExtendedInfo {get; set; } /// /// Gets or sets health details of different KPIs /// - [JsonProperty(PropertyName = "kpisHealths")] - public IDictionary KpisHealths { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "kpisHealths")] + public System.Collections.Generic.IDictionary KpisHealths {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs index cdc43f75ef80..18044efc7473 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureVmWorkloadProtectedItemExtendedInfo { /// - /// Initializes a new instance of the - /// AzureVmWorkloadProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureVmWorkloadProtectedItemExtendedInfo class. /// public AzureVmWorkloadProtectedItemExtendedInfo() { @@ -28,20 +21,24 @@ public AzureVmWorkloadProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureVmWorkloadProtectedItemExtendedInfo class. /// - /// The oldest backup copy available - /// for this backup item. - /// Number of backup copies available - /// for this backup item. - /// Indicates consistency of policy object - /// and policy applied to this backup item. + + /// The oldest backup copy available for this backup item. + /// + + /// Number of backup copies available for this backup item. + /// + + /// Indicates consistency of policy object and policy applied to this backup + /// item. + /// public AzureVmWorkloadProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), string policyState = default(string)) + { - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; - PolicyState = policyState; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; + this.PolicyState = policyState; CustomInit(); } @@ -50,25 +47,24 @@ public AzureVmWorkloadProtectedItemExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets the oldest backup copy available for this backup item. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets number of backup copies available for this backup - /// item. + /// Gets or sets number of backup copies available for this backup item. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } /// - /// Gets or sets indicates consistency of policy object and policy - /// applied to this backup item. + /// Gets or sets indicates consistency of policy object and policy applied to + /// this backup item. /// - [JsonProperty(PropertyName = "policyState")] - public string PolicyState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "policyState")] + public string PolicyState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs index 25a35cd3d099..dd43ea41d0b0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs @@ -1,30 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Azure VM workload-specific protected item representing SAP ASE - /// Database. + /// Azure VM workload-specific protected item representing SAP ASE Database. /// [Newtonsoft.Json.JsonObject("AzureVmWorkloadSAPAseDatabase")] public partial class AzureVmWorkloadSAPAseDatabaseProtectedItem : AzureVmWorkloadProtectedItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseDatabaseProtectedItem class. /// public AzureVmWorkloadSAPAseDatabaseProtectedItem() { @@ -32,74 +22,104 @@ public AzureVmWorkloadSAPAseDatabaseProtectedItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseDatabaseProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the DB represented by - /// this backup item. - /// Host/Cluster Name for instance or - /// AG - /// Parent name of the DB such as Instance or - /// Availability Group. - /// Parent type of protected item, example: - /// for a DB, standalone server or distributed - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the DB represented by this backup item. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Parent name of the DB such as Instance or Availability Group. + /// + + /// Parent type of protected item, example: for a DB, standalone server or + /// distributed + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. Possible values include: - /// 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' - /// Timestamp of the last backup operation - /// on this backup item. - /// Error details in last - /// backup - /// Data ID of the protected - /// item. - /// Health status of the backup - /// item, evaluated based on last heartbeat received. Possible values - /// include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Error details in last backup + /// + + /// Data ID of the protected item. + /// + + /// Health status of the backup item, evaluated based on last heartbeat + /// received + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', /// 'IRPending' - /// Additional information for this backup - /// item. - /// Health details of different KPIs - public AzureVmWorkloadSAPAseDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + + /// Additional information for this backup item. + /// + + /// Health details of different KPIs + /// + public AzureVmWorkloadSAPAseDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } @@ -110,4 +130,4 @@ public AzureVmWorkloadSAPAseDatabaseProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs index 10cd2066693d..be7343a692de 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs @@ -1,30 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Azure VM workload-specific protected item representing SAP HANA - /// Database. + /// Azure VM workload-specific protected item representing SAP HANA Database. /// [Newtonsoft.Json.JsonObject("AzureVmWorkloadSAPHanaDatabase")] public partial class AzureVmWorkloadSAPHanaDatabaseProtectedItem : AzureVmWorkloadProtectedItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDatabaseProtectedItem class. /// public AzureVmWorkloadSAPHanaDatabaseProtectedItem() { @@ -32,74 +22,104 @@ public AzureVmWorkloadSAPHanaDatabaseProtectedItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDatabaseProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the DB represented by - /// this backup item. - /// Host/Cluster Name for instance or - /// AG - /// Parent name of the DB such as Instance or - /// Availability Group. - /// Parent type of protected item, example: - /// for a DB, standalone server or distributed - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the DB represented by this backup item. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Parent name of the DB such as Instance or Availability Group. + /// + + /// Parent type of protected item, example: for a DB, standalone server or + /// distributed + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. Possible values include: - /// 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' - /// Timestamp of the last backup operation - /// on this backup item. - /// Error details in last - /// backup - /// Data ID of the protected - /// item. - /// Health status of the backup - /// item, evaluated based on last heartbeat received. Possible values - /// include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Error details in last backup + /// + + /// Data ID of the protected item. + /// + + /// Health status of the backup item, evaluated based on last heartbeat + /// received + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', /// 'IRPending' - /// Additional information for this backup - /// item. - /// Health details of different KPIs - public AzureVmWorkloadSAPHanaDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + + /// Additional information for this backup item. + /// + + /// Health details of different KPIs + /// + public AzureVmWorkloadSAPHanaDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } @@ -110,4 +130,4 @@ public AzureVmWorkloadSAPHanaDatabaseProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs index ad9ec94cb3ce..d3eb98eefb13 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureVmWorkloadSQLDatabaseProtectedItem : AzureVmWorkloadProtectedItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLDatabaseProtectedItem class. /// public AzureVmWorkloadSQLDatabaseProtectedItem() { @@ -31,74 +22,104 @@ public AzureVmWorkloadSQLDatabaseProtectedItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLDatabaseProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the DB represented by - /// this backup item. - /// Host/Cluster Name for instance or - /// AG - /// Parent name of the DB such as Instance or - /// Availability Group. - /// Parent type of protected item, example: - /// for a DB, standalone server or distributed - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the DB represented by this backup item. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Parent name of the DB such as Instance or Availability Group. + /// + + /// Parent type of protected item, example: for a DB, standalone server or + /// distributed + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. Possible values include: - /// 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' - /// Timestamp of the last backup operation - /// on this backup item. - /// Error details in last - /// backup - /// Data ID of the protected - /// item. - /// Health status of the backup - /// item, evaluated based on last heartbeat received. Possible values - /// include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Error details in last backup + /// + + /// Data ID of the protected item. + /// + + /// Health status of the backup item, evaluated based on last heartbeat + /// received + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', /// 'IRPending' - /// Additional information for this backup - /// item. - /// Health details of different KPIs - public AzureVmWorkloadSQLDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + + /// Additional information for this backup item. + /// + + /// Health details of different KPIs + /// + public AzureVmWorkloadSQLDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } @@ -109,4 +130,4 @@ public AzureVmWorkloadSQLDatabaseProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadErrorInfo.cs index b2efefa860d0..24627e93b678 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,21 +23,29 @@ public AzureWorkloadErrorInfo() /// /// Initializes a new instance of the AzureWorkloadErrorInfo class. /// - /// Error code. - /// Localized error string. - /// Title: Typically, the entity that the - /// error pertains to. - /// List of localized recommendations for - /// above error code. - /// Additional details for above error - /// code. - public AzureWorkloadErrorInfo(int? errorCode = default(int?), string errorString = default(string), string errorTitle = default(string), IList recommendations = default(IList), string additionalDetails = default(string)) + + /// Error code. + /// + + /// Localized error string. + /// + + /// Title: Typically, the entity that the error pertains to. + /// + + /// List of localized recommendations for above error code. + /// + + /// Additional details for above error code. + /// + public AzureWorkloadErrorInfo(int? errorCode = default(int?), string errorString = default(string), string errorTitle = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList), string additionalDetails = default(string)) + { - ErrorCode = errorCode; - ErrorString = errorString; - ErrorTitle = errorTitle; - Recommendations = recommendations; - AdditionalDetails = additionalDetails; + this.ErrorCode = errorCode; + this.ErrorString = errorString; + this.ErrorTitle = errorTitle; + this.Recommendations = recommendations; + this.AdditionalDetails = additionalDetails; CustomInit(); } @@ -54,37 +54,35 @@ public AzureWorkloadErrorInfo() /// partial void CustomInit(); + /// /// Gets or sets error code. /// - [JsonProperty(PropertyName = "errorCode")] - public int? ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode {get; set; } /// /// Gets or sets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; set; } /// - /// Gets or sets title: Typically, the entity that the error pertains - /// to. + /// Gets or sets title: Typically, the entity that the error pertains to. /// - [JsonProperty(PropertyName = "errorTitle")] - public string ErrorTitle { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorTitle")] + public string ErrorTitle {get; set; } /// - /// Gets or sets list of localized recommendations for above error - /// code. + /// Gets or sets list of localized recommendations for above error code. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; set; } /// /// Gets or sets additional details for above error code. /// - [JsonProperty(PropertyName = "additionalDetails")] - public string AdditionalDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalDetails")] + public string AdditionalDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJob.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJob.cs index 8aaccca26c56..4d0069cce420 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,34 +24,53 @@ public AzureWorkloadJob() /// /// Initializes a new instance of the AzureWorkloadJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Workload type of the job - /// Time elapsed during the execution of this - /// job. - /// Gets or sets the state/actions applicable - /// on this job like cancel/retry. - /// Error details on execution of this - /// job. - /// Additional information about the - /// job. - public AzureWorkloadJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), string workloadType = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), IList errorDetails = default(IList), AzureWorkloadJobExtendedInfo extendedInfo = default(AzureWorkloadJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Workload type of the job + /// + + /// Time elapsed during the execution of this job. + /// + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + /// + + /// Error details on execution of this job. + /// + + /// Additional information about the job. + /// + public AzureWorkloadJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), string workloadType = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), AzureWorkloadJobExtendedInfo extendedInfo = default(AzureWorkloadJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - WorkloadType = workloadType; - Duration = duration; - ActionsInfo = actionsInfo; - ErrorDetails = errorDetails; - ExtendedInfo = extendedInfo; + this.WorkloadType = workloadType; + this.Duration = duration; + this.ActionsInfo = actionsInfo; + this.ErrorDetails = errorDetails; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -68,36 +79,36 @@ public AzureWorkloadJob() /// partial void CustomInit(); + /// /// Gets or sets workload type of the job /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// /// Gets or sets time elapsed during the execution of this job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets the state/actions applicable on this job like + /// Gets or sets gets or sets the state/actions applicable on this job like /// cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets error details on execution of this job. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// /// Gets or sets additional information about the job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureWorkloadJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureWorkloadJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJobExtendedInfo.cs index 2ad09b57f432..6b4fcb3564e3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadJobExtendedInfo { /// - /// Initializes a new instance of the AzureWorkloadJobExtendedInfo - /// class. + /// Initializes a new instance of the AzureWorkloadJobExtendedInfo class. /// public AzureWorkloadJobExtendedInfo() { @@ -30,18 +21,23 @@ public AzureWorkloadJobExtendedInfo() } /// - /// Initializes a new instance of the AzureWorkloadJobExtendedInfo - /// class. + /// Initializes a new instance of the AzureWorkloadJobExtendedInfo class. /// - /// List of tasks for this job - /// Job properties. - /// Non localized error message on - /// job execution. - public AzureWorkloadJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), string dynamicErrorMessage = default(string)) + + /// List of tasks for this job + /// + + /// Job properties. + /// + + /// Non localized error message on job execution. + /// + public AzureWorkloadJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -50,23 +46,23 @@ public AzureWorkloadJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks for this job /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets non localized error message on job execution. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJobTaskDetails.cs index 0fc13e7a1f56..21652fc46bdb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadJobTaskDetails { /// - /// Initializes a new instance of the AzureWorkloadJobTaskDetails - /// class. + /// Initializes a new instance of the AzureWorkloadJobTaskDetails class. /// public AzureWorkloadJobTaskDetails() { @@ -28,15 +21,19 @@ public AzureWorkloadJobTaskDetails() } /// - /// Initializes a new instance of the AzureWorkloadJobTaskDetails - /// class. + /// Initializes a new instance of the AzureWorkloadJobTaskDetails class. /// - /// The task display name. - /// The status. + + /// The task display name. + /// + + /// The status. + /// public AzureWorkloadJobTaskDetails(string taskId = default(string), string status = default(string)) + { - TaskId = taskId; - Status = status; + this.TaskId = taskId; + this.Status = status; CustomInit(); } @@ -45,17 +42,17 @@ public AzureWorkloadJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs index 0dd0e98f0160..6d89d8c27f18 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadPointInTimeRecoveryPoint : AzureWorkloadRecoveryPoint { /// - /// Initializes a new instance of the - /// AzureWorkloadPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadPointInTimeRecoveryPoint class. /// public AzureWorkloadPointInTimeRecoveryPoint() { @@ -31,22 +22,29 @@ public AzureWorkloadPointInTimeRecoveryPoint() } /// - /// Initializes a new instance of the - /// AzureWorkloadPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadPointInTimeRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// List of log ranges - public AzureWorkloadPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), IList timeRanges = default(IList)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo) + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// List of log ranges + /// + public AzureWorkloadPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList timeRanges = default(System.Collections.Generic.IList)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo) { - TimeRanges = timeRanges; + this.TimeRanges = timeRanges; CustomInit(); } @@ -55,11 +53,11 @@ public AzureWorkloadPointInTimeRecoveryPoint() /// partial void CustomInit(); + /// /// Gets or sets list of log ranges /// - [JsonProperty(PropertyName = "timeRanges")] - public IList TimeRanges { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "timeRanges")] + public System.Collections.Generic.IList TimeRanges {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRestoreRequest.cs index 8594e3ab1563..e64fd25dbaf5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRestoreRequest.cs @@ -1,30 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// AzureWorkload SAP Hana -specific restore. Specifically for - /// PointInTime/Log restore + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log + /// restore /// [Newtonsoft.Json.JsonObject("AzureWorkloadPointInTimeRestoreRequest")] public partial class AzureWorkloadPointInTimeRestoreRequest : AzureWorkloadRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadPointInTimeRestoreRequest class. /// public AzureWorkloadPointInTimeRestoreRequest() { @@ -32,28 +23,39 @@ public AzureWorkloadPointInTimeRestoreRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadPointInTimeRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// PointInTime value - public AzureWorkloadPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// PointInTime value + /// + public AzureWorkloadPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) { - PointInTime = pointInTime; + this.PointInTime = pointInTime; CustomInit(); } @@ -62,11 +64,11 @@ public AzureWorkloadPointInTimeRestoreRequest() /// partial void CustomInit(); + /// /// Gets or sets pointInTime value /// - [JsonProperty(PropertyName = "pointInTime")] - public System.DateTime? PointInTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "pointInTime")] + public System.DateTime? PointInTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadRecoveryPoint.cs index 986797b694b7..bfbd41350ca8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -33,20 +25,26 @@ public AzureWorkloadRecoveryPoint() /// /// Initializes a new instance of the AzureWorkloadRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - public AzureWorkloadRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary)) + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + public AzureWorkloadRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary)) + { - RecoveryPointTimeInUTC = recoveryPointTimeInUTC; - Type = type; - RecoveryPointTierDetails = recoveryPointTierDetails; - RecoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; + this.RecoveryPointTimeInUtc = recoveryPointTimeInUtc; + this.Type = type; + this.RecoveryPointTierDetails = recoveryPointTierDetails; + this.RecoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; CustomInit(); } @@ -55,30 +53,29 @@ public AzureWorkloadRecoveryPoint() /// partial void CustomInit(); + /// - /// Gets UTC time at which recovery point was created + /// Gets uTC time at which recovery point was created /// - [JsonProperty(PropertyName = "recoveryPointTimeInUTC")] - public System.DateTime? RecoveryPointTimeInUTC { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTimeInUTC")] + public System.DateTime? RecoveryPointTimeInUtc {get; private set; } /// - /// Gets type of restore point. Possible values include: 'Invalid', - /// 'Full', 'Log', 'Differential', 'Incremental' + /// Gets type of restore point Possible values include: 'Invalid', 'Full', 'Log', 'Differential', 'Incremental' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets recovery point tier information. /// - [JsonProperty(PropertyName = "recoveryPointTierDetails")] - public IList RecoveryPointTierDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTierDetails")] + public System.Collections.Generic.IList RecoveryPointTierDetails {get; set; } /// /// Gets or sets eligibility of RP to be moved to another tier /// - [JsonProperty(PropertyName = "recoveryPointMoveReadinessInfo")] - public IDictionary RecoveryPointMoveReadinessInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointMoveReadinessInfo")] + public System.Collections.Generic.IDictionary RecoveryPointMoveReadinessInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadRestoreRequest.cs index b2aa3020a591..3573dbd65e8e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadRestoreRequest : RestoreRequest { /// - /// Initializes a new instance of the AzureWorkloadRestoreRequest - /// class. + /// Initializes a new instance of the AzureWorkloadRestoreRequest class. /// public AzureWorkloadRestoreRequest() { @@ -31,31 +22,40 @@ public AzureWorkloadRestoreRequest() } /// - /// Initializes a new instance of the AzureWorkloadRestoreRequest - /// class. + /// Initializes a new instance of the AzureWorkloadRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - public AzureWorkloadRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string)) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + public AzureWorkloadRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string)) + { - RecoveryType = recoveryType; - SourceResourceId = sourceResourceId; - PropertyBag = propertyBag; - TargetInfo = targetInfo; - RecoveryMode = recoveryMode; - TargetVirtualMachineId = targetVirtualMachineId; + this.RecoveryType = recoveryType; + this.SourceResourceId = sourceResourceId; + this.PropertyBag = propertyBag; + this.TargetInfo = targetInfo; + this.RecoveryMode = recoveryMode; + this.TargetVirtualMachineId = targetVirtualMachineId; CustomInit(); } @@ -64,48 +64,45 @@ public AzureWorkloadRestoreRequest() /// partial void CustomInit(); + /// - /// Gets or sets type of this recovery. Possible values include: - /// 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', - /// 'Offline' + /// Gets or sets type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', 'Offline' /// - [JsonProperty(PropertyName = "recoveryType")] - public string RecoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryType")] + public string RecoveryType {get; set; } /// - /// Gets or sets fully qualified ARM ID of the VM on which workload - /// that was running is being recovered. + /// Gets or sets fully qualified ARM ID of the VM on which workload that was + /// running is being recovered. /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// /// Gets or sets workload specific property bag. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets details of target database /// - [JsonProperty(PropertyName = "targetInfo")] - public TargetRestoreInfo TargetInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetInfo")] + public TargetRestoreInfo TargetInfo {get; set; } /// - /// Gets or sets defines whether the current recovery mode is file - /// restore or database restore. Possible values include: 'Invalid', - /// 'FileRecovery', 'WorkloadRecovery' + /// Gets or sets defines whether the current recovery mode is file restore or + /// database restore Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' /// - [JsonProperty(PropertyName = "recoveryMode")] - public string RecoveryMode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryMode")] + public string RecoveryMode {get; set; } /// /// Gets or sets this is the complete ARM Id of the target VM /// For e.g. /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} /// - [JsonProperty(PropertyName = "targetVirtualMachineId")] - public string TargetVirtualMachineId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVirtualMachineId")] + public string TargetVirtualMachineId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs index 230448e134d2..a71172b1ad14 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadSAPHanaPointInTimeRecoveryPoint : AzureWorkloadPointInTimeRecoveryPoint { /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRecoveryPoint class. /// public AzureWorkloadSAPHanaPointInTimeRecoveryPoint() { @@ -31,20 +22,27 @@ public AzureWorkloadSAPHanaPointInTimeRecoveryPoint() } /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// List of log ranges - public AzureWorkloadSAPHanaPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), IList timeRanges = default(IList)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, timeRanges) + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// List of log ranges + /// + public AzureWorkloadSAPHanaPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList timeRanges = default(System.Collections.Generic.IList)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, timeRanges) { CustomInit(); } @@ -55,4 +53,4 @@ public AzureWorkloadSAPHanaPointInTimeRecoveryPoint() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreRequest.cs index 8d578999b2d1..9de896a6f30c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreRequest.cs @@ -1,30 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// AzureWorkload SAP Hana -specific restore. Specifically for - /// PointInTime/Log restore + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log + /// restore /// [Newtonsoft.Json.JsonObject("AzureWorkloadSAPHanaPointInTimeRestoreRequest")] public partial class AzureWorkloadSAPHanaPointInTimeRestoreRequest : AzureWorkloadSAPHanaRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRestoreRequest class. /// public AzureWorkloadSAPHanaPointInTimeRestoreRequest() { @@ -32,28 +23,39 @@ public AzureWorkloadSAPHanaPointInTimeRestoreRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// PointInTime value - public AzureWorkloadSAPHanaPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// PointInTime value + /// + public AzureWorkloadSAPHanaPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) { - PointInTime = pointInTime; + this.PointInTime = pointInTime; CustomInit(); } @@ -62,11 +64,11 @@ public AzureWorkloadSAPHanaPointInTimeRestoreRequest() /// partial void CustomInit(); + /// /// Gets or sets pointInTime value /// - [JsonProperty(PropertyName = "pointInTime")] - public System.DateTime? PointInTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "pointInTime")] + public System.DateTime? PointInTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs index ac551ee2c9cd..2be0c01aeb8a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadSAPHanaRecoveryPoint : AzureWorkloadRecoveryPoint { /// - /// Initializes a new instance of the AzureWorkloadSAPHanaRecoveryPoint - /// class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRecoveryPoint class. /// public AzureWorkloadSAPHanaRecoveryPoint() { @@ -32,19 +23,24 @@ public AzureWorkloadSAPHanaRecoveryPoint() } /// - /// Initializes a new instance of the AzureWorkloadSAPHanaRecoveryPoint - /// class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - public AzureWorkloadSAPHanaRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo) + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + public AzureWorkloadSAPHanaRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo) { CustomInit(); } @@ -55,4 +51,4 @@ public AzureWorkloadSAPHanaRecoveryPoint() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreRequest.cs index 2d5a1be20f22..177d24711f92 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadSAPHanaRestoreRequest : AzureWorkloadRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRestoreRequest class. /// public AzureWorkloadSAPHanaRestoreRequest() { @@ -31,25 +22,34 @@ public AzureWorkloadSAPHanaRestoreRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - public AzureWorkloadSAPHanaRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + public AzureWorkloadSAPHanaRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) { CustomInit(); } @@ -60,4 +60,4 @@ public AzureWorkloadSAPHanaRestoreRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs index 84c4dbcb1e28..d7d6df8c22c9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadSQLPointInTimeRecoveryPoint : AzureWorkloadSQLRecoveryPoint { /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRecoveryPoint class. /// public AzureWorkloadSQLPointInTimeRecoveryPoint() { @@ -31,27 +22,36 @@ public AzureWorkloadSQLPointInTimeRecoveryPoint() } /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// Extended Info that provides data - /// directory details. Will be populated in two cases: + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// Extended Info that provides data directory details. Will be populated in + /// two cases: /// When a specific recovery point is accessed using GetRecoveryPoint - /// Or when ListRecoveryPoints is called for Log RP only with - /// ExtendedInfo query filter - /// List of log ranges - public AzureWorkloadSQLPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), AzureWorkloadSQLRecoveryPointExtendedInfo extendedInfo = default(AzureWorkloadSQLRecoveryPointExtendedInfo), IList timeRanges = default(IList)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, extendedInfo) + /// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + /// query filter + /// + + /// List of log ranges + /// + public AzureWorkloadSQLPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), AzureWorkloadSQLRecoveryPointExtendedInfo extendedInfo = default(AzureWorkloadSQLRecoveryPointExtendedInfo), System.Collections.Generic.IList timeRanges = default(System.Collections.Generic.IList)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, extendedInfo) { - TimeRanges = timeRanges; + this.TimeRanges = timeRanges; CustomInit(); } @@ -60,11 +60,11 @@ public AzureWorkloadSQLPointInTimeRecoveryPoint() /// partial void CustomInit(); + /// /// Gets or sets list of log ranges /// - [JsonProperty(PropertyName = "timeRanges")] - public IList TimeRanges { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "timeRanges")] + public System.Collections.Generic.IList TimeRanges {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreRequest.cs index 136f7338ae87..af048350ef81 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadSQLPointInTimeRestoreRequest : AzureWorkloadSQLRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRestoreRequest class. /// public AzureWorkloadSQLPointInTimeRestoreRequest() { @@ -32,35 +23,50 @@ public AzureWorkloadSQLPointInTimeRestoreRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// Default option set - /// to true. If this is set to false, alternate data directory must be - /// provided - /// SQL specific property where user can - /// chose to set no-recovery when restore operation is tried - /// Data directory - /// details - /// PointInTime value - public AzureWorkloadSQLPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), IList alternateDirectoryPaths = default(IList), System.DateTime? pointInTime = default(System.DateTime?)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// Default option set to true. If this is set to false, alternate data + /// directory must be provided + /// + + /// SQL specific property where user can chose to set no-recovery when restore + /// operation is tried + /// + + /// Data directory details + /// + + /// PointInTime value + /// + public AzureWorkloadSQLPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), System.Collections.Generic.IList alternateDirectoryPaths = default(System.Collections.Generic.IList), System.DateTime? pointInTime = default(System.DateTime?)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) { - PointInTime = pointInTime; + this.PointInTime = pointInTime; CustomInit(); } @@ -69,11 +75,11 @@ public AzureWorkloadSQLPointInTimeRestoreRequest() /// partial void CustomInit(); + /// /// Gets or sets pointInTime value /// - [JsonProperty(PropertyName = "pointInTime")] - public System.DateTime? PointInTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "pointInTime")] + public System.DateTime? PointInTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs index da7a61fa1f6c..900c35cd0d49 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadSQLRecoveryPoint : AzureWorkloadRecoveryPoint { /// - /// Initializes a new instance of the AzureWorkloadSQLRecoveryPoint - /// class. + /// Initializes a new instance of the AzureWorkloadSQLRecoveryPoint class. /// public AzureWorkloadSQLRecoveryPoint() { @@ -32,26 +23,33 @@ public AzureWorkloadSQLRecoveryPoint() } /// - /// Initializes a new instance of the AzureWorkloadSQLRecoveryPoint - /// class. + /// Initializes a new instance of the AzureWorkloadSQLRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// Extended Info that provides data - /// directory details. Will be populated in two cases: + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// Extended Info that provides data directory details. Will be populated in + /// two cases: /// When a specific recovery point is accessed using GetRecoveryPoint - /// Or when ListRecoveryPoints is called for Log RP only with - /// ExtendedInfo query filter - public AzureWorkloadSQLRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), AzureWorkloadSQLRecoveryPointExtendedInfo extendedInfo = default(AzureWorkloadSQLRecoveryPointExtendedInfo)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo) + /// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + /// query filter + /// + public AzureWorkloadSQLRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), AzureWorkloadSQLRecoveryPointExtendedInfo extendedInfo = default(AzureWorkloadSQLRecoveryPointExtendedInfo)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo) { - ExtendedInfo = extendedInfo; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -60,15 +58,15 @@ public AzureWorkloadSQLRecoveryPoint() /// partial void CustomInit(); + /// - /// Gets or sets extended Info that provides data directory details. - /// Will be populated in two cases: + /// Gets or sets extended Info that provides data directory details. Will be + /// populated in two cases: /// When a specific recovery point is accessed using GetRecoveryPoint - /// Or when ListRecoveryPoints is called for Log RP only with - /// ExtendedInfo query filter + /// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + /// query filter /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureWorkloadSQLRecoveryPointExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureWorkloadSQLRecoveryPointExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPointExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPointExtendedInfo.cs index bfbfc0de635e..8cd55f45ffdf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPointExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPointExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadSQLRecoveryPointExtendedInfo { /// - /// Initializes a new instance of the - /// AzureWorkloadSQLRecoveryPointExtendedInfo class. + /// Initializes a new instance of the AzureWorkloadSQLRecoveryPointExtendedInfo class. /// public AzureWorkloadSQLRecoveryPointExtendedInfo() { @@ -30,17 +21,19 @@ public AzureWorkloadSQLRecoveryPointExtendedInfo() } /// - /// Initializes a new instance of the - /// AzureWorkloadSQLRecoveryPointExtendedInfo class. + /// Initializes a new instance of the AzureWorkloadSQLRecoveryPointExtendedInfo class. /// - /// UTC time at which data - /// directory info was captured - /// List of data directory paths - /// during restore operation. - public AzureWorkloadSQLRecoveryPointExtendedInfo(System.DateTime? dataDirectoryTimeInUTC = default(System.DateTime?), IList dataDirectoryPaths = default(IList)) + + /// UTC time at which data directory info was captured + /// + + /// List of data directory paths during restore operation. + /// + public AzureWorkloadSQLRecoveryPointExtendedInfo(System.DateTime? dataDirectoryTimeInUtc = default(System.DateTime?), System.Collections.Generic.IList dataDirectoryPaths = default(System.Collections.Generic.IList)) + { - DataDirectoryTimeInUTC = dataDirectoryTimeInUTC; - DataDirectoryPaths = dataDirectoryPaths; + this.DataDirectoryTimeInUtc = dataDirectoryTimeInUtc; + this.DataDirectoryPaths = dataDirectoryPaths; CustomInit(); } @@ -49,17 +42,17 @@ public AzureWorkloadSQLRecoveryPointExtendedInfo() /// partial void CustomInit(); + /// - /// Gets UTC time at which data directory info was captured + /// Gets uTC time at which data directory info was captured /// - [JsonProperty(PropertyName = "dataDirectoryTimeInUTC")] - public System.DateTime? DataDirectoryTimeInUTC { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataDirectoryTimeInUTC")] + public System.DateTime? DataDirectoryTimeInUtc {get; private set; } /// /// Gets list of data directory paths during restore operation. /// - [JsonProperty(PropertyName = "dataDirectoryPaths")] - public IList DataDirectoryPaths { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dataDirectoryPaths")] + public System.Collections.Generic.IList DataDirectoryPaths {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreRequest.cs index 874da30ac5d0..c67f56aaa3cf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class AzureWorkloadSQLRestoreRequest : AzureWorkloadRestoreRequest { /// - /// Initializes a new instance of the AzureWorkloadSQLRestoreRequest - /// class. + /// Initializes a new instance of the AzureWorkloadSQLRestoreRequest class. /// public AzureWorkloadSQLRestoreRequest() { @@ -31,36 +22,49 @@ public AzureWorkloadSQLRestoreRequest() } /// - /// Initializes a new instance of the AzureWorkloadSQLRestoreRequest - /// class. + /// Initializes a new instance of the AzureWorkloadSQLRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// Default option set - /// to true. If this is set to false, alternate data directory must be - /// provided - /// SQL specific property where user can - /// chose to set no-recovery when restore operation is tried - /// Data directory - /// details - public AzureWorkloadSQLRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), IList alternateDirectoryPaths = default(IList)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// Default option set to true. If this is set to false, alternate data + /// directory must be provided + /// + + /// SQL specific property where user can chose to set no-recovery when restore + /// operation is tried + /// + + /// Data directory details + /// + public AzureWorkloadSQLRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), System.Collections.Generic.IList alternateDirectoryPaths = default(System.Collections.Generic.IList)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) { - ShouldUseAlternateTargetLocation = shouldUseAlternateTargetLocation; - IsNonRecoverable = isNonRecoverable; - AlternateDirectoryPaths = alternateDirectoryPaths; + this.ShouldUseAlternateTargetLocation = shouldUseAlternateTargetLocation; + this.IsNonRecoverable = isNonRecoverable; + this.AlternateDirectoryPaths = alternateDirectoryPaths; CustomInit(); } @@ -69,25 +73,25 @@ public AzureWorkloadSQLRestoreRequest() /// partial void CustomInit(); + /// - /// Gets or sets default option set to true. If this is set to false, - /// alternate data directory must be provided + /// Gets or sets default option set to true. If this is set to false, alternate + /// data directory must be provided /// - [JsonProperty(PropertyName = "shouldUseAlternateTargetLocation")] - public bool? ShouldUseAlternateTargetLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "shouldUseAlternateTargetLocation")] + public bool? ShouldUseAlternateTargetLocation {get; set; } /// - /// Gets or sets SQL specific property where user can chose to set - /// no-recovery when restore operation is tried + /// Gets or sets sQL specific property where user can chose to set no-recovery + /// when restore operation is tried /// - [JsonProperty(PropertyName = "isNonRecoverable")] - public bool? IsNonRecoverable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isNonRecoverable")] + public bool? IsNonRecoverable {get; set; } /// /// Gets or sets data directory details /// - [JsonProperty(PropertyName = "alternateDirectoryPaths")] - public IList AlternateDirectoryPaths { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "alternateDirectoryPaths")] + public System.Collections.Generic.IList AlternateDirectoryPaths {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BEKDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BEKDetails.cs index 6da68a66f23a..591cee2b24fb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BEKDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BEKDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,21 @@ public BEKDetails() /// /// Initializes a new instance of the BEKDetails class. /// - /// Secret is BEK. - /// ID of the Key Vault where this Secret - /// is stored. - /// BEK data. + + /// Secret is BEK. + /// + + /// ID of the Key Vault where this Secret is stored. + /// + + /// BEK data. + /// public BEKDetails(string secretUrl = default(string), string secretVaultId = default(string), string secretData = default(string)) + { - SecretUrl = secretUrl; - SecretVaultId = secretVaultId; - SecretData = secretData; + this.SecretUrl = secretUrl; + this.SecretVaultId = secretVaultId; + this.SecretData = secretData; CustomInit(); } @@ -46,23 +46,23 @@ public BEKDetails() /// partial void CustomInit(); + /// /// Gets or sets secret is BEK. /// - [JsonProperty(PropertyName = "secretUrl")] - public string SecretUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secretUrl")] + public string SecretUrl {get; set; } /// - /// Gets or sets ID of the Key Vault where this Secret is stored. + /// Gets or sets iD of the Key Vault where this Secret is stored. /// - [JsonProperty(PropertyName = "secretVaultId")] - public string SecretVaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secretVaultId")] + public string SecretVaultId {get; set; } /// - /// Gets or sets BEK data. + /// Gets or sets bEK data. /// - [JsonProperty(PropertyName = "secretData")] - public string SecretData { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "secretData")] + public string SecretData {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSAADPropertiesQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSAADPropertiesQueryObject.cs index 02c5c5bb0ebc..e56c02cadc08 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSAADPropertiesQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSAADPropertiesQueryObject.cs @@ -1,43 +1,37 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// /// Filters to list backup items. /// - public partial class BMSAADPropertiesQueryObject + public partial class BmsaadPropertiesQueryObject { /// - /// Initializes a new instance of the BMSAADPropertiesQueryObject - /// class. + /// Initializes a new instance of the BmsaadPropertiesQueryObject class. /// - public BMSAADPropertiesQueryObject() + public BmsaadPropertiesQueryObject() { CustomInit(); } /// - /// Initializes a new instance of the BMSAADPropertiesQueryObject - /// class. + /// Initializes a new instance of the BmsaadPropertiesQueryObject class. /// - /// Backup management type for the - /// backed up item. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - public BMSAADPropertiesQueryObject(string backupManagementType = default(string)) + + /// Backup management type for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + public BmsaadPropertiesQueryObject(string backupManagementType = default(string)) + { - BackupManagementType = backupManagementType; + this.BackupManagementType = backupManagementType; CustomInit(); } @@ -46,14 +40,11 @@ public BMSAADPropertiesQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type for the backed up item. - /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSBackupSummariesQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSBackupSummariesQueryObject.cs index 8f07d8018724..fb4d8ebdea41 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSBackupSummariesQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSBackupSummariesQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class BMSBackupSummariesQueryObject { /// - /// Initializes a new instance of the BMSBackupSummariesQueryObject - /// class. + /// Initializes a new instance of the BMSBackupSummariesQueryObject class. /// public BMSBackupSummariesQueryObject() { @@ -28,16 +21,16 @@ public BMSBackupSummariesQueryObject() } /// - /// Initializes a new instance of the BMSBackupSummariesQueryObject - /// class. + /// Initializes a new instance of the BMSBackupSummariesQueryObject class. /// + /// Backup management type for this container. - /// Possible values include: 'Invalid', - /// 'BackupProtectedItemCountSummary', + /// Possible values include: 'Invalid', 'BackupProtectedItemCountSummary', /// 'BackupProtectionContainerCountSummary' public BMSBackupSummariesQueryObject(string type = default(string)) + { - Type = type; + this.Type = type; CustomInit(); } @@ -46,13 +39,11 @@ public BMSBackupSummariesQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type for this container. Possible - /// values include: 'Invalid', 'BackupProtectedItemCountSummary', - /// 'BackupProtectionContainerCountSummary' + /// Gets or sets backup management type for this container. Possible values include: 'Invalid', 'BackupProtectedItemCountSummary', 'BackupProtectionContainerCountSummary' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSRPQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSRPQueryObject.cs index 84ac5bb2d9a7..2f62b4f68bbb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSRPQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BMSRPQueryObject.cs @@ -1,52 +1,53 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// /// Filters to list backup copies. /// - public partial class BMSRPQueryObject + public partial class BmsrpQueryObject { /// - /// Initializes a new instance of the BMSRPQueryObject class. + /// Initializes a new instance of the BmsrpQueryObject class. /// - public BMSRPQueryObject() + public BmsrpQueryObject() { CustomInit(); } /// - /// Initializes a new instance of the BMSRPQueryObject class. + /// Initializes a new instance of the BmsrpQueryObject class. /// - /// Backup copies created after this - /// time. - /// Backup copies created before this - /// time. - /// RestorePoint type. Possible - /// values include: 'Invalid', 'Full', 'Log', 'Differential', + + /// Backup copies created after this time. + /// + + /// Backup copies created before this time. + /// + + /// RestorePoint type + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', /// 'FullAndDifferential', 'All', 'Incremental' - /// In Get Recovery Point, it tells whether - /// extended information about recovery point is asked. - /// Whether the RP can be moved to - /// another tier - public BMSRPQueryObject(System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), string restorePointQueryType = default(string), bool? extendedInfo = default(bool?), bool? moveReadyRPOnly = default(bool?)) + + /// In Get Recovery Point, it tells whether extended information about recovery + /// point is asked. + /// + + /// Whether the RP can be moved to another tier + /// + public BmsrpQueryObject(System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), string restorePointQueryType = default(string), bool? extendedInfo = default(bool?), bool? moveReadyRpOnly = default(bool?)) + { - StartDate = startDate; - EndDate = endDate; - RestorePointQueryType = restorePointQueryType; - ExtendedInfo = extendedInfo; - MoveReadyRPOnly = moveReadyRPOnly; + this.StartDate = startDate; + this.EndDate = endDate; + this.RestorePointQueryType = restorePointQueryType; + this.ExtendedInfo = extendedInfo; + this.MoveReadyRpOnly = moveReadyRpOnly; CustomInit(); } @@ -55,38 +56,36 @@ public BMSRPQueryObject() /// partial void CustomInit(); + /// /// Gets or sets backup copies created after this time. /// - [JsonProperty(PropertyName = "startDate")] - public System.DateTime? StartDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startDate")] + public System.DateTime? StartDate {get; set; } /// /// Gets or sets backup copies created before this time. /// - [JsonProperty(PropertyName = "endDate")] - public System.DateTime? EndDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endDate")] + public System.DateTime? EndDate {get; set; } /// - /// Gets or sets restorePoint type. Possible values include: 'Invalid', - /// 'Full', 'Log', 'Differential', 'FullAndDifferential', 'All', - /// 'Incremental' + /// Gets or sets restorePoint type Possible values include: 'Invalid', 'Full', 'Log', 'Differential', 'FullAndDifferential', 'All', 'Incremental' /// - [JsonProperty(PropertyName = "restorePointQueryType")] - public string RestorePointQueryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restorePointQueryType")] + public string RestorePointQueryType {get; set; } /// - /// Gets or sets in Get Recovery Point, it tells whether extended - /// information about recovery point is asked. + /// Gets or sets in Get Recovery Point, it tells whether extended information + /// about recovery point is asked. /// - [JsonProperty(PropertyName = "extendedInfo")] - public bool? ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public bool? ExtendedInfo {get; set; } /// /// Gets or sets whether the RP can be moved to another tier /// - [JsonProperty(PropertyName = "moveReadyRPOnly")] - public bool? MoveReadyRPOnly { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "moveReadyRPOnly")] + public bool? MoveReadyRpOnly {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupManagementType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupManagementType.cs index 9db829a9a8af..4fd98d0d677f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupManagementType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupManagementType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for BackupManagementType. /// + + public static class BackupManagementType { public const string Invalid = "Invalid"; @@ -26,4 +23,4 @@ public static class BackupManagementType public const string AzureWorkload = "AzureWorkload"; public const string DefaultBackup = "DefaultBackup"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupManagementUsage.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupManagementUsage.cs index 7748ee5428bd..4d860e06faef 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupManagementUsage.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupManagementUsage.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,22 +23,34 @@ public BackupManagementUsage() /// /// Initializes a new instance of the BackupManagementUsage class. /// - /// Unit of the usage. Possible values include: - /// 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', - /// 'BytesPerSecond' - /// Quota period of usage. - /// Next reset time of usage. - /// Current value of usage. - /// Limit of usage. - /// Name of usage. + + /// Unit of the usage. + /// Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + /// 'CountPerSecond', 'BytesPerSecond' + + /// Quota period of usage. + /// + + /// Next reset time of usage. + /// + + /// Current value of usage. + /// + + /// Limit of usage. + /// + + /// Name of usage. + /// public BackupManagementUsage(string unit = default(string), string quotaPeriod = default(string), System.DateTime? nextResetTime = default(System.DateTime?), long? currentValue = default(long?), long? limit = default(long?), NameInfo name = default(NameInfo)) + { - Unit = unit; - QuotaPeriod = quotaPeriod; - NextResetTime = nextResetTime; - CurrentValue = currentValue; - Limit = limit; - Name = name; + this.Unit = unit; + this.QuotaPeriod = quotaPeriod; + this.NextResetTime = nextResetTime; + this.CurrentValue = currentValue; + this.Limit = limit; + this.Name = name; CustomInit(); } @@ -53,42 +59,41 @@ public BackupManagementUsage() /// partial void CustomInit(); + /// - /// Gets or sets unit of the usage. Possible values include: 'Count', - /// 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + /// Gets or sets unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' /// - [JsonProperty(PropertyName = "unit")] - public string Unit { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "unit")] + public string Unit {get; set; } /// /// Gets or sets quota period of usage. /// - [JsonProperty(PropertyName = "quotaPeriod")] - public string QuotaPeriod { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "quotaPeriod")] + public string QuotaPeriod {get; set; } /// /// Gets or sets next reset time of usage. /// - [JsonProperty(PropertyName = "nextResetTime")] - public System.DateTime? NextResetTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nextResetTime")] + public System.DateTime? NextResetTime {get; set; } /// /// Gets or sets current value of usage. /// - [JsonProperty(PropertyName = "currentValue")] - public long? CurrentValue { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "currentValue")] + public long? CurrentValue {get; set; } /// /// Gets or sets limit of usage. /// - [JsonProperty(PropertyName = "limit")] - public long? Limit { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "limit")] + public long? Limit {get; set; } /// /// Gets or sets name of usage. /// - [JsonProperty(PropertyName = "name")] - public NameInfo Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public NameInfo Name {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupResourceConfig.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupResourceConfig.cs index fa51830f9e3f..358f7be2ec23 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupResourceConfig.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupResourceConfig.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,24 +23,28 @@ public BackupResourceConfig() /// /// Initializes a new instance of the BackupResourceConfig class. /// - /// Storage type. Possible values - /// include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + + /// Storage type + /// Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + /// 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' + + /// Storage type. + /// Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', /// 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' - /// Storage type. Possible values include: - /// 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', - /// 'ReadAccessGeoZoneRedundant' - /// Locked or Unlocked. Once a machine - /// is registered against a resource, the storageTypeState is always - /// Locked. Possible values include: 'Invalid', 'Locked', - /// 'Unlocked' - /// Opt in details of Cross Region - /// Restore feature. + + /// Locked or Unlocked. Once a machine is registered against a resource, the + /// storageTypeState is always Locked. + /// Possible values include: 'Invalid', 'Locked', 'Unlocked' + + /// Opt in details of Cross Region Restore feature. + /// public BackupResourceConfig(string storageModelType = default(string), string storageType = default(string), string storageTypeState = default(string), bool? crossRegionRestoreFlag = default(bool?)) + { - StorageModelType = storageModelType; - StorageType = storageType; - StorageTypeState = storageTypeState; - CrossRegionRestoreFlag = crossRegionRestoreFlag; + this.StorageModelType = storageModelType; + this.StorageType = storageType; + this.StorageTypeState = storageTypeState; + this.CrossRegionRestoreFlag = crossRegionRestoreFlag; CustomInit(); } @@ -55,35 +53,30 @@ public BackupResourceConfig() /// partial void CustomInit(); + /// - /// Gets or sets storage type. Possible values include: 'Invalid', - /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', - /// 'ReadAccessGeoZoneRedundant' + /// Gets or sets storage type Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' /// - [JsonProperty(PropertyName = "storageModelType")] - public string StorageModelType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageModelType")] + public string StorageModelType {get; set; } /// - /// Gets or sets storage type. Possible values include: 'Invalid', - /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', - /// 'ReadAccessGeoZoneRedundant' + /// Gets or sets storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' /// - [JsonProperty(PropertyName = "storageType")] - public string StorageType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "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' + /// 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 = "storageTypeState")] - public string StorageTypeState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageTypeState")] + public string StorageTypeState {get; set; } /// /// Gets or sets opt in details of Cross Region Restore feature. /// - [JsonProperty(PropertyName = "crossRegionRestoreFlag")] - public bool? CrossRegionRestoreFlag { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "crossRegionRestoreFlag")] + public bool? CrossRegionRestoreFlag {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupResourceConfigResource.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupResourceConfigResource.cs index e1f84c984c05..716cc30fd30f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupResourceConfigResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/BackupResourceConfigResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class BackupResourceConfigResource : Resource { /// - /// Initializes a new instance of the BackupResourceConfigResource - /// class. + /// Initializes a new instance of the BackupResourceConfigResource class. /// public BackupResourceConfigResource() { @@ -30,24 +21,35 @@ public BackupResourceConfigResource() } /// - /// Initializes a new instance of the BackupResourceConfigResource - /// class. + /// Initializes a new instance of the BackupResourceConfigResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// BackupResourceConfigResource - /// properties - public BackupResourceConfigResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), BackupResourceConfig properties = default(BackupResourceConfig)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// BackupResourceConfigResource properties + /// + public BackupResourceConfigResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), BackupResourceConfig properties = default(BackupResourceConfig)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -56,11 +58,11 @@ public BackupResourceConfigResource() /// partial void CustomInit(); + /// /// Gets or sets backupResourceConfigResource properties /// - [JsonProperty(PropertyName = "properties")] - public BackupResourceConfig Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public BackupResourceConfig Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ClientScriptForConnect.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ClientScriptForConnect.cs index 19bef9a6c7e3..dda591874128 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ClientScriptForConnect.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ClientScriptForConnect.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,25 +23,34 @@ public ClientScriptForConnect() /// /// Initializes a new instance of the ClientScriptForConnect class. /// - /// File content of the client script for - /// file / folder restore. - /// File extension of the client script - /// for file / folder restore - .ps1 , .sh , etc. - /// OS type - Windows, Linux etc. for which this - /// file / folder restore client script works. - /// URL of Executable from where to source the - /// content. If this is not null then ScriptContent should not be - /// used - /// Mandatory suffix that should be - /// added to the name of script that is given for download to user. - /// If its null or empty then , ignore it. + + /// File content of the client script for file / folder restore. + /// + + /// File extension of the client script for file / folder restore - .ps1 , .sh + /// , etc. + /// + + /// OS type - Windows, Linux etc. for which this file / folder restore client + /// script works. + /// + + /// URL of Executable from where to source the content. If this is not null + /// then ScriptContent should not be used + /// + + /// Mandatory suffix that should be added to the name of script that is given + /// for download to user. + /// If its null or empty then , ignore it. + /// public ClientScriptForConnect(string scriptContent = default(string), string scriptExtension = default(string), string osType = default(string), string url = default(string), string scriptNameSuffix = default(string)) + { - ScriptContent = scriptContent; - ScriptExtension = scriptExtension; - OsType = osType; - Url = url; - ScriptNameSuffix = scriptNameSuffix; + this.ScriptContent = scriptContent; + this.ScriptExtension = scriptExtension; + this.OSType = osType; + this.Url = url; + this.ScriptNameSuffix = scriptNameSuffix; CustomInit(); } @@ -56,41 +59,40 @@ public ClientScriptForConnect() /// partial void CustomInit(); + /// - /// Gets or sets file content of the client script for file / folder - /// restore. + /// Gets or sets file content of the client script for file / folder restore. /// - [JsonProperty(PropertyName = "scriptContent")] - public string ScriptContent { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scriptContent")] + public string ScriptContent {get; set; } /// - /// Gets or sets file extension of the client script for file / folder - /// restore - .ps1 , .sh , etc. + /// Gets or sets file extension of the client script for file / folder restore + /// - .ps1 , .sh , etc. /// - [JsonProperty(PropertyName = "scriptExtension")] - public string ScriptExtension { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scriptExtension")] + public string ScriptExtension {get; set; } /// - /// Gets or sets OS type - Windows, Linux etc. for which this file / - /// folder restore client script works. + /// Gets or sets oS type - Windows, Linux etc. for which this file / folder + /// restore client script works. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// - /// Gets or sets URL of Executable from where to source the content. If - /// this is not null then ScriptContent should not be used + /// Gets or sets uRL of Executable from where to source the content. If this is + /// not null then ScriptContent should not be used /// - [JsonProperty(PropertyName = "url")] - public string Url { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "url")] + public string Url {get; set; } /// - /// Gets or sets mandatory suffix that should be added to the name of - /// script that is given for download to user. + /// Gets or sets mandatory suffix that should be added to the name of script + /// that is given for download to user. /// If its null or empty then , ignore it. /// - [JsonProperty(PropertyName = "scriptNameSuffix")] - public string ScriptNameSuffix { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "scriptNameSuffix")] + public string ScriptNameSuffix {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CopyOptions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CopyOptions.cs index ae5812eaed3a..561277d77700 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CopyOptions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CopyOptions.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for CopyOptions. /// + + public static class CopyOptions { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class CopyOptions public const string Overwrite = "Overwrite"; public const string FailOnConflict = "FailOnConflict"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CreateMode.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CreateMode.cs index 2196dbc0dd18..9dfeb409470e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CreateMode.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CreateMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for CreateMode. /// + + public static class CreateMode { public const string Invalid = "Invalid"; public const string Default = "Default"; public const string Recover = "Recover"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrossRegionRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrossRegionRestoreRequest.cs index fde92cabfe97..89b3dc3b758e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrossRegionRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrossRegionRestoreRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; public partial class CrossRegionRestoreRequest @@ -26,14 +20,17 @@ public CrossRegionRestoreRequest() /// /// Initializes a new instance of the CrossRegionRestoreRequest class. /// - /// Access details for - /// cross region restore - /// Request object for triggering - /// restore + + /// Access details for cross region restore + /// + + /// Request object for triggering restore + /// public CrossRegionRestoreRequest(CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest)) + { - CrossRegionRestoreAccessDetails = crossRegionRestoreAccessDetails; - RestoreRequest = restoreRequest; + this.CrossRegionRestoreAccessDetails = crossRegionRestoreAccessDetails; + this.RestoreRequest = restoreRequest; CustomInit(); } @@ -42,17 +39,17 @@ public CrossRegionRestoreRequest() /// partial void CustomInit(); + /// /// Gets or sets access details for cross region restore /// - [JsonProperty(PropertyName = "crossRegionRestoreAccessDetails")] - public CrrAccessToken CrossRegionRestoreAccessDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crossRegionRestoreAccessDetails")] + public CrrAccessToken CrossRegionRestoreAccessDetails {get; set; } /// /// Gets or sets request object for triggering restore /// - [JsonProperty(PropertyName = "restoreRequest")] - public RestoreRequest RestoreRequest { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreRequest")] + public RestoreRequest RestoreRequest {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrossRegionRestoreRequestResource.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrossRegionRestoreRequestResource.cs index d9c03b6a7f5a..7c86e7fe9e6e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrossRegionRestoreRequestResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrossRegionRestoreRequestResource.cs @@ -1,25 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class CrossRegionRestoreRequestResource : Resource { /// - /// Initializes a new instance of the CrossRegionRestoreRequestResource - /// class. + /// Initializes a new instance of the CrossRegionRestoreRequestResource class. /// public CrossRegionRestoreRequestResource() { @@ -27,24 +18,35 @@ public CrossRegionRestoreRequestResource() } /// - /// Initializes a new instance of the CrossRegionRestoreRequestResource - /// class. + /// Initializes a new instance of the CrossRegionRestoreRequestResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// CrossRegionRestoreRequestResource - /// properties - public CrossRegionRestoreRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), CrossRegionRestoreRequest properties = default(CrossRegionRestoreRequest)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// CrossRegionRestoreRequestResource properties + /// + public CrossRegionRestoreRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), CrossRegionRestoreRequest properties = default(CrossRegionRestoreRequest)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -53,11 +55,11 @@ public CrossRegionRestoreRequestResource() /// partial void CustomInit(); + /// /// Gets or sets crossRegionRestoreRequestResource properties /// - [JsonProperty(PropertyName = "properties")] - public CrossRegionRestoreRequest Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CrossRegionRestoreRequest Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrAccessToken.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrAccessToken.cs index 6fc64657e74e..cd88558a0f7f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrAccessToken.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrAccessToken.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; [Newtonsoft.Json.JsonObject("CrrAccessToken")] @@ -29,74 +21,109 @@ public CrrAccessToken() /// /// Initializes a new instance of the CrrAccessToken class. /// - /// Access token used for - /// authentication - /// Subscription Id of the source - /// vault - /// Resource Group name of the source - /// vault - /// Resource Name of the source - /// vault - /// Resource Id of the source vault - /// Protected item container - /// id - /// Recovery Point Id - /// Recovery Point Time - /// Container Unique name - /// Container Type - /// Backup Management Type - /// Datasource Type - /// Datasource Friendly Name - /// Datasource Id - /// Datasource Container Unique - /// Name - /// CoordinatorServiceStampId - /// to be used by BCM in restore call - /// CoordinatorServiceStampUri - /// to be used by BCM in restore call - /// ProtectionServiceStampId to - /// be used by BCM in restore call - /// ProtectionServiceStampUri - /// to be used by BCM in restore call - /// Extended Information about - /// the token like FileSpec etc. - /// Recovery point Tier - /// Information - /// Recovery point information: - /// Original SA option - /// Recovery point information: - /// Managed virtual machine - /// Recovery point information: VM - /// size description - /// Active region name of BMS - /// Stamp - public CrrAccessToken(string accessTokenString = default(string), string subscriptionId = default(string), string resourceGroupName = default(string), string resourceName = default(string), string resourceId = default(string), long? protectionContainerId = default(long?), string recoveryPointId = default(string), string recoveryPointTime = default(string), string containerName = default(string), string containerType = default(string), string backupManagementType = default(string), string datasourceType = default(string), string datasourceName = default(string), string datasourceId = default(string), string datasourceContainerName = default(string), string coordinatorServiceStampId = default(string), string coordinatorServiceStampUri = default(string), string protectionServiceStampId = default(string), string protectionServiceStampUri = default(string), string tokenExtendedInformation = default(string), IDictionary rpTierInformation = default(IDictionary), bool? rpOriginalSAOption = default(bool?), bool? rpIsManagedVirtualMachine = default(bool?), string rpVMSizeDescription = default(string), string bMSActiveRegion = default(string)) + + /// Access token used for authentication + /// + + /// Subscription Id of the source vault + /// + + /// Resource Group name of the source vault + /// + + /// Resource Name of the source vault + /// + + /// Resource Id of the source vault + /// + + /// Protected item container id + /// + + /// Recovery Point Id + /// + + /// Recovery Point Time + /// + + /// Container Unique name + /// + + /// Container Type + /// + + /// Backup Management Type + /// + + /// Datasource Type + /// + + /// Datasource Friendly Name + /// + + /// Datasource Id + /// + + /// Datasource Container Unique Name + /// + + /// CoordinatorServiceStampId to be used by BCM in restore call + /// + + /// CoordinatorServiceStampUri to be used by BCM in restore call + /// + + /// ProtectionServiceStampId to be used by BCM in restore call + /// + + /// ProtectionServiceStampUri to be used by BCM in restore call + /// + + /// Extended Information about the token like FileSpec etc. + /// + + /// Recovery point Tier Information + /// + + /// Recovery point information: Original SA option + /// + + /// Recovery point information: Managed virtual machine + /// + + /// Recovery point information: VM size description + /// + + /// Active region name of BMS Stamp + /// + public CrrAccessToken(string accessTokenString = default(string), string subscriptionId = default(string), string resourceGroupName = default(string), string resourceName = default(string), string resourceId = default(string), long? protectionContainerId = default(long?), string recoveryPointId = default(string), string recoveryPointTime = default(string), string containerName = default(string), string containerType = default(string), string backupManagementType = default(string), string datasourceType = default(string), string datasourceName = default(string), string datasourceId = default(string), string datasourceContainerName = default(string), string coordinatorServiceStampId = default(string), string coordinatorServiceStampUri = default(string), string protectionServiceStampId = default(string), string protectionServiceStampUri = default(string), string tokenExtendedInformation = default(string), System.Collections.Generic.IDictionary rpTierInformation = default(System.Collections.Generic.IDictionary), bool? rpOriginalSaOption = default(bool?), bool? rpIsManagedVirtualMachine = default(bool?), string rpVMSizeDescription = default(string), string bmsActiveRegion = default(string)) + { - AccessTokenString = accessTokenString; - SubscriptionId = subscriptionId; - ResourceGroupName = resourceGroupName; - ResourceName = resourceName; - ResourceId = resourceId; - ProtectionContainerId = protectionContainerId; - RecoveryPointId = recoveryPointId; - RecoveryPointTime = recoveryPointTime; - ContainerName = containerName; - ContainerType = containerType; - BackupManagementType = backupManagementType; - DatasourceType = datasourceType; - DatasourceName = datasourceName; - DatasourceId = datasourceId; - DatasourceContainerName = datasourceContainerName; - CoordinatorServiceStampId = coordinatorServiceStampId; - CoordinatorServiceStampUri = coordinatorServiceStampUri; - ProtectionServiceStampId = protectionServiceStampId; - ProtectionServiceStampUri = protectionServiceStampUri; - TokenExtendedInformation = tokenExtendedInformation; - RpTierInformation = rpTierInformation; - RpOriginalSAOption = rpOriginalSAOption; - RpIsManagedVirtualMachine = rpIsManagedVirtualMachine; - RpVMSizeDescription = rpVMSizeDescription; - BMSActiveRegion = bMSActiveRegion; + this.AccessTokenString = accessTokenString; + this.SubscriptionId = subscriptionId; + this.ResourceGroupName = resourceGroupName; + this.ResourceName = resourceName; + this.ResourceId = resourceId; + this.ProtectionContainerId = protectionContainerId; + this.RecoveryPointId = recoveryPointId; + this.RecoveryPointTime = recoveryPointTime; + this.ContainerName = containerName; + this.ContainerType = containerType; + this.BackupManagementType = backupManagementType; + this.DatasourceType = datasourceType; + this.DatasourceName = datasourceName; + this.DatasourceId = datasourceId; + this.DatasourceContainerName = datasourceContainerName; + this.CoordinatorServiceStampId = coordinatorServiceStampId; + this.CoordinatorServiceStampUri = coordinatorServiceStampUri; + this.ProtectionServiceStampId = protectionServiceStampId; + this.ProtectionServiceStampUri = protectionServiceStampUri; + this.TokenExtendedInformation = tokenExtendedInformation; + this.RpTierInformation = rpTierInformation; + this.RpOriginalSaOption = rpOriginalSaOption; + this.RpIsManagedVirtualMachine = rpIsManagedVirtualMachine; + this.RpVMSizeDescription = rpVMSizeDescription; + this.BMSActiveRegion = bmsActiveRegion; CustomInit(); } @@ -105,160 +132,155 @@ public CrrAccessToken() /// partial void CustomInit(); + /// /// Gets or sets access token used for authentication /// - [JsonProperty(PropertyName = "accessTokenString")] - public string AccessTokenString { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "accessTokenString")] + public string AccessTokenString {get; set; } /// /// Gets or sets subscription Id of the source vault /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId {get; set; } /// /// Gets or sets resource Group name of the source vault /// - [JsonProperty(PropertyName = "resourceGroupName")] - public string ResourceGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGroupName")] + public string ResourceGroupName {get; set; } /// /// Gets or sets resource Name of the source vault /// - [JsonProperty(PropertyName = "resourceName")] - public string ResourceName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceName")] + public string ResourceName {get; set; } /// /// Gets or sets resource Id of the source vault /// - [JsonProperty(PropertyName = "resourceId")] - public string ResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceId")] + public string ResourceId {get; set; } /// /// Gets or sets protected item container id /// - [JsonProperty(PropertyName = "protectionContainerId")] - public long? ProtectionContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionContainerId")] + public long? ProtectionContainerId {get; set; } /// /// Gets or sets recovery Point Id /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// /// Gets or sets recovery Point Time /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public string RecoveryPointTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public string RecoveryPointTime {get; set; } /// /// Gets or sets container Unique name /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets container Type /// - [JsonProperty(PropertyName = "containerType")] - public string ContainerType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerType")] + public string ContainerType {get; set; } /// /// Gets or sets backup Management Type /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// /// Gets or sets datasource Type /// - [JsonProperty(PropertyName = "datasourceType")] - public string DatasourceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datasourceType")] + public string DatasourceType {get; set; } /// /// Gets or sets datasource Friendly Name /// - [JsonProperty(PropertyName = "datasourceName")] - public string DatasourceName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datasourceName")] + public string DatasourceName {get; set; } /// /// Gets or sets datasource Id /// - [JsonProperty(PropertyName = "datasourceId")] - public string DatasourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datasourceId")] + public string DatasourceId {get; set; } /// /// Gets or sets datasource Container Unique Name /// - [JsonProperty(PropertyName = "datasourceContainerName")] - public string DatasourceContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datasourceContainerName")] + public string DatasourceContainerName {get; set; } /// - /// Gets or sets coordinatorServiceStampId to be used by BCM in restore - /// call + /// Gets or sets coordinatorServiceStampId to be used by BCM in restore call /// - [JsonProperty(PropertyName = "coordinatorServiceStampId")] - public string CoordinatorServiceStampId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "coordinatorServiceStampId")] + public string CoordinatorServiceStampId {get; set; } /// - /// Gets or sets coordinatorServiceStampUri to be used by BCM in - /// restore call + /// Gets or sets coordinatorServiceStampUri to be used by BCM in restore call /// - [JsonProperty(PropertyName = "coordinatorServiceStampUri")] - public string CoordinatorServiceStampUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "coordinatorServiceStampUri")] + public string CoordinatorServiceStampUri {get; set; } /// - /// Gets or sets protectionServiceStampId to be used by BCM in restore - /// call + /// Gets or sets protectionServiceStampId to be used by BCM in restore call /// - [JsonProperty(PropertyName = "protectionServiceStampId")] - public string ProtectionServiceStampId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionServiceStampId")] + public string ProtectionServiceStampId {get; set; } /// - /// Gets or sets protectionServiceStampUri to be used by BCM in restore - /// call + /// Gets or sets protectionServiceStampUri to be used by BCM in restore call /// - [JsonProperty(PropertyName = "protectionServiceStampUri")] - public string ProtectionServiceStampUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionServiceStampUri")] + public string ProtectionServiceStampUri {get; set; } /// - /// Gets or sets extended Information about the token like FileSpec - /// etc. + /// Gets or sets extended Information about the token like FileSpec etc. /// - [JsonProperty(PropertyName = "tokenExtendedInformation")] - public string TokenExtendedInformation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tokenExtendedInformation")] + public string TokenExtendedInformation {get; set; } /// /// Gets or sets recovery point Tier Information /// - [JsonProperty(PropertyName = "rpTierInformation")] - public IDictionary RpTierInformation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpTierInformation")] + public System.Collections.Generic.IDictionary RpTierInformation {get; set; } /// /// Gets or sets recovery point information: Original SA option /// - [JsonProperty(PropertyName = "rpOriginalSAOption")] - public bool? RpOriginalSAOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpOriginalSAOption")] + public bool? RpOriginalSaOption {get; set; } /// /// Gets or sets recovery point information: Managed virtual machine /// - [JsonProperty(PropertyName = "rpIsManagedVirtualMachine")] - public bool? RpIsManagedVirtualMachine { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpIsManagedVirtualMachine")] + public bool? RpIsManagedVirtualMachine {get; set; } /// /// Gets or sets recovery point information: VM size description /// - [JsonProperty(PropertyName = "rpVMSizeDescription")] - public string RpVMSizeDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpVMSizeDescription")] + public string RpVMSizeDescription {get; set; } /// /// Gets or sets active region name of BMS Stamp /// - [JsonProperty(PropertyName = "bMSActiveRegion")] - public string BMSActiveRegion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "bMSActiveRegion")] + public string BMSActiveRegion {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrAccessTokenResource.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrAccessTokenResource.cs index f4039f8aebb7..8d8eac7ac2cc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrAccessTokenResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrAccessTokenResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class CrrAccessTokenResource : Resource @@ -28,20 +20,33 @@ public CrrAccessTokenResource() /// /// Initializes a new instance of the CrrAccessTokenResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// CrrAccessTokenResource properties - public CrrAccessTokenResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), CrrAccessToken properties = default(CrrAccessToken)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// CrrAccessTokenResource properties + /// + public CrrAccessTokenResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), CrrAccessToken properties = default(CrrAccessToken)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -50,11 +55,11 @@ public CrrAccessTokenResource() /// partial void CustomInit(); + /// /// Gets or sets crrAccessTokenResource properties /// - [JsonProperty(PropertyName = "properties")] - public CrrAccessToken Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CrrAccessToken Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrJobRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrJobRequest.cs index 747a14184aa9..47c2936786ca 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrJobRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrJobRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public CrrJobRequest() /// /// Initializes a new instance of the CrrJobRequest class. /// - /// Entire ARM resource id of the - /// resource - /// Job Name of the job to be fetched + + /// Entire ARM resource id of the resource + /// + + /// Job Name of the job to be fetched + /// public CrrJobRequest(string resourceId = default(string), string jobName = default(string)) + { - ResourceId = resourceId; - JobName = jobName; + this.ResourceId = resourceId; + this.JobName = jobName; CustomInit(); } @@ -44,17 +42,17 @@ public CrrJobRequest() /// partial void CustomInit(); + /// /// Gets or sets entire ARM resource id of the resource /// - [JsonProperty(PropertyName = "resourceId")] - public string ResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceId")] + public string ResourceId {get; set; } /// /// Gets or sets job Name of the job to be fetched /// - [JsonProperty(PropertyName = "jobName")] - public string JobName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "jobName")] + public string JobName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrJobRequestResource.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrJobRequestResource.cs index a4a154dc4ee0..97684bceea28 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrJobRequestResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/CrrJobRequestResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,20 +23,33 @@ public CrrJobRequestResource() /// /// Initializes a new instance of the CrrJobRequestResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// CrrJobRequestResource properties - public CrrJobRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), CrrJobRequest properties = default(CrrJobRequest)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// CrrJobRequestResource properties + /// + public CrrJobRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), CrrJobRequest properties = default(CrrJobRequest)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -53,11 +58,11 @@ public CrrJobRequestResource() /// partial void CustomInit(); + /// /// Gets or sets crrJobRequestResource properties /// - [JsonProperty(PropertyName = "properties")] - public CrrJobRequest Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CrrJobRequest Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DPMProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DPMProtectedItem.cs index 28d28275d3d5..86d0139eebb6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DPMProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DPMProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,57 +24,77 @@ public DPMProtectedItem() /// /// Initializes a new instance of the DPMProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the managed - /// item - /// Backup Management server protecting - /// this backup item - /// Protection state of the backup - /// engine. Possible values include: 'Invalid', 'IRPending', - /// 'Protected', 'ProtectionError', 'ProtectionStopped', - /// 'ProtectionPaused' - /// Extended info of the backup - /// item. - public DPMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string backupEngineName = default(string), string protectionState = default(string), DPMProtectedItemExtendedInfo extendedInfo = default(DPMProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the managed item + /// + + /// Backup Management server protecting this backup item + /// + + /// Protection state of the backup engine + /// Possible values include: 'Invalid', 'IRPending', 'Protected', + /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' + + /// Extended info of the backup item. + /// + public DPMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string backupEngineName = default(string), string protectionState = default(string), DPMProtectedItemExtendedInfo extendedInfo = default(DPMProtectedItemExtendedInfo)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { - FriendlyName = friendlyName; - BackupEngineName = backupEngineName; - ProtectionState = protectionState; - ExtendedInfo = extendedInfo; + this.FriendlyName = friendlyName; + this.BackupEngineName = backupEngineName; + this.ProtectionState = protectionState; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -91,31 +103,29 @@ public DPMProtectedItem() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the managed item /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets backup Management server protecting this backup item /// - [JsonProperty(PropertyName = "backupEngineName")] - public string BackupEngineName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupEngineName")] + public string BackupEngineName {get; set; } /// - /// Gets or sets protection state of the backup engine. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused' + /// Gets or sets protection state of the backup engine Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// /// Gets or sets extended info of the backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public DPMProtectedItemExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public DPMProtectedItemExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DPMProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DPMProtectedItemExtendedInfo.cs index 33595342d0bb..b05582b7f06f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DPMProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DPMProtectedItemExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class DPMProtectedItemExtendedInfo { /// - /// Initializes a new instance of the DPMProtectedItemExtendedInfo - /// class. + /// Initializes a new instance of the DPMProtectedItemExtendedInfo class. /// public DPMProtectedItemExtendedInfo() { @@ -30,53 +21,67 @@ public DPMProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the DPMProtectedItemExtendedInfo - /// class. - /// - /// Attribute to provide - /// information on various DBs. - /// To check if backup item is disk - /// protected. - /// To check if backup item is cloud - /// protected. - /// Last backup status information on - /// backup item. - /// Last refresh time on backup - /// item. - /// Oldest cloud recovery point - /// time. - /// cloud recovery point - /// count. - /// Oldest disk recovery - /// point time. - /// latest disk recovery - /// point time. - /// disk recovery point - /// count. - /// To check if backup item is - /// collocated. - /// Protection group name of the - /// backup item. - /// Used Disk storage in - /// bytes. - /// total Disk storage in - /// bytes. - public DPMProtectedItemExtendedInfo(IDictionary protectableObjectLoadPath = default(IDictionary), bool? protectedProperty = default(bool?), bool? isPresentOnCloud = default(bool?), string lastBackupStatus = default(string), System.DateTime? lastRefreshedAt = default(System.DateTime?), System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), System.DateTime? onPremiseOldestRecoveryPoint = default(System.DateTime?), System.DateTime? onPremiseLatestRecoveryPoint = default(System.DateTime?), int? onPremiseRecoveryPointCount = default(int?), bool? isCollocated = default(bool?), string protectionGroupName = default(string), string diskStorageUsedInBytes = default(string), string totalDiskStorageSizeInBytes = default(string)) + /// Initializes a new instance of the DPMProtectedItemExtendedInfo class. + /// + + /// Attribute to provide information on various DBs. + /// + + /// To check if backup item is disk protected. + /// + + /// To check if backup item is cloud protected. + /// + + /// Last backup status information on backup item. + /// + + /// Last refresh time on backup item. + /// + + /// Oldest cloud recovery point time. + /// + + /// cloud recovery point count. + /// + + /// Oldest disk recovery point time. + /// + + /// latest disk recovery point time. + /// + + /// disk recovery point count. + /// + + /// To check if backup item is collocated. + /// + + /// Protection group name of the backup item. + /// + + /// Used Disk storage in bytes. + /// + + /// total Disk storage in bytes. + /// + public DPMProtectedItemExtendedInfo(System.Collections.Generic.IDictionary protectableObjectLoadPath = default(System.Collections.Generic.IDictionary), bool? protectedProperty = default(bool?), bool? isPresentOnCloud = default(bool?), string lastBackupStatus = default(string), System.DateTime? lastRefreshedAt = default(System.DateTime?), System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), System.DateTime? onPremiseOldestRecoveryPoint = default(System.DateTime?), System.DateTime? onPremiseLatestRecoveryPoint = default(System.DateTime?), int? onPremiseRecoveryPointCount = default(int?), bool? isCollocated = default(bool?), string protectionGroupName = default(string), string diskStorageUsedInBytes = default(string), string totalDiskStorageSizeInBytes = default(string)) + { - ProtectableObjectLoadPath = protectableObjectLoadPath; - ProtectedProperty = protectedProperty; - IsPresentOnCloud = isPresentOnCloud; - LastBackupStatus = lastBackupStatus; - LastRefreshedAt = lastRefreshedAt; - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; - OnPremiseOldestRecoveryPoint = onPremiseOldestRecoveryPoint; - OnPremiseLatestRecoveryPoint = onPremiseLatestRecoveryPoint; - OnPremiseRecoveryPointCount = onPremiseRecoveryPointCount; - IsCollocated = isCollocated; - ProtectionGroupName = protectionGroupName; - DiskStorageUsedInBytes = diskStorageUsedInBytes; - TotalDiskStorageSizeInBytes = totalDiskStorageSizeInBytes; + this.ProtectableObjectLoadPath = protectableObjectLoadPath; + this.ProtectedProperty = protectedProperty; + this.IsPresentOnCloud = isPresentOnCloud; + this.LastBackupStatus = lastBackupStatus; + this.LastRefreshedAt = lastRefreshedAt; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; + this.OnPremiseOldestRecoveryPoint = onPremiseOldestRecoveryPoint; + this.OnPremiseLatestRecoveryPoint = onPremiseLatestRecoveryPoint; + this.OnPremiseRecoveryPointCount = onPremiseRecoveryPointCount; + this.IsCollocated = isCollocated; + this.ProtectionGroupName = protectionGroupName; + this.DiskStorageUsedInBytes = diskStorageUsedInBytes; + this.TotalDiskStorageSizeInBytes = totalDiskStorageSizeInBytes; CustomInit(); } @@ -85,89 +90,89 @@ public DPMProtectedItemExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets attribute to provide information on various DBs. /// - [JsonProperty(PropertyName = "protectableObjectLoadPath")] - public IDictionary ProtectableObjectLoadPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableObjectLoadPath")] + public System.Collections.Generic.IDictionary ProtectableObjectLoadPath {get; set; } /// /// Gets or sets to check if backup item is disk protected. /// - [JsonProperty(PropertyName = "protected")] - public bool? ProtectedProperty { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protected")] + public bool? ProtectedProperty {get; set; } /// /// Gets or sets to check if backup item is cloud protected. /// - [JsonProperty(PropertyName = "isPresentOnCloud")] - public bool? IsPresentOnCloud { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isPresentOnCloud")] + public bool? IsPresentOnCloud {get; set; } /// /// Gets or sets last backup status information on backup item. /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// /// Gets or sets last refresh time on backup item. /// - [JsonProperty(PropertyName = "lastRefreshedAt")] - public System.DateTime? LastRefreshedAt { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRefreshedAt")] + public System.DateTime? LastRefreshedAt {get; set; } /// /// Gets or sets oldest cloud recovery point time. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// /// Gets or sets cloud recovery point count. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } /// /// Gets or sets oldest disk recovery point time. /// - [JsonProperty(PropertyName = "onPremiseOldestRecoveryPoint")] - public System.DateTime? OnPremiseOldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onPremiseOldestRecoveryPoint")] + public System.DateTime? OnPremiseOldestRecoveryPoint {get; set; } /// /// Gets or sets latest disk recovery point time. /// - [JsonProperty(PropertyName = "onPremiseLatestRecoveryPoint")] - public System.DateTime? OnPremiseLatestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onPremiseLatestRecoveryPoint")] + public System.DateTime? OnPremiseLatestRecoveryPoint {get; set; } /// /// Gets or sets disk recovery point count. /// - [JsonProperty(PropertyName = "onPremiseRecoveryPointCount")] - public int? OnPremiseRecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onPremiseRecoveryPointCount")] + public int? OnPremiseRecoveryPointCount {get; set; } /// /// Gets or sets to check if backup item is collocated. /// - [JsonProperty(PropertyName = "isCollocated")] - public bool? IsCollocated { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isCollocated")] + public bool? IsCollocated {get; set; } /// /// Gets or sets protection group name of the backup item. /// - [JsonProperty(PropertyName = "protectionGroupName")] - public string ProtectionGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionGroupName")] + public string ProtectionGroupName {get; set; } /// /// Gets or sets used Disk storage in bytes. /// - [JsonProperty(PropertyName = "diskStorageUsedInBytes")] - public string DiskStorageUsedInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskStorageUsedInBytes")] + public string DiskStorageUsedInBytes {get; set; } /// /// Gets or sets total Disk storage in bytes. /// - [JsonProperty(PropertyName = "totalDiskStorageSizeInBytes")] - public string TotalDiskStorageSizeInBytes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "totalDiskStorageSizeInBytes")] + public string TotalDiskStorageSizeInBytes {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DataSourceType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DataSourceType.cs index f20f4413fa7e..c1d53de96a23 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DataSourceType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DataSourceType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,13 +9,15 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for DataSourceType. /// + + public static class DataSourceType { public const string Invalid = "Invalid"; public const string VM = "VM"; public const string FileFolder = "FileFolder"; public const string AzureSqlDb = "AzureSqlDb"; - public const string SQLDB = "SQLDB"; + public const string Sqldb = "SQLDB"; public const string Exchange = "Exchange"; public const string Sharepoint = "Sharepoint"; public const string VMwareVM = "VMwareVM"; @@ -32,4 +29,4 @@ public static class DataSourceType public const string SAPHanaDatabase = "SAPHanaDatabase"; public const string SAPAseDatabase = "SAPAseDatabase"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DiskExclusionProperties.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DiskExclusionProperties.cs index 6d9d16716e2f..9fb5022ead15 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DiskExclusionProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DiskExclusionProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class DiskExclusionProperties @@ -28,14 +20,18 @@ public DiskExclusionProperties() /// /// Initializes a new instance of the DiskExclusionProperties class. /// - /// List of Disks' Logical Unit Numbers (LUN) - /// to be used for VM Protection. - /// Flag to indicate whether DiskLunList - /// is to be included/ excluded from backup. - public DiskExclusionProperties(IList diskLunList = default(IList), bool? isInclusionList = default(bool?)) + + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + /// + + /// Flag to indicate whether DiskLunList is to be included/ excluded from + /// backup. + /// + public DiskExclusionProperties(System.Collections.Generic.IList diskLunList = default(System.Collections.Generic.IList), bool? isInclusionList = default(bool?)) + { - DiskLunList = diskLunList; - IsInclusionList = isInclusionList; + this.DiskLunList = diskLunList; + this.IsInclusionList = isInclusionList; CustomInit(); } @@ -44,19 +40,19 @@ public DiskExclusionProperties() /// partial void CustomInit(); + /// - /// Gets or sets list of Disks' Logical Unit Numbers (LUN) to be used - /// for VM Protection. + /// Gets or sets list of Disks' Logical Unit Numbers (LUN) to be used for VM + /// Protection. /// - [JsonProperty(PropertyName = "diskLunList")] - public IList DiskLunList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskLunList")] + public System.Collections.Generic.IList DiskLunList {get; set; } /// - /// Gets or sets flag to indicate whether DiskLunList is to be - /// included/ excluded from backup. + /// Gets or sets flag to indicate whether DiskLunList is to be included/ + /// excluded from backup. /// - [JsonProperty(PropertyName = "isInclusionList")] - public bool? IsInclusionList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isInclusionList")] + public bool? IsInclusionList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DiskInformation.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DiskInformation.cs index e879182c9bdc..a92dbd0a6612 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DiskInformation.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DiskInformation.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,17 @@ public DiskInformation() /// /// Initializes a new instance of the DiskInformation class. /// + + /// + /// + + /// + /// public DiskInformation(int? lun = default(int?), string name = default(string)) + { - Lun = lun; - Name = name; + this.Lun = lun; + this.Name = name; CustomInit(); } @@ -41,15 +42,17 @@ public DiskInformation() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "lun")] - public int? Lun { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lun")] + public int? Lun {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmErrorInfo.cs index f9ef855e6379..c5a9fb63f07d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,13 +23,17 @@ public DpmErrorInfo() /// /// Initializes a new instance of the DpmErrorInfo class. /// - /// Localized error string. - /// List of localized recommendations for - /// above error code. - public DpmErrorInfo(string errorString = default(string), IList recommendations = default(IList)) + + /// Localized error string. + /// + + /// List of localized recommendations for above error code. + /// + public DpmErrorInfo(string errorString = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - ErrorString = errorString; - Recommendations = recommendations; + this.ErrorString = errorString; + this.Recommendations = recommendations; CustomInit(); } @@ -46,18 +42,17 @@ public DpmErrorInfo() /// partial void CustomInit(); + /// /// Gets or sets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; set; } /// - /// Gets or sets list of localized recommendations for above error - /// code. + /// Gets or sets list of localized recommendations for above error code. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJob.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJob.cs index 863c0053b64e..d6fdf9bab044 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,40 +24,65 @@ public DpmJob() /// /// Initializes a new instance of the DpmJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Time elapsed for job. - /// DPM server name managing the backup - /// item or backup job. - /// Name of cluster/server protecting - /// current backup item, if any. - /// Type of container. - /// Type of backup item. - /// The state/actions applicable on this job - /// like cancel/retry. - /// The errors. - /// Additional information for this - /// job. - public DpmJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), string dpmServerName = default(string), string containerName = default(string), string containerType = default(string), string workloadType = default(string), IList actionsInfo = default(IList), IList errorDetails = default(IList), DpmJobExtendedInfo extendedInfo = default(DpmJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Time elapsed for job. + /// + + /// DPM server name managing the backup item or backup job. + /// + + /// Name of cluster/server protecting current backup item, if any. + /// + + /// Type of container. + /// + + /// Type of backup item. + /// + + /// The state/actions applicable on this job like cancel/retry. + /// + + /// The errors. + /// + + /// Additional information for this job. + /// + public DpmJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), string dpmServerName = default(string), string containerName = default(string), string containerType = default(string), string workloadType = default(string), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), DpmJobExtendedInfo extendedInfo = default(DpmJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - Duration = duration; - DpmServerName = dpmServerName; - ContainerName = containerName; - ContainerType = containerType; - WorkloadType = workloadType; - ActionsInfo = actionsInfo; - ErrorDetails = errorDetails; - ExtendedInfo = extendedInfo; + this.Duration = duration; + this.DpmServerName = dpmServerName; + this.ContainerName = containerName; + this.ContainerType = containerType; + this.WorkloadType = workloadType; + this.ActionsInfo = actionsInfo; + this.ErrorDetails = errorDetails; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -74,56 +91,53 @@ public DpmJob() /// partial void CustomInit(); + /// /// Gets or sets time elapsed for job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets DPM server name managing the backup item or backup - /// job. + /// Gets or sets dPM server name managing the backup item or backup job. /// - [JsonProperty(PropertyName = "dpmServerName")] - public string DpmServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dpmServerName")] + public string DpmServerName {get; set; } /// - /// Gets or sets name of cluster/server protecting current backup item, - /// if any. + /// Gets or sets name of cluster/server protecting current backup item, if any. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets type of container. /// - [JsonProperty(PropertyName = "containerType")] - public string ContainerType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerType")] + public string ContainerType {get; set; } /// /// Gets or sets type of backup item. /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// - /// Gets or sets the state/actions applicable on this job like - /// cancel/retry. + /// Gets or sets the state/actions applicable on this job like cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets the errors. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// /// Gets or sets additional information for this job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public DpmJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public DpmJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJobExtendedInfo.cs index 3010228e9e85..fec3693ca73d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,16 +23,21 @@ public DpmJobExtendedInfo() /// /// Initializes a new instance of the DpmJobExtendedInfo class. /// - /// List of tasks associated with this - /// job. - /// The job properties. - /// Non localized error message on - /// job execution. - public DpmJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), string dynamicErrorMessage = default(string)) + + /// List of tasks associated with this job. + /// + + /// The job properties. + /// + + /// Non localized error message on job execution. + /// + public DpmJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -49,23 +46,23 @@ public DpmJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks associated with this job. /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets the job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets non localized error message on job execution. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJobTaskDetails.cs index 9c209bbe6c81..573a7cde4385 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/DpmJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,29 @@ public DpmJobTaskDetails() /// /// Initializes a new instance of the DpmJobTaskDetails class. /// - /// The task display name. - /// The start time. - /// The end time. - /// Time elapsed for task. - /// The status. + + /// The task display name. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// Time elapsed for task. + /// + + /// The status. + /// public DpmJobTaskDetails(string taskId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.TimeSpan? duration = default(System.TimeSpan?), string status = default(string)) + { - TaskId = taskId; - StartTime = startTime; - EndTime = endTime; - Duration = duration; - Status = status; + this.TaskId = taskId; + this.StartTime = startTime; + this.EndTime = endTime; + this.Duration = duration; + this.Status = status; CustomInit(); } @@ -49,35 +54,35 @@ public DpmJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets time elapsed for task. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/EncryptionDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/EncryptionDetails.cs index b93c944dae07..0326ee5a8002 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/EncryptionDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/EncryptionDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,21 +23,30 @@ public EncryptionDetails() /// /// Initializes a new instance of the EncryptionDetails class. /// - /// Identifies whether this backup copy - /// represents an encrypted VM at the time of backup. - /// Key Url. - /// Secret Url. - /// ID of Key Vault where KEK is - /// stored. - /// ID of Key Vault where Secret is - /// stored. + + /// Identifies whether this backup copy represents an encrypted VM at the time + /// of backup. + /// + + /// Key Url. + /// + + /// Secret Url. + /// + + /// ID of Key Vault where KEK is stored. + /// + + /// ID of Key Vault where Secret is stored. + /// public EncryptionDetails(bool? encryptionEnabled = default(bool?), string kekUrl = default(string), string secretKeyUrl = default(string), string kekVaultId = default(string), string secretKeyVaultId = default(string)) + { - EncryptionEnabled = encryptionEnabled; - KekUrl = kekUrl; - SecretKeyUrl = secretKeyUrl; - KekVaultId = kekVaultId; - SecretKeyVaultId = secretKeyVaultId; + this.EncryptionEnabled = encryptionEnabled; + this.KekUrl = kekUrl; + this.SecretKeyUrl = secretKeyUrl; + this.KekVaultId = kekVaultId; + this.SecretKeyVaultId = secretKeyVaultId; CustomInit(); } @@ -52,36 +55,36 @@ public EncryptionDetails() /// partial void CustomInit(); + /// - /// Gets or sets identifies whether this backup copy represents an - /// encrypted VM at the time of backup. + /// Gets or sets identifies whether this backup copy represents an encrypted VM + /// at the time of backup. /// - [JsonProperty(PropertyName = "encryptionEnabled")] - public bool? EncryptionEnabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionEnabled")] + public bool? EncryptionEnabled {get; set; } /// /// Gets or sets key Url. /// - [JsonProperty(PropertyName = "kekUrl")] - public string KekUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekUrl")] + public string KekUrl {get; set; } /// /// Gets or sets secret Url. /// - [JsonProperty(PropertyName = "secretKeyUrl")] - public string SecretKeyUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secretKeyUrl")] + public string SecretKeyUrl {get; set; } /// - /// Gets or sets ID of Key Vault where KEK is stored. + /// Gets or sets iD of Key Vault where KEK is stored. /// - [JsonProperty(PropertyName = "kekVaultId")] - public string KekVaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekVaultId")] + public string KekVaultId {get; set; } /// - /// Gets or sets ID of Key Vault where Secret is stored. + /// Gets or sets iD of Key Vault where Secret is stored. /// - [JsonProperty(PropertyName = "secretKeyVaultId")] - public string SecretKeyVaultId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "secretKeyVaultId")] + public string SecretKeyVaultId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs index fbac82035ffd..c069af71f4cf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public ErrorAdditionalInfo() /// /// Initializes a new instance of the ErrorAdditionalInfo class. /// - /// The additional info type. - /// The additional info. + + /// The additional info type. + /// + + /// The additional info. + /// public ErrorAdditionalInfo(string type = default(string), object info = default(object)) + { - Type = type; - Info = info; + this.Type = type; + this.Info = info; CustomInit(); } @@ -43,17 +42,17 @@ public ErrorAdditionalInfo() /// partial void CustomInit(); + /// /// Gets the additional info type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets the additional info. /// - [JsonProperty(PropertyName = "info")] - public object Info { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "info")] + public object Info {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ErrorDetail.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ErrorDetail.cs index a3618054370e..bd6effa8e08e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ErrorDetail.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ErrorDetail.cs @@ -1,23 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Error Detail class which encapsulates Code, Message and - /// Recommendations. + /// Error Detail class which encapsulates Code, Message and Recommendations. /// public partial class ErrorDetail { @@ -32,15 +23,21 @@ public ErrorDetail() /// /// Initializes a new instance of the ErrorDetail class. /// - /// Error code. - /// Error Message related to the Code. - /// List of recommendation - /// strings. - public ErrorDetail(string code = default(string), string message = default(string), IList recommendations = default(IList)) + + /// Error code. + /// + + /// Error Message related to the Code. + /// + + /// List of recommendation strings. + /// + public ErrorDetail(string code = default(string), string message = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - Code = code; - Message = message; - Recommendations = recommendations; + this.Code = code; + this.Message = message; + this.Recommendations = recommendations; CustomInit(); } @@ -49,23 +46,23 @@ public ErrorDetail() /// partial void CustomInit(); + /// /// Gets error code. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } /// /// Gets error Message related to the Code. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } /// /// Gets list of recommendation strings. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ExtendedProperties.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ExtendedProperties.cs index 4039f9bce2e8..6745119fee38 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ExtendedProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ExtendedProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public ExtendedProperties() /// /// Initializes a new instance of the ExtendedProperties class. /// - /// Extended Properties for Disk - /// Exclusion. + + /// Extended Properties for Disk Exclusion. + /// public ExtendedProperties(DiskExclusionProperties diskExclusionProperties = default(DiskExclusionProperties)) + { - DiskExclusionProperties = diskExclusionProperties; + this.DiskExclusionProperties = diskExclusionProperties; CustomInit(); } @@ -42,11 +38,11 @@ public ExtendedProperties() /// partial void CustomInit(); + /// /// Gets or sets extended Properties for Disk Exclusion. /// - [JsonProperty(PropertyName = "diskExclusionProperties")] - public DiskExclusionProperties DiskExclusionProperties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskExclusionProperties")] + public DiskExclusionProperties DiskExclusionProperties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/GenericProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/GenericProtectedItem.cs index 3163571a92a1..64cd9270bb68 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/GenericProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/GenericProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,60 +24,87 @@ public GenericProtectedItem() /// /// Initializes a new instance of the GenericProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of the container. - /// Indicates consistency of policy object - /// and policy applied to this backup item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of the container. + /// + + /// Indicates consistency of policy object and policy applied to this backup + /// item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' - /// Data Plane Service ID of the - /// protected item. - /// Loosely coupled (type, value) - /// associations (example - parent of a protected item) - /// Name of this backup item's fabric. - public GenericProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string policyState = default(string), string protectionState = default(string), long? protectedItemId = default(long?), IDictionary sourceAssociations = default(IDictionary), string fabricName = default(string)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) + + /// Data Plane Service ID of the protected item. + /// + + /// Loosely coupled (type, value) associations (example - parent of a protected + /// item) + /// + + /// Name of this backup item's fabric. + /// + public GenericProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string policyState = default(string), string protectionState = default(string), long? protectedItemId = default(long?), System.Collections.Generic.IDictionary sourceAssociations = default(System.Collections.Generic.IDictionary), string fabricName = default(string)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { - FriendlyName = friendlyName; - PolicyState = policyState; - ProtectionState = protectionState; - ProtectedItemId = protectedItemId; - SourceAssociations = sourceAssociations; - FabricName = fabricName; + this.FriendlyName = friendlyName; + this.PolicyState = policyState; + this.ProtectionState = protectionState; + this.ProtectedItemId = protectedItemId; + this.SourceAssociations = sourceAssociations; + this.FabricName = fabricName; CustomInit(); } @@ -94,45 +113,43 @@ public GenericProtectedItem() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the container. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets indicates consistency of policy object and policy - /// applied to this backup item. + /// Gets or sets indicates consistency of policy object and policy applied to + /// this backup item. /// - [JsonProperty(PropertyName = "policyState")] - public string PolicyState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyState")] + public string PolicyState {get; set; } /// - /// Gets or sets backup state of this backup item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused' + /// Gets or sets backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// /// Gets or sets data Plane Service ID of the protected item. /// - [JsonProperty(PropertyName = "protectedItemId")] - public long? ProtectedItemId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemId")] + public long? ProtectedItemId {get; set; } /// - /// Gets or sets loosely coupled (type, value) associations (example - - /// parent of a protected item) + /// Gets or sets loosely coupled (type, value) associations (example - parent + /// of a protected item) /// - [JsonProperty(PropertyName = "sourceAssociations")] - public IDictionary SourceAssociations { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceAssociations")] + public System.Collections.Generic.IDictionary SourceAssociations {get; set; } /// - /// Gets or sets name of this backup item's fabric. + /// Gets or sets name of this backup item's fabric. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/GenericRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/GenericRecoveryPoint.cs index bb8585ffcb16..d94c05b13c80 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/GenericRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/GenericRecoveryPoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,19 +24,25 @@ public GenericRecoveryPoint() /// /// Initializes a new instance of the GenericRecoveryPoint class. /// - /// Friendly name of the backup - /// copy. - /// Type of the backup copy. - /// Time at which this backup copy was - /// created. - /// Additional information - /// associated with this backup copy. + + /// Friendly name of the backup copy. + /// + + /// Type of the backup copy. + /// + + /// Time at which this backup copy was created. + /// + + /// Additional information associated with this backup copy. + /// public GenericRecoveryPoint(string friendlyName = default(string), string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string recoveryPointAdditionalInfo = default(string)) + { - FriendlyName = friendlyName; - RecoveryPointType = recoveryPointType; - RecoveryPointTime = recoveryPointTime; - RecoveryPointAdditionalInfo = recoveryPointAdditionalInfo; + this.FriendlyName = friendlyName; + this.RecoveryPointType = recoveryPointType; + this.RecoveryPointTime = recoveryPointTime; + this.RecoveryPointAdditionalInfo = recoveryPointAdditionalInfo; CustomInit(); } @@ -51,30 +51,29 @@ public GenericRecoveryPoint() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the backup copy. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets type of the backup copy. /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// /// Gets or sets time at which this backup copy was created. /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public System.DateTime? RecoveryPointTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime {get; set; } /// - /// Gets or sets additional information associated with this backup - /// copy. + /// Gets or sets additional information associated with this backup copy. /// - [JsonProperty(PropertyName = "recoveryPointAdditionalInfo")] - public string RecoveryPointAdditionalInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointAdditionalInfo")] + public string RecoveryPointAdditionalInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/HealthState.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/HealthState.cs index 1130d4e6abee..087569a9fb5d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/HealthState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/HealthState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for HealthState. /// + + public static class HealthState { public const string Passed = "Passed"; @@ -21,4 +18,4 @@ public static class HealthState public const string ActionSuggested = "ActionSuggested"; public const string Invalid = "Invalid"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/HealthStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/HealthStatus.cs index ec3fd0246ecc..8a42bcee4ce7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/HealthStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/HealthStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for HealthStatus. /// + + public static class HealthStatus { public const string Passed = "Passed"; @@ -21,4 +18,4 @@ public static class HealthStatus public const string ActionSuggested = "ActionSuggested"; public const string Invalid = "Invalid"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IaasVMRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IaasVMRecoveryPoint.cs index 828cc776bf96..3f7bdf44cff4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IaasVMRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IaasVMRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,51 +24,71 @@ public IaasVMRecoveryPoint() /// /// Initializes a new instance of the IaasVMRecoveryPoint class. /// - /// Type of the backup copy. - /// Time at which this backup copy was - /// created. - /// Additional information - /// associated with this backup copy. - /// Storage type of the VM whose - /// backup copy is created. - /// Identifies whether the VM was - /// encrypted when the backup copy is created. - /// Required details for recovering an - /// encrypted VM. Applicable only when IsSourceVMEncrypted is - /// true. - /// Is the session to recover - /// items from this backup copy still active. - /// Recovery point tier - /// information. - /// Whether VM is with Managed - /// Disks - /// Virtual Machine Size - /// Original Storage Account - /// Option - /// OS type - /// Disk - /// configuration - /// Identifies the zone of the VM at the time of - /// backup. Applicable only for zone-pinned Vms - /// Eligibility of RP to - /// be moved to another tier - public IaasVMRecoveryPoint(string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string recoveryPointAdditionalInfo = default(string), string sourceVMStorageType = default(string), bool? isSourceVMEncrypted = default(bool?), KeyAndSecretDetails keyAndSecret = default(KeyAndSecretDetails), bool? isInstantIlrSessionActive = default(bool?), IList recoveryPointTierDetails = default(IList), bool? isManagedVirtualMachine = default(bool?), string virtualMachineSize = default(string), bool? originalStorageAccountOption = default(bool?), string osType = default(string), RecoveryPointDiskConfiguration recoveryPointDiskConfiguration = default(RecoveryPointDiskConfiguration), IList zones = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary)) + + /// Type of the backup copy. + /// + + /// Time at which this backup copy was created. + /// + + /// Additional information associated with this backup copy. + /// + + /// Storage type of the VM whose backup copy is created. + /// + + /// Identifies whether the VM was encrypted when the backup copy is created. + /// + + /// Required details for recovering an encrypted VM. Applicable only when + /// IsSourceVMEncrypted is true. + /// + + /// Is the session to recover items from this backup copy still active. + /// + + /// Recovery point tier information. + /// + + /// Whether VM is with Managed Disks + /// + + /// Virtual Machine Size + /// + + /// Original Storage Account Option + /// + + /// OS type + /// + + /// Disk configuration + /// + + /// Identifies the zone of the VM at the time of backup. Applicable only for + /// zone-pinned Vms + /// + + /// Eligibility of RP to be moved to another tier + /// + public IaasVMRecoveryPoint(string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string recoveryPointAdditionalInfo = default(string), string sourceVMStorageType = default(string), bool? isSourceVMEncrypted = default(bool?), KeyAndSecretDetails keyAndSecret = default(KeyAndSecretDetails), bool? isInstantIlrSessionActive = default(bool?), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), bool? isManagedVirtualMachine = default(bool?), string virtualMachineSize = default(string), bool? originalStorageAccountOption = default(bool?), string osType = default(string), RecoveryPointDiskConfiguration recoveryPointDiskConfiguration = default(RecoveryPointDiskConfiguration), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary)) + { - RecoveryPointType = recoveryPointType; - RecoveryPointTime = recoveryPointTime; - RecoveryPointAdditionalInfo = recoveryPointAdditionalInfo; - SourceVMStorageType = sourceVMStorageType; - IsSourceVMEncrypted = isSourceVMEncrypted; - KeyAndSecret = keyAndSecret; - IsInstantIlrSessionActive = isInstantIlrSessionActive; - RecoveryPointTierDetails = recoveryPointTierDetails; - IsManagedVirtualMachine = isManagedVirtualMachine; - VirtualMachineSize = virtualMachineSize; - OriginalStorageAccountOption = originalStorageAccountOption; - OsType = osType; - RecoveryPointDiskConfiguration = recoveryPointDiskConfiguration; - Zones = zones; - RecoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; + this.RecoveryPointType = recoveryPointType; + this.RecoveryPointTime = recoveryPointTime; + this.RecoveryPointAdditionalInfo = recoveryPointAdditionalInfo; + this.SourceVMStorageType = sourceVMStorageType; + this.IsSourceVMEncrypted = isSourceVMEncrypted; + this.KeyAndSecret = keyAndSecret; + this.IsInstantIlrSessionActive = isInstantIlrSessionActive; + this.RecoveryPointTierDetails = recoveryPointTierDetails; + this.IsManagedVirtualMachine = isManagedVirtualMachine; + this.VirtualMachineSize = virtualMachineSize; + this.OriginalStorageAccountOption = originalStorageAccountOption; + this.OSType = osType; + this.RecoveryPointDiskConfiguration = recoveryPointDiskConfiguration; + this.Zones = zones; + this.RecoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; CustomInit(); } @@ -85,99 +97,99 @@ public IaasVMRecoveryPoint() /// partial void CustomInit(); + /// /// Gets type of the backup copy. /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; private set; } /// /// Gets time at which this backup copy was created. /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public System.DateTime? RecoveryPointTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime {get; private set; } /// /// Gets additional information associated with this backup copy. /// - [JsonProperty(PropertyName = "recoveryPointAdditionalInfo")] - public string RecoveryPointAdditionalInfo { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointAdditionalInfo")] + public string RecoveryPointAdditionalInfo {get; private set; } /// /// Gets storage type of the VM whose backup copy is created. /// - [JsonProperty(PropertyName = "sourceVMStorageType")] - public string SourceVMStorageType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceVMStorageType")] + public string SourceVMStorageType {get; private set; } /// - /// Gets identifies whether the VM was encrypted when the backup copy - /// is created. + /// Gets identifies whether the VM was encrypted when the backup copy is + /// created. /// - [JsonProperty(PropertyName = "isSourceVMEncrypted")] - public bool? IsSourceVMEncrypted { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isSourceVMEncrypted")] + public bool? IsSourceVMEncrypted {get; private set; } /// - /// Gets or sets required details for recovering an encrypted VM. - /// Applicable only when IsSourceVMEncrypted is true. + /// Gets or sets required details for recovering an encrypted VM. Applicable + /// only when IsSourceVMEncrypted is true. /// - [JsonProperty(PropertyName = "keyAndSecret")] - public KeyAndSecretDetails KeyAndSecret { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyAndSecret")] + public KeyAndSecretDetails KeyAndSecret {get; set; } /// - /// Gets or sets is the session to recover items from this backup copy - /// still active. + /// Gets or sets is the session to recover items from this backup copy still + /// active. /// - [JsonProperty(PropertyName = "isInstantIlrSessionActive")] - public bool? IsInstantIlrSessionActive { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isInstantIlrSessionActive")] + public bool? IsInstantIlrSessionActive {get; set; } /// /// Gets or sets recovery point tier information. /// - [JsonProperty(PropertyName = "recoveryPointTierDetails")] - public IList RecoveryPointTierDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTierDetails")] + public System.Collections.Generic.IList RecoveryPointTierDetails {get; set; } /// /// Gets or sets whether VM is with Managed Disks /// - [JsonProperty(PropertyName = "isManagedVirtualMachine")] - public bool? IsManagedVirtualMachine { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isManagedVirtualMachine")] + public bool? IsManagedVirtualMachine {get; set; } /// /// Gets or sets virtual Machine Size /// - [JsonProperty(PropertyName = "virtualMachineSize")] - public string VirtualMachineSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineSize")] + public string VirtualMachineSize {get; set; } /// /// Gets or sets original Storage Account Option /// - [JsonProperty(PropertyName = "originalStorageAccountOption")] - public bool? OriginalStorageAccountOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "originalStorageAccountOption")] + public bool? OriginalStorageAccountOption {get; set; } /// - /// Gets or sets OS type + /// Gets or sets oS type /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets disk configuration /// - [JsonProperty(PropertyName = "recoveryPointDiskConfiguration")] - public RecoveryPointDiskConfiguration RecoveryPointDiskConfiguration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointDiskConfiguration")] + public RecoveryPointDiskConfiguration RecoveryPointDiskConfiguration {get; set; } /// /// Gets or sets identifies the zone of the VM at the time of backup. /// Applicable only for zone-pinned Vms /// - [JsonProperty(PropertyName = "zones")] - public IList Zones { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "zones")] + public System.Collections.Generic.IList Zones {get; set; } /// /// Gets or sets eligibility of RP to be moved to another tier /// - [JsonProperty(PropertyName = "recoveryPointMoveReadinessInfo")] - public IDictionary RecoveryPointMoveReadinessInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointMoveReadinessInfo")] + public System.Collections.Generic.IDictionary RecoveryPointMoveReadinessInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IaasVMRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IaasVMRestoreRequest.cs index 4763fad686a8..348c364f8c78 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IaasVMRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IaasVMRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,83 +24,109 @@ public IaasVMRestoreRequest() /// /// Initializes a new instance of the IaasVMRestoreRequest class. /// - /// ID of the backup copy to be - /// recovered. - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM - /// which is being recovered. - /// This is the complete ARM Id of - /// the VM that will be created. + + /// ID of the backup copy to be recovered. + /// + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM which is being recovered. + /// + + /// This is the complete ARM Id of the VM that will be created. /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// This is the ARM Id of the - /// resource group that you want to create for this Virtual machine and - /// other artifacts. - /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} - /// Fully qualified ARM ID of the - /// storage account to which the VM has to be restored. - /// This is the virtual network Id of - /// the vnet that will be attached to the virtual machine. - /// User will be validated for join action permissions in the linked - /// access. - /// Subnet ID, is the subnet ID associated with - /// the to be restored VM. For Classic VMs it would be - /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager - /// VMs it would be ARM resource ID used to represent - /// the subnet. - /// Fully qualified ARM ID of the - /// domain name to be associated to the VM being restored. This applies - /// only to Classic - /// Virtual Machines. - /// Region in which the virtual machine is - /// restored. - /// Affinity group associated to VM to be - /// restored. Used only for Classic Compute Virtual Machines. - /// Should a new cloud service be - /// created while restoring the VM. If this is false, VM will be - /// restored to the same - /// cloud service as it was at the time of backup. - /// Original Storage Account - /// Option - /// Details needed if the VM was - /// encrypted at the time of backup. - /// List of Disk LUNs for partial - /// restore - /// Flag to denote of an - /// Unmanaged disk VM should be restored with Managed disks. - /// DiskEncryptionSet's ID - needed - /// if the VM needs to be encrypted at rest during restore with - /// customer managed key. - /// Target zone where the VM and its disks should - /// be restored. - /// Managed Identity information required to - /// access customer storage account. - /// IaaS VM workload specific - /// restore details for restores using managed identity. - public IaasVMRestoreRequest(string recoveryPointId = default(string), string recoveryType = default(string), string sourceResourceId = default(string), string targetVirtualMachineId = default(string), string targetResourceGroupId = default(string), string storageAccountId = default(string), string virtualNetworkId = default(string), string subnetId = default(string), string targetDomainNameId = default(string), string region = default(string), string affinityGroup = default(string), bool? createNewCloudService = default(bool?), bool? originalStorageAccountOption = default(bool?), EncryptionDetails encryptionDetails = default(EncryptionDetails), IList restoreDiskLunList = default(IList), bool? restoreWithManagedDisks = default(bool?), string diskEncryptionSetId = default(string), IList zones = default(IList), IdentityInfo identityInfo = default(IdentityInfo), IdentityBasedRestoreDetails identityBasedRestoreDetails = default(IdentityBasedRestoreDetails)) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// This is the ARM Id of the resource group that you want to create for this + /// Virtual machine and other artifacts. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} + /// + + /// Fully qualified ARM ID of the storage account to which the VM has to be + /// restored. + /// + + /// This is the virtual network Id of the vnet that will be attached to the + /// virtual machine. + /// User will be validated for join action permissions in the linked access. + /// + + /// Subnet ID, is the subnet ID associated with the to be restored VM. For + /// Classic VMs it would be + /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it + /// would be ARM resource ID used to represent + /// the subnet. + /// + + /// Fully qualified ARM ID of the domain name to be associated to the VM being + /// restored. This applies only to Classic + /// Virtual Machines. + /// + + /// Region in which the virtual machine is restored. + /// + + /// Affinity group associated to VM to be restored. Used only for Classic + /// Compute Virtual Machines. + /// + + /// Should a new cloud service be created while restoring the VM. If this is + /// false, VM will be restored to the same + /// cloud service as it was at the time of backup. + /// + + /// Original Storage Account Option + /// + + /// Details needed if the VM was encrypted at the time of backup. + /// + + /// List of Disk LUNs for partial restore + /// + + /// Flag to denote of an Unmanaged disk VM should be restored with Managed + /// disks. + /// + + /// DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest + /// during restore with customer managed key. + /// + + /// Target zone where the VM and its disks should be restored. + /// + + /// Managed Identity information required to access customer storage account. + /// + + /// IaaS VM workload specific restore details for restores using managed + /// identity. + /// + public IaasVMRestoreRequest(string recoveryPointId = default(string), string recoveryType = default(string), string sourceResourceId = default(string), string targetVirtualMachineId = default(string), string targetResourceGroupId = default(string), string storageAccountId = default(string), string virtualNetworkId = default(string), string subnetId = default(string), string targetDomainNameId = default(string), string region = default(string), string affinityGroup = default(string), bool? createNewCloudService = default(bool?), bool? originalStorageAccountOption = default(bool?), EncryptionDetails encryptionDetails = default(EncryptionDetails), System.Collections.Generic.IList restoreDiskLunList = default(System.Collections.Generic.IList), bool? restoreWithManagedDisks = default(bool?), string diskEncryptionSetId = default(string), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), IdentityInfo identityInfo = default(IdentityInfo), IdentityBasedRestoreDetails identityBasedRestoreDetails = default(IdentityBasedRestoreDetails)) + { - RecoveryPointId = recoveryPointId; - RecoveryType = recoveryType; - SourceResourceId = sourceResourceId; - TargetVirtualMachineId = targetVirtualMachineId; - TargetResourceGroupId = targetResourceGroupId; - StorageAccountId = storageAccountId; - VirtualNetworkId = virtualNetworkId; - SubnetId = subnetId; - TargetDomainNameId = targetDomainNameId; - Region = region; - AffinityGroup = affinityGroup; - CreateNewCloudService = createNewCloudService; - OriginalStorageAccountOption = originalStorageAccountOption; - EncryptionDetails = encryptionDetails; - RestoreDiskLunList = restoreDiskLunList; - RestoreWithManagedDisks = restoreWithManagedDisks; - DiskEncryptionSetId = diskEncryptionSetId; - Zones = zones; - IdentityInfo = identityInfo; - IdentityBasedRestoreDetails = identityBasedRestoreDetails; + this.RecoveryPointId = recoveryPointId; + this.RecoveryType = recoveryType; + this.SourceResourceId = sourceResourceId; + this.TargetVirtualMachineId = targetVirtualMachineId; + this.TargetResourceGroupId = targetResourceGroupId; + this.StorageAccountId = storageAccountId; + this.VirtualNetworkId = virtualNetworkId; + this.SubnetId = subnetId; + this.TargetDomainNameId = targetDomainNameId; + this.Region = region; + this.AffinityGroup = affinityGroup; + this.CreateNewCloudService = createNewCloudService; + this.OriginalStorageAccountOption = originalStorageAccountOption; + this.EncryptionDetails = encryptionDetails; + this.RestoreDiskLunList = restoreDiskLunList; + this.RestoreWithManagedDisks = restoreWithManagedDisks; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.Zones = zones; + this.IdentityInfo = identityInfo; + this.IdentityBasedRestoreDetails = identityBasedRestoreDetails; CustomInit(); } @@ -117,152 +135,145 @@ public IaasVMRestoreRequest() /// partial void CustomInit(); + /// - /// Gets or sets ID of the backup copy to be recovered. + /// Gets or sets iD of the backup copy to be recovered. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// - /// Gets or sets type of this recovery. Possible values include: - /// 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', - /// 'Offline' + /// Gets or sets type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', 'Offline' /// - [JsonProperty(PropertyName = "recoveryType")] - public string RecoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryType")] + public string RecoveryType {get; set; } /// - /// Gets or sets fully qualified ARM ID of the VM which is being - /// recovered. + /// Gets or sets fully qualified ARM ID of the VM which is being recovered. /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// - /// Gets or sets this is the complete ARM Id of the VM that will be - /// created. + /// Gets or sets this is the complete ARM Id of the VM that will be created. /// For e.g. /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} /// - [JsonProperty(PropertyName = "targetVirtualMachineId")] - public string TargetVirtualMachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVirtualMachineId")] + public string TargetVirtualMachineId {get; set; } /// - /// Gets or sets this is the ARM Id of the resource group that you want - /// to create for this Virtual machine and other artifacts. + /// Gets or sets this is the ARM Id of the resource group that you want to + /// create for this Virtual machine and other artifacts. /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} /// - [JsonProperty(PropertyName = "targetResourceGroupId")] - public string TargetResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroupId")] + public string TargetResourceGroupId {get; set; } /// - /// Gets or sets fully qualified ARM ID of the storage account to which - /// the VM has to be restored. + /// Gets or sets fully qualified ARM ID of the storage account to which the VM + /// has to be restored. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; set; } /// - /// Gets or sets this is the virtual network Id of the vnet that will - /// be attached to the virtual machine. - /// User will be validated for join action permissions in the linked - /// access. + /// Gets or sets this is the virtual network Id of the vnet that will be + /// attached to the virtual machine. + /// User will be validated for join action permissions in the linked access. /// - [JsonProperty(PropertyName = "virtualNetworkId")] - public string VirtualNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualNetworkId")] + public string VirtualNetworkId {get; set; } /// - /// Gets or sets subnet ID, is the subnet ID associated with the to be - /// restored VM. For Classic VMs it would be - /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager - /// VMs it would be ARM resource ID used to represent + /// Gets or sets subnet ID, is the subnet ID associated with the to be restored + /// VM. For Classic VMs it would be + /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it + /// would be ARM resource ID used to represent /// the subnet. /// - [JsonProperty(PropertyName = "subnetId")] - public string SubnetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subnetId")] + public string SubnetId {get; set; } /// - /// Gets or sets fully qualified ARM ID of the domain name to be - /// associated to the VM being restored. This applies only to Classic + /// Gets or sets fully qualified ARM ID of the domain name to be associated to + /// the VM being restored. This applies only to Classic /// Virtual Machines. /// - [JsonProperty(PropertyName = "targetDomainNameId")] - public string TargetDomainNameId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDomainNameId")] + public string TargetDomainNameId {get; set; } /// /// Gets or sets region in which the virtual machine is restored. /// - [JsonProperty(PropertyName = "region")] - public string Region { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "region")] + public string Region {get; set; } /// - /// Gets or sets affinity group associated to VM to be restored. Used - /// only for Classic Compute Virtual Machines. + /// Gets or sets affinity group associated to VM to be restored. Used only for + /// Classic Compute Virtual Machines. /// - [JsonProperty(PropertyName = "affinityGroup")] - public string AffinityGroup { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "affinityGroup")] + public string AffinityGroup {get; set; } /// - /// Gets or sets should a new cloud service be created while restoring - /// the VM. If this is false, VM will be restored to the same + /// Gets or sets should a new cloud service be created while restoring the VM. + /// If this is false, VM will be restored to the same /// cloud service as it was at the time of backup. /// - [JsonProperty(PropertyName = "createNewCloudService")] - public bool? CreateNewCloudService { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createNewCloudService")] + public bool? CreateNewCloudService {get; set; } /// /// Gets or sets original Storage Account Option /// - [JsonProperty(PropertyName = "originalStorageAccountOption")] - public bool? OriginalStorageAccountOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "originalStorageAccountOption")] + public bool? OriginalStorageAccountOption {get; set; } /// - /// Gets or sets details needed if the VM was encrypted at the time of - /// backup. + /// Gets or sets details needed if the VM was encrypted at the time of backup. /// - [JsonProperty(PropertyName = "encryptionDetails")] - public EncryptionDetails EncryptionDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionDetails")] + public EncryptionDetails EncryptionDetails {get; set; } /// /// Gets or sets list of Disk LUNs for partial restore /// - [JsonProperty(PropertyName = "restoreDiskLunList")] - public IList RestoreDiskLunList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreDiskLunList")] + public System.Collections.Generic.IList RestoreDiskLunList {get; set; } /// - /// Gets or sets flag to denote of an Unmanaged disk VM should be - /// restored with Managed disks. + /// Gets or sets flag to denote of an Unmanaged disk VM should be restored with + /// Managed disks. /// - [JsonProperty(PropertyName = "restoreWithManagedDisks")] - public bool? RestoreWithManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreWithManagedDisks")] + public bool? RestoreWithManagedDisks {get; set; } /// - /// Gets or sets diskEncryptionSet's ID - needed if the VM needs to be + /// Gets or sets diskEncryptionSet's ID - needed if the VM needs to be /// encrypted at rest during restore with customer managed key. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } /// - /// Gets or sets target zone where the VM and its disks should be - /// restored. + /// Gets or sets target zone where the VM and its disks should be restored. /// - [JsonProperty(PropertyName = "zones")] - public IList Zones { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "zones")] + public System.Collections.Generic.IList Zones {get; set; } /// - /// Gets or sets managed Identity information required to access - /// customer storage account. + /// Gets or sets managed Identity information required to access customer + /// storage account. /// - [JsonProperty(PropertyName = "identityInfo")] - public IdentityInfo IdentityInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "identityInfo")] + public IdentityInfo IdentityInfo {get; set; } /// - /// Gets or sets iaaS VM workload specific restore details for restores - /// using managed identity. + /// Gets or sets iaaS VM workload specific restore details for restores using + /// managed identity. /// - [JsonProperty(PropertyName = "identityBasedRestoreDetails")] - public IdentityBasedRestoreDetails IdentityBasedRestoreDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "identityBasedRestoreDetails")] + public IdentityBasedRestoreDetails IdentityBasedRestoreDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IdentityBasedRestoreDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IdentityBasedRestoreDetails.cs index 019299d689bc..4dc55a7e694a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IdentityBasedRestoreDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IdentityBasedRestoreDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class IdentityBasedRestoreDetails { /// - /// Initializes a new instance of the IdentityBasedRestoreDetails - /// class. + /// Initializes a new instance of the IdentityBasedRestoreDetails class. /// public IdentityBasedRestoreDetails() { @@ -29,16 +22,19 @@ public IdentityBasedRestoreDetails() } /// - /// Initializes a new instance of the IdentityBasedRestoreDetails - /// class. + /// Initializes a new instance of the IdentityBasedRestoreDetails class. /// - /// Gets the class type. - /// Fully qualified ARM ID of the - /// target storage account. + + /// Gets the class type. + /// + + /// Fully qualified ARM ID of the target storage account. + /// public IdentityBasedRestoreDetails(string objectType = default(string), string targetStorageAccountId = default(string)) + { - ObjectType = objectType; - TargetStorageAccountId = targetStorageAccountId; + this.ObjectType = objectType; + this.TargetStorageAccountId = targetStorageAccountId; CustomInit(); } @@ -47,17 +43,17 @@ public IdentityBasedRestoreDetails() /// partial void CustomInit(); + /// - /// Gets the class type. + /// Gets or sets gets the class type. /// - [JsonProperty(PropertyName = "objectType")] - public string ObjectType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "objectType")] + public string ObjectType {get; set; } /// /// Gets or sets fully qualified ARM ID of the target storage account. /// - [JsonProperty(PropertyName = "targetStorageAccountId")] - public string TargetStorageAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetStorageAccountId")] + public string TargetStorageAccountId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IdentityInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IdentityInfo.cs index efd249f467cd..62fe93141fdc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IdentityInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/IdentityInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,20 @@ public IdentityInfo() /// /// Initializes a new instance of the IdentityInfo class. /// - /// To differentiate if the - /// managed identity is system assigned or user assigned - /// Managed Identity Resource - /// Id - /// Optional: Might not be required in the case of system assigned - /// managed identity + + /// To differentiate if the managed identity is system assigned or user + /// assigned + /// + + /// Managed Identity Resource Id + /// Optional: Might not be required in the case of system assigned managed + /// identity + /// public IdentityInfo(bool? isSystemAssignedIdentity = default(bool?), string managedIdentityResourceId = default(string)) + { - IsSystemAssignedIdentity = isSystemAssignedIdentity; - ManagedIdentityResourceId = managedIdentityResourceId; + this.IsSystemAssignedIdentity = isSystemAssignedIdentity; + this.ManagedIdentityResourceId = managedIdentityResourceId; CustomInit(); } @@ -47,20 +45,20 @@ public IdentityInfo() /// partial void CustomInit(); + /// - /// Gets or sets to differentiate if the managed identity is system - /// assigned or user assigned + /// Gets or sets to differentiate if the managed identity is system assigned or + /// user assigned /// - [JsonProperty(PropertyName = "isSystemAssignedIdentity")] - public bool? IsSystemAssignedIdentity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isSystemAssignedIdentity")] + public bool? IsSystemAssignedIdentity {get; set; } /// /// Gets or sets managed Identity Resource Id - /// Optional: Might not be required in the case of system assigned - /// managed identity + /// Optional: Might not be required in the case of system assigned managed + /// identity /// - [JsonProperty(PropertyName = "managedIdentityResourceId")] - public string ManagedIdentityResourceId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "managedIdentityResourceId")] + public string ManagedIdentityResourceId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/InstantItemRecoveryTarget.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/InstantItemRecoveryTarget.cs index 88dd0a5829ba..8ae58e5ebb04 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/InstantItemRecoveryTarget.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/InstantItemRecoveryTarget.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,10 +23,13 @@ public InstantItemRecoveryTarget() /// /// Initializes a new instance of the InstantItemRecoveryTarget class. /// - /// List of client scripts. - public InstantItemRecoveryTarget(IList clientScripts = default(IList)) + + /// List of client scripts. + /// + public InstantItemRecoveryTarget(System.Collections.Generic.IList clientScripts = default(System.Collections.Generic.IList)) + { - ClientScripts = clientScripts; + this.ClientScripts = clientScripts; CustomInit(); } @@ -43,11 +38,11 @@ public InstantItemRecoveryTarget() /// partial void CustomInit(); + /// /// Gets or sets list of client scripts. /// - [JsonProperty(PropertyName = "clientScripts")] - public IList ClientScripts { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "clientScripts")] + public System.Collections.Generic.IList ClientScripts {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Job.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Job.cs index 5ab0419820cd..8417ccbcd194 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Job.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Job.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,26 +24,39 @@ public Job() /// /// Initializes a new instance of the Job class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// public Job(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string)) + { - EntityFriendlyName = entityFriendlyName; - BackupManagementType = backupManagementType; - Operation = operation; - Status = status; - StartTime = startTime; - EndTime = endTime; - ActivityId = activityId; + this.EntityFriendlyName = entityFriendlyName; + this.BackupManagementType = backupManagementType; + this.Operation = operation; + this.Status = status; + this.StartTime = startTime; + this.EndTime = endTime; + this.ActivityId = activityId; CustomInit(); } @@ -58,51 +65,48 @@ public Job() /// partial void CustomInit(); + /// - /// Gets or sets friendly name of the entity on which the current job - /// is executing. + /// Gets or sets friendly name of the entity on which the current job is + /// executing. /// - [JsonProperty(PropertyName = "entityFriendlyName")] - public string EntityFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "entityFriendlyName")] + public string EntityFriendlyName {get; set; } /// - /// Gets or sets backup management type to execute the current job. - /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// /// Gets or sets the operation name. /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// /// Gets or sets job status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets activityId of job. /// - [JsonProperty(PropertyName = "activityId")] - public string ActivityId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "activityId")] + public string ActivityId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobOperationType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobOperationType.cs index b6bfc6440482..7702ecbb8e6f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobOperationType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobOperationType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for JobOperationType. /// + + public static class JobOperationType { public const string Invalid = "Invalid"; @@ -28,4 +25,4 @@ public static class JobOperationType public const string Undelete = "Undelete"; public const string UpdateCustomerManagedKey = "UpdateCustomerManagedKey"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobQueryObject.cs index 348a304a9d50..ddacea0829d0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,31 +23,39 @@ public JobQueryObject() /// /// Initializes a new instance of the JobQueryObject class. /// - /// Status of the job. Possible values include: - /// 'Invalid', 'InProgress', 'Completed', 'Failed', + + /// Status of the job. + /// Possible values include: 'Invalid', 'InProgress', 'Completed', 'Failed', /// 'CompletedWithWarnings', 'Cancelled', 'Cancelling' - /// Type of backup management for - /// the job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - /// 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Type of operation. Possible values include: - /// 'Invalid', 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', - /// 'Restore', 'DisableBackup', 'DeleteBackupData', - /// 'CrossRegionRestore', 'Undelete', + + /// Type of backup management for the job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Type of operation. + /// Possible values include: 'Invalid', 'Register', 'UnRegister', + /// 'ConfigureBackup', 'Backup', 'Restore', 'DisableBackup', + /// 'DeleteBackupData', 'CrossRegionRestore', 'Undelete', /// 'UpdateCustomerManagedKey' - /// JobID represents the job uniquely. - /// Job has started at this time. Value is in - /// UTC. - /// Job has ended at this time. Value is in - /// UTC. + + /// JobID represents the job uniquely. + /// + + /// Job has started at this time. Value is in UTC. + /// + + /// Job has ended at this time. Value is in UTC. + /// public JobQueryObject(string status = default(string), string backupManagementType = default(string), string operation = default(string), string jobId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?)) + { - Status = status; - BackupManagementType = backupManagementType; - Operation = operation; - JobId = jobId; - StartTime = startTime; - EndTime = endTime; + this.Status = status; + this.BackupManagementType = backupManagementType; + this.Operation = operation; + this.JobId = jobId; + this.StartTime = startTime; + this.EndTime = endTime; CustomInit(); } @@ -62,49 +64,41 @@ public JobQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets status of the job. Possible values include: 'Invalid', - /// 'InProgress', 'Completed', 'Failed', 'CompletedWithWarnings', - /// 'Cancelled', 'Cancelling' + /// Gets or sets status of the job. Possible values include: 'Invalid', 'InProgress', 'Completed', 'Failed', 'CompletedWithWarnings', 'Cancelled', 'Cancelling' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// - /// Gets or sets type of backup management for the job. Possible values - /// include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets type of backup management for the job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets type of operation. Possible values include: 'Invalid', - /// 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', - /// 'DisableBackup', 'DeleteBackupData', 'CrossRegionRestore', - /// 'Undelete', 'UpdateCustomerManagedKey' + /// Gets or sets type of operation. Possible values include: 'Invalid', 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', 'DisableBackup', 'DeleteBackupData', 'CrossRegionRestore', 'Undelete', 'UpdateCustomerManagedKey' /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// /// Gets or sets jobID represents the job uniquely. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; set; } /// /// Gets or sets job has started at this time. Value is in UTC. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets job has ended at this time. Value is in UTC. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobResource.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobResource.cs index a620e598cc25..dd9113a94e73 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,20 +23,33 @@ public JobResource() /// /// Initializes a new instance of the JobResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// JobResource properties - public JobResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), Job properties = default(Job)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// JobResource properties + /// + public JobResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), Job properties = default(Job)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -53,11 +58,11 @@ public JobResource() /// partial void CustomInit(); + /// /// Gets or sets jobResource properties /// - [JsonProperty(PropertyName = "properties")] - public Job Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public Job Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobStatus.cs index 1dee7b4c0cc5..e84021e16ae0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for JobStatus. /// + + public static class JobStatus { public const string Invalid = "Invalid"; @@ -24,4 +21,4 @@ public static class JobStatus public const string Cancelled = "Cancelled"; public const string Cancelling = "Cancelling"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobSupportedAction.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobSupportedAction.cs index 6719832ab03a..5a25f11fa3e1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobSupportedAction.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/JobSupportedAction.cs @@ -1,31 +1,24 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for JobSupportedAction. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum JobSupportedAction { - [EnumMember(Value = "Invalid")] + [System.Runtime.Serialization.EnumMember(Value = "Invalid")] Invalid, - [EnumMember(Value = "Cancellable")] + [System.Runtime.Serialization.EnumMember(Value = "Cancellable")] Cancellable, - [EnumMember(Value = "Retriable")] + [System.Runtime.Serialization.EnumMember(Value = "Retriable")] Retriable } internal static class JobSupportedActionEnumExtension @@ -34,7 +27,6 @@ internal static string ToSerializedValue(this JobSupportedAction? value) { return value == null ? null : ((JobSupportedAction)value).ToSerializedValue(); } - internal static string ToSerializedValue(this JobSupportedAction value) { switch( value ) @@ -48,7 +40,6 @@ internal static string ToSerializedValue(this JobSupportedAction value) } return null; } - internal static JobSupportedAction? ParseJobSupportedAction(this string value) { switch( value ) @@ -63,4 +54,4 @@ internal static string ToSerializedValue(this JobSupportedAction value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KEKDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KEKDetails.cs index 16c330f74f22..e9a23aec40ff 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KEKDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KEKDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,21 @@ public KEKDetails() /// /// Initializes a new instance of the KEKDetails class. /// - /// Key is KEK. - /// Key Vault ID where this Key is - /// stored. - /// KEK data. + + /// Key is KEK. + /// + + /// Key Vault ID where this Key is stored. + /// + + /// KEK data. + /// public KEKDetails(string keyUrl = default(string), string keyVaultId = default(string), string keyBackupData = default(string)) + { - KeyUrl = keyUrl; - KeyVaultId = keyVaultId; - KeyBackupData = keyBackupData; + this.KeyUrl = keyUrl; + this.KeyVaultId = keyVaultId; + this.KeyBackupData = keyBackupData; CustomInit(); } @@ -46,23 +46,23 @@ public KEKDetails() /// partial void CustomInit(); + /// /// Gets or sets key is KEK. /// - [JsonProperty(PropertyName = "keyUrl")] - public string KeyUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyUrl")] + public string KeyUrl {get; set; } /// /// Gets or sets key Vault ID where this Key is stored. /// - [JsonProperty(PropertyName = "keyVaultId")] - public string KeyVaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultId")] + public string KeyVaultId {get; set; } /// - /// Gets or sets KEK data. + /// Gets or sets kEK data. /// - [JsonProperty(PropertyName = "keyBackupData")] - public string KeyBackupData { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "keyBackupData")] + public string KeyBackupData {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KPIResourceHealthDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KPIResourceHealthDetails.cs index 8fa876c8f409..7e27fa6664f0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KPIResourceHealthDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KPIResourceHealthDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,19 @@ public KPIResourceHealthDetails() /// /// Initializes a new instance of the KPIResourceHealthDetails class. /// - /// Resource Health Status. Possible - /// values include: 'Healthy', 'TransientDegraded', + + /// Resource Health Status + /// Possible values include: 'Healthy', 'TransientDegraded', /// 'PersistentDegraded', 'TransientUnhealthy', 'PersistentUnhealthy', /// 'Invalid' - /// Resource Health Status - public KPIResourceHealthDetails(string resourceHealthStatus = default(string), IList resourceHealthDetails = default(IList)) + + /// Resource Health Status + /// + public KPIResourceHealthDetails(string resourceHealthStatus = default(string), System.Collections.Generic.IList resourceHealthDetails = default(System.Collections.Generic.IList)) + { - ResourceHealthStatus = resourceHealthStatus; - ResourceHealthDetails = resourceHealthDetails; + this.ResourceHealthStatus = resourceHealthStatus; + this.ResourceHealthDetails = resourceHealthDetails; CustomInit(); } @@ -48,19 +44,17 @@ public KPIResourceHealthDetails() /// partial void CustomInit(); + /// - /// Gets or sets resource Health Status. Possible values include: - /// 'Healthy', 'TransientDegraded', 'PersistentDegraded', - /// 'TransientUnhealthy', 'PersistentUnhealthy', 'Invalid' + /// Gets or sets resource Health Status Possible values include: 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', 'PersistentUnhealthy', 'Invalid' /// - [JsonProperty(PropertyName = "resourceHealthStatus")] - public string ResourceHealthStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceHealthStatus")] + public string ResourceHealthStatus {get; set; } /// /// Gets or sets resource Health Status /// - [JsonProperty(PropertyName = "resourceHealthDetails")] - public IList ResourceHealthDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceHealthDetails")] + public System.Collections.Generic.IList ResourceHealthDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KeyAndSecretDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KeyAndSecretDetails.cs index 7fe3e59fd84c..f0049e6dd6a9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KeyAndSecretDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/KeyAndSecretDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -35,15 +29,21 @@ public KeyAndSecretDetails() /// /// Initializes a new instance of the KeyAndSecretDetails class. /// - /// KEK is encryption key for BEK. - /// BEK is bitlocker encryption key. - /// Encryption mechanism: None/ - /// SinglePass/ DoublePass + + /// KEK is encryption key for BEK. + /// + + /// BEK is bitlocker encryption key. + /// + + /// Encryption mechanism: None/ SinglePass/ DoublePass + /// public KeyAndSecretDetails(KEKDetails kekDetails = default(KEKDetails), BEKDetails bekDetails = default(BEKDetails), string encryptionMechanism = default(string)) + { - KekDetails = kekDetails; - BekDetails = bekDetails; - EncryptionMechanism = encryptionMechanism; + this.KekDetails = kekDetails; + this.BekDetails = bekDetails; + this.EncryptionMechanism = encryptionMechanism; CustomInit(); } @@ -52,23 +52,23 @@ public KeyAndSecretDetails() /// partial void CustomInit(); + /// - /// Gets or sets KEK is encryption key for BEK. + /// Gets or sets kEK is encryption key for BEK. /// - [JsonProperty(PropertyName = "kekDetails")] - public KEKDetails KekDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekDetails")] + public KEKDetails KekDetails {get; set; } /// - /// Gets or sets BEK is bitlocker encryption key. + /// Gets or sets bEK is bitlocker encryption key. /// - [JsonProperty(PropertyName = "bekDetails")] - public BEKDetails BekDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "bekDetails")] + public BEKDetails BekDetails {get; set; } /// /// Gets or sets encryption mechanism: None/ SinglePass/ DoublePass /// - [JsonProperty(PropertyName = "encryptionMechanism")] - public string EncryptionMechanism { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionMechanism")] + public string EncryptionMechanism {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/LastBackupStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/LastBackupStatus.cs index 6b7c95f17a75..40380e3850cd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/LastBackupStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/LastBackupStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for LastBackupStatus. /// + + public static class LastBackupStatus { public const string Invalid = "Invalid"; @@ -21,4 +18,4 @@ public static class LastBackupStatus public const string Unhealthy = "Unhealthy"; public const string IRPending = "IRPending"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabErrorInfo.cs index 223ce3d910a6..9107c98fa3b7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,13 +23,17 @@ public MabErrorInfo() /// /// Initializes a new instance of the MabErrorInfo class. /// - /// Localized error string. - /// List of localized - /// recommendations. - public MabErrorInfo(string errorString = default(string), IList recommendations = default(IList)) + + /// Localized error string. + /// + + /// List of localized recommendations. + /// + public MabErrorInfo(string errorString = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - ErrorString = errorString; - Recommendations = recommendations; + this.ErrorString = errorString; + this.Recommendations = recommendations; CustomInit(); } @@ -46,17 +42,17 @@ public MabErrorInfo() /// partial void CustomInit(); + /// /// Gets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; private set; } /// /// Gets list of localized recommendations. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabFileFolderProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabFileFolderProtectedItem.cs index ca8cf50a50af..521f9e06fed2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabFileFolderProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabFileFolderProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,64 +24,88 @@ public MabFileFolderProtectedItem() /// /// Initializes a new instance of the MabFileFolderProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Friendly name of this backup - /// item. - /// Name of the computer associated with - /// this backup item. - /// Status of last backup - /// operation. - /// Timestamp of the last backup operation - /// on this backup item. - /// Protected, ProtectionStopped, - /// IRPending or ProtectionError - /// Sync time for deferred - /// deletion in UTC - /// Additional information with this backup - /// item. - public MabFileFolderProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string computerName = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectionState = default(string), long? deferredDeleteSyncTimeInUTC = default(long?), MabFileFolderProtectedItemExtendedInfo extendedInfo = default(MabFileFolderProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Friendly name of this backup item. + /// + + /// Name of the computer associated with this backup item. + /// + + /// Status of last backup operation. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Protected, ProtectionStopped, IRPending or ProtectionError + /// + + /// Sync time for deferred deletion in UTC + /// + + /// Additional information with this backup item. + /// + public MabFileFolderProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string friendlyName = default(string), string computerName = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectionState = default(string), long? deferredDeleteSyncTimeInUtc = default(long?), MabFileFolderProtectedItemExtendedInfo extendedInfo = default(MabFileFolderProtectedItemExtendedInfo)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { - FriendlyName = friendlyName; - ComputerName = computerName; - LastBackupStatus = lastBackupStatus; - LastBackupTime = lastBackupTime; - ProtectionState = protectionState; - DeferredDeleteSyncTimeInUTC = deferredDeleteSyncTimeInUTC; - ExtendedInfo = extendedInfo; + this.FriendlyName = friendlyName; + this.ComputerName = computerName; + this.LastBackupStatus = lastBackupStatus; + this.LastBackupTime = lastBackupTime; + this.ProtectionState = protectionState; + this.DeferredDeleteSyncTimeInUtc = deferredDeleteSyncTimeInUtc; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -98,49 +114,47 @@ public MabFileFolderProtectedItem() /// partial void CustomInit(); + /// /// Gets or sets friendly name of this backup item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets name of the computer associated with this backup item. /// - [JsonProperty(PropertyName = "computerName")] - public string ComputerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "computerName")] + public string ComputerName {get; set; } /// /// Gets or sets status of last backup operation. /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// - /// Gets or sets timestamp of the last backup operation on this backup - /// item. + /// Gets or sets timestamp of the last backup operation on this backup item. /// - [JsonProperty(PropertyName = "lastBackupTime")] - public System.DateTime? LastBackupTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupTime")] + public System.DateTime? LastBackupTime {get; set; } /// - /// Gets or sets protected, ProtectionStopped, IRPending or - /// ProtectionError + /// Gets or sets protected, ProtectionStopped, IRPending or ProtectionError /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// /// Gets or sets sync time for deferred deletion in UTC /// - [JsonProperty(PropertyName = "deferredDeleteSyncTimeInUTC")] - public long? DeferredDeleteSyncTimeInUTC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "deferredDeleteSyncTimeInUTC")] + public long? DeferredDeleteSyncTimeInUtc {get; set; } /// /// Gets or sets additional information with this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public MabFileFolderProtectedItemExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public MabFileFolderProtectedItemExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabFileFolderProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabFileFolderProtectedItemExtendedInfo.cs index a40e60adeecc..f8b43cb2a9d2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabFileFolderProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabFileFolderProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class MabFileFolderProtectedItemExtendedInfo { /// - /// Initializes a new instance of the - /// MabFileFolderProtectedItemExtendedInfo class. + /// Initializes a new instance of the MabFileFolderProtectedItemExtendedInfo class. /// public MabFileFolderProtectedItemExtendedInfo() { @@ -28,20 +21,23 @@ public MabFileFolderProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the - /// MabFileFolderProtectedItemExtendedInfo class. + /// Initializes a new instance of the MabFileFolderProtectedItemExtendedInfo class. /// - /// Last time when the agent data synced - /// to service. - /// The oldest backup copy - /// available. - /// Number of backup copies associated - /// with the backup item. + + /// Last time when the agent data synced to service. + /// + + /// The oldest backup copy available. + /// + + /// Number of backup copies associated with the backup item. + /// public MabFileFolderProtectedItemExtendedInfo(System.DateTime? lastRefreshedAt = default(System.DateTime?), System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?)) + { - LastRefreshedAt = lastRefreshedAt; - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; + this.LastRefreshedAt = lastRefreshedAt; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; CustomInit(); } @@ -50,24 +46,23 @@ public MabFileFolderProtectedItemExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets last time when the agent data synced to service. /// - [JsonProperty(PropertyName = "lastRefreshedAt")] - public System.DateTime? LastRefreshedAt { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRefreshedAt")] + public System.DateTime? LastRefreshedAt {get; set; } /// /// Gets or sets the oldest backup copy available. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets number of backup copies associated with the backup - /// item. + /// Gets or sets number of backup copies associated with the backup item. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJob.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJob.cs index dfc02b7eb703..c6ed57a83d26 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,47 +24,68 @@ public MabJob() /// /// Initializes a new instance of the MabJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Time taken by job to run. - /// The state/actions applicable on jobs like - /// cancel/retry. - /// Name of server protecting the - /// DS. - /// Server type of MAB container. Possible - /// values include: 'Invalid', 'Unknown', 'IaasVMContainer', - /// 'IaasVMServiceContainer', 'DPMContainer', - /// 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - /// 'AzureSqlContainer', 'Windows', 'VCenter', 'VMAppContainer', - /// 'SQLAGWorkLoadContainer', 'StorageContainer', + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Time taken by job to run. + /// + + /// The state/actions applicable on jobs like cancel/retry. + /// + + /// Name of server protecting the DS. + /// + + /// Server type of MAB container. + /// Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', + /// 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', + /// 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + /// 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', /// 'GenericContainer' - /// Workload type of backup item. Possible - /// values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', - /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', - /// 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase' - /// The errors. - /// Additional information on the - /// job. - public MabJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), string mabServerName = default(string), string mabServerType = default(string), string workloadType = default(string), IList errorDetails = default(IList), MabJobExtendedInfo extendedInfo = default(MabJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Workload type of backup item. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// The errors. + /// + + /// Additional information on the job. + /// + public MabJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), string mabServerName = default(string), string mabServerType = default(string), string workloadType = default(string), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), MabJobExtendedInfo extendedInfo = default(MabJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - Duration = duration; - ActionsInfo = actionsInfo; - MabServerName = mabServerName; - MabServerType = mabServerType; - WorkloadType = workloadType; - ErrorDetails = errorDetails; - ExtendedInfo = extendedInfo; + this.Duration = duration; + this.ActionsInfo = actionsInfo; + this.MabServerName = mabServerName; + this.MabServerType = mabServerType; + this.WorkloadType = workloadType; + this.ErrorDetails = errorDetails; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -81,57 +94,47 @@ public MabJob() /// partial void CustomInit(); + /// /// Gets or sets time taken by job to run. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets the state/actions applicable on jobs like - /// cancel/retry. + /// Gets or sets the state/actions applicable on jobs like cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets name of server protecting the DS. /// - [JsonProperty(PropertyName = "mabServerName")] - public string MabServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mabServerName")] + public string MabServerName {get; set; } /// - /// Gets or sets server type of MAB container. Possible values include: - /// 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', - /// 'DPMContainer', 'AzureBackupServerContainer', 'MABContainer', - /// 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', - /// 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', - /// 'GenericContainer' + /// Gets or sets server type of MAB container. Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', 'GenericContainer' /// - [JsonProperty(PropertyName = "mabServerType")] - public string MabServerType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mabServerType")] + public string MabServerType {get; set; } /// - /// Gets or sets workload type of backup item. Possible values include: - /// 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - /// 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase' + /// Gets or sets workload type of backup item. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// /// Gets or sets the errors. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// /// Gets or sets additional information on the job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public MabJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public MabJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJobExtendedInfo.cs index 700f3acbc6ab..24803cdc82a2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public MabJobExtendedInfo() /// /// Initializes a new instance of the MabJobExtendedInfo class. /// - /// List of tasks for this job. - /// The job properties. - /// Non localized error message - /// specific to this job. - public MabJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), string dynamicErrorMessage = default(string)) + + /// List of tasks for this job. + /// + + /// The job properties. + /// + + /// Non localized error message specific to this job. + /// + public MabJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -48,23 +46,23 @@ public MabJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks for this job. /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets the job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets non localized error message specific to this job. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJobTaskDetails.cs index 555d1b234618..96b565f85003 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,29 @@ public MabJobTaskDetails() /// /// Initializes a new instance of the MabJobTaskDetails class. /// - /// The task display name. - /// The start time. - /// The end time. - /// Time elapsed for task. - /// The status. + + /// The task display name. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// Time elapsed for task. + /// + + /// The status. + /// public MabJobTaskDetails(string taskId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.TimeSpan? duration = default(System.TimeSpan?), string status = default(string)) + { - TaskId = taskId; - StartTime = startTime; - EndTime = endTime; - Duration = duration; - Status = status; + this.TaskId = taskId; + this.StartTime = startTime; + this.EndTime = endTime; + this.Duration = duration; + this.Status = status; CustomInit(); } @@ -49,35 +54,35 @@ public MabJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets time elapsed for task. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabServerType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabServerType.cs index 5b4ddf631cee..f8c3c446907a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabServerType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/MabServerType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for MabServerType. /// + + public static class MabServerType { public const string Invalid = "Invalid"; @@ -28,8 +25,8 @@ public static class MabServerType public const string Windows = "Windows"; public const string VCenter = "VCenter"; public const string VMAppContainer = "VMAppContainer"; - public const string SQLAGWorkLoadContainer = "SQLAGWorkLoadContainer"; + public const string SqlagWorkLoadContainer = "SQLAGWorkLoadContainer"; public const string StorageContainer = "StorageContainer"; public const string GenericContainer = "GenericContainer"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NameInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NameInfo.cs index 0602c62de396..9993b1cf5a9a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NameInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NameInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public NameInfo() /// /// Initializes a new instance of the NameInfo class. /// - /// Value of usage. - /// Localized value of usage. + + /// Value of usage. + /// + + /// Localized value of usage. + /// public NameInfo(string value = default(string), string localizedValue = default(string)) + { - Value = value; - LocalizedValue = localizedValue; + this.Value = value; + this.LocalizedValue = localizedValue; CustomInit(); } @@ -43,17 +42,17 @@ public NameInfo() /// partial void CustomInit(); + /// /// Gets or sets value of usage. /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public string Value {get; set; } /// /// Gets or sets localized value of usage. /// - [JsonProperty(PropertyName = "localizedValue")] - public string LocalizedValue { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "localizedValue")] + public string LocalizedValue {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponse.cs index 5a529387b9d2..0f17bdec3c0a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponse.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public NewErrorResponse() /// /// Initializes a new instance of the NewErrorResponse class. /// - /// The error object. + + /// The error object. + /// public NewErrorResponse(NewErrorResponseError error = default(NewErrorResponseError)) + { - Error = error; + this.Error = error; CustomInit(); } @@ -41,11 +38,11 @@ public NewErrorResponse() /// partial void CustomInit(); + /// /// Gets or sets the error object. /// - [JsonProperty(PropertyName = "error")] - public NewErrorResponseError Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public NewErrorResponseError Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponseError.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponseError.cs index eb8ca79b2660..153be248ff41 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponseError.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponseError.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,18 +23,29 @@ public NewErrorResponseError() /// /// Initializes a new instance of the NewErrorResponseError class. /// - /// The error code. - /// The error message. - /// The error target. - /// The error details. - /// The error additional info. - public NewErrorResponseError(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) + + /// The error code. + /// + + /// The error message. + /// + + /// The error target. + /// + + /// The error details. + /// + + /// The error additional info. + /// + public NewErrorResponseError(string code = default(string), string message = default(string), string target = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList), System.Collections.Generic.IList additionalInfo = default(System.Collections.Generic.IList)) + { - Code = code; - Message = message; - Target = target; - Details = details; - AdditionalInfo = additionalInfo; + this.Code = code; + this.Message = message; + this.Target = target; + this.Details = details; + this.AdditionalInfo = additionalInfo; CustomInit(); } @@ -51,35 +54,35 @@ public NewErrorResponseError() /// partial void CustomInit(); + /// /// Gets the error code. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } /// /// Gets the error message. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } /// /// Gets the error target. /// - [JsonProperty(PropertyName = "target")] - public string Target { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "target")] + public string Target {get; private set; } /// /// Gets the error details. /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; private set; } /// /// Gets the error additional info. /// - [JsonProperty(PropertyName = "additionalInfo")] - public IList AdditionalInfo { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")] + public System.Collections.Generic.IList AdditionalInfo {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponseException.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponseException.cs index 47f657edcf51..e3269e39c59f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponseException.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/NewErrorResponseException.cs @@ -1,32 +1,25 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Microsoft.Rest; /// - /// Exception thrown for an invalid response with NewErrorResponse - /// information. + /// Exception thrown for an invalid response with NewErrorResponse information. /// - public partial class NewErrorResponseException : RestException + public partial class NewErrorResponseException : Microsoft.Rest.RestException { /// /// Gets information about the associated HTTP request. /// - public HttpRequestMessageWrapper Request { get; set; } + public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; } /// /// Gets information about the associated HTTP response. /// - public HttpResponseMessageWrapper Response { get; set; } + public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; } /// /// Gets or sets the body object. @@ -41,7 +34,7 @@ public NewErrorResponseException() } /// - /// Initializes a new instance of the NewErrorResponseException class. + /// Initializes a new instance of the NewErrorResponse class. /// /// The exception message. public NewErrorResponseException(string message) @@ -50,7 +43,7 @@ public NewErrorResponseException(string message) } /// - /// Initializes a new instance of the NewErrorResponseException class. + /// Initializes a new instance of the NewErrorResponse class. /// /// The exception message. /// Inner exception. @@ -59,4 +52,4 @@ public NewErrorResponseException(string message, System.Exception innerException { } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatus.cs index 4952c5e27518..2651030708dc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatus.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,26 +23,38 @@ public OperationStatus() /// /// Initializes a new instance of the OperationStatus class. /// - /// ID of the operation. - /// Name of the operation. - /// Operation status. Possible values include: - /// 'Invalid', 'InProgress', 'Succeeded', 'Failed', 'Canceled' - /// Operation start time. Format: - /// ISO-8601. - /// Operation end time. Format: ISO-8601. - /// Error information related to this - /// operation. - /// Additional information associated with - /// this operation. + + /// ID of the operation. + /// + + /// Name of the operation. + /// + + /// Operation status. + /// Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', + /// 'Canceled' + + /// Operation start time. Format: ISO-8601. + /// + + /// Operation end time. Format: ISO-8601. + /// + + /// Error information related to this operation. + /// + + /// Additional information associated with this operation. + /// public OperationStatus(string id = default(string), string name = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), OperationStatusError error = default(OperationStatusError), OperationStatusExtendedInfo properties = default(OperationStatusExtendedInfo)) + { - Id = id; - Name = name; - Status = status; - StartTime = startTime; - EndTime = endTime; - Error = error; - Properties = properties; + this.Id = id; + this.Name = name; + this.Status = status; + this.StartTime = startTime; + this.EndTime = endTime; + this.Error = error; + this.Properties = properties; CustomInit(); } @@ -57,48 +63,47 @@ public OperationStatus() /// partial void CustomInit(); + /// - /// Gets or sets ID of the operation. + /// Gets or sets iD of the operation. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets name of the operation. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// - /// Gets or sets operation status. Possible values include: 'Invalid', - /// 'InProgress', 'Succeeded', 'Failed', 'Canceled' + /// Gets or sets operation status. Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', 'Canceled' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets operation start time. Format: ISO-8601. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets operation end time. Format: ISO-8601. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets error information related to this operation. /// - [JsonProperty(PropertyName = "error")] - public OperationStatusError Error { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public OperationStatusError Error {get; set; } /// /// Gets or sets additional information associated with this operation. /// - [JsonProperty(PropertyName = "properties")] - public OperationStatusExtendedInfo Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public OperationStatusExtendedInfo Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusError.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusError.cs index ba778c24abb4..ecd9553b8dd9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusError.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusError.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public OperationStatusError() /// /// Initializes a new instance of the OperationStatusError class. /// - /// Error code of the operation failure. - /// Error message displayed if the operation - /// failure. + + /// Error code of the operation failure. + /// + + /// Error message displayed if the operation failure. + /// public OperationStatusError(string code = default(string), string message = default(string)) + { - Code = code; - Message = message; + this.Code = code; + this.Message = message; CustomInit(); } @@ -44,17 +42,17 @@ public OperationStatusError() /// partial void CustomInit(); + /// /// Gets or sets error code of the operation failure. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } /// /// Gets or sets error message displayed if the operation failure. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusExtendedInfo.cs index 18a7a2ac6445..9d6485b0a056 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class OperationStatusExtendedInfo { /// - /// Initializes a new instance of the OperationStatusExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusExtendedInfo class. /// public OperationStatusExtendedInfo() { @@ -35,4 +28,4 @@ public OperationStatusExtendedInfo() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusJobExtendedInfo.cs index d789d1860793..103bfdb2cc86 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusJobExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class OperationStatusJobExtendedInfo : OperationStatusExtendedInfo { /// - /// Initializes a new instance of the OperationStatusJobExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusJobExtendedInfo class. /// public OperationStatusJobExtendedInfo() { @@ -29,14 +22,15 @@ public OperationStatusJobExtendedInfo() } /// - /// Initializes a new instance of the OperationStatusJobExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusJobExtendedInfo class. /// - /// ID of the job created for this protected - /// item. + + /// ID of the job created for this protected item. + /// public OperationStatusJobExtendedInfo(string jobId = default(string)) + { - JobId = jobId; + this.JobId = jobId; CustomInit(); } @@ -45,11 +39,11 @@ public OperationStatusJobExtendedInfo() /// partial void CustomInit(); + /// - /// Gets or sets ID of the job created for this protected item. + /// Gets or sets iD of the job created for this protected item. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusJobsExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusJobsExtendedInfo.cs index c13cc43b2c43..95a5a92b4d1d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusJobsExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusJobsExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class OperationStatusJobsExtendedInfo : OperationStatusExtendedInfo { /// - /// Initializes a new instance of the OperationStatusJobsExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusJobsExtendedInfo class. /// public OperationStatusJobsExtendedInfo() { @@ -31,17 +22,19 @@ public OperationStatusJobsExtendedInfo() } /// - /// Initializes a new instance of the OperationStatusJobsExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusJobsExtendedInfo class. /// - /// IDs of the jobs created for the protected - /// item. - /// Stores all the failed jobs along with - /// the corresponding error codes. - public OperationStatusJobsExtendedInfo(IList jobIds = default(IList), IDictionary failedJobsError = default(IDictionary)) + + /// IDs of the jobs created for the protected item. + /// + + /// Stores all the failed jobs along with the corresponding error codes. + /// + public OperationStatusJobsExtendedInfo(System.Collections.Generic.IList jobIds = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary failedJobsError = default(System.Collections.Generic.IDictionary)) + { - JobIds = jobIds; - FailedJobsError = failedJobsError; + this.JobIds = jobIds; + this.FailedJobsError = failedJobsError; CustomInit(); } @@ -50,18 +43,18 @@ public OperationStatusJobsExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets iDs of the jobs created for the protected item. /// - [JsonProperty(PropertyName = "jobIds")] - public IList JobIds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobIds")] + public System.Collections.Generic.IList JobIds {get; set; } /// - /// Gets or sets stores all the failed jobs along with the - /// corresponding error codes. + /// Gets or sets stores all the failed jobs along with the corresponding error + /// codes. /// - [JsonProperty(PropertyName = "failedJobsError")] - public IDictionary FailedJobsError { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "failedJobsError")] + public System.Collections.Generic.IDictionary FailedJobsError {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusProvisionILRExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusProvisionILRExtendedInfo.cs index c94830a7f603..c8aa54738490 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusProvisionILRExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusProvisionILRExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class OperationStatusProvisionILRExtendedInfo : OperationStatusExtendedInfo { /// - /// Initializes a new instance of the - /// OperationStatusProvisionILRExtendedInfo class. + /// Initializes a new instance of the OperationStatusProvisionILRExtendedInfo class. /// public OperationStatusProvisionILRExtendedInfo() { @@ -29,14 +22,15 @@ public OperationStatusProvisionILRExtendedInfo() } /// - /// Initializes a new instance of the - /// OperationStatusProvisionILRExtendedInfo class. + /// Initializes a new instance of the OperationStatusProvisionILRExtendedInfo class. /// - /// Target details for file / folder - /// restore. + + /// Target details for file / folder restore. + /// public OperationStatusProvisionILRExtendedInfo(InstantItemRecoveryTarget recoveryTarget = default(InstantItemRecoveryTarget)) + { - RecoveryTarget = recoveryTarget; + this.RecoveryTarget = recoveryTarget; CustomInit(); } @@ -45,11 +39,11 @@ public OperationStatusProvisionILRExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets target details for file / folder restore. /// - [JsonProperty(PropertyName = "recoveryTarget")] - public InstantItemRecoveryTarget RecoveryTarget { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryTarget")] + public InstantItemRecoveryTarget RecoveryTarget {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusRecoveryPointExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusRecoveryPointExtendedInfo.cs index c1684f9ff405..8856152278b8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusRecoveryPointExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusRecoveryPointExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class OperationStatusRecoveryPointExtendedInfo : OperationStatusExtendedInfo { /// - /// Initializes a new instance of the - /// OperationStatusRecoveryPointExtendedInfo class. + /// Initializes a new instance of the OperationStatusRecoveryPointExtendedInfo class. /// public OperationStatusRecoveryPointExtendedInfo() { @@ -29,18 +22,20 @@ public OperationStatusRecoveryPointExtendedInfo() } /// - /// Initializes a new instance of the - /// OperationStatusRecoveryPointExtendedInfo class. + /// Initializes a new instance of the OperationStatusRecoveryPointExtendedInfo class. /// - /// Recovery Point info with updated - /// source snapshot URI - /// In case the share is in - /// soft-deleted state, populate this field with deleted backup - /// item + + /// Recovery Point info with updated source snapshot URI + /// + + /// In case the share is in soft-deleted state, populate this field with + /// deleted backup item + /// public OperationStatusRecoveryPointExtendedInfo(RecoveryPoint updatedRecoveryPoint = default(RecoveryPoint), string deletedBackupItemVersion = default(string)) + { - UpdatedRecoveryPoint = updatedRecoveryPoint; - DeletedBackupItemVersion = deletedBackupItemVersion; + this.UpdatedRecoveryPoint = updatedRecoveryPoint; + this.DeletedBackupItemVersion = deletedBackupItemVersion; CustomInit(); } @@ -49,18 +44,18 @@ public OperationStatusRecoveryPointExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets recovery Point info with updated source snapshot URI /// - [JsonProperty(PropertyName = "updatedRecoveryPoint")] - public RecoveryPoint UpdatedRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "updatedRecoveryPoint")] + public RecoveryPoint UpdatedRecoveryPoint {get; set; } /// - /// Gets or sets in case the share is in soft-deleted state, populate - /// this field with deleted backup item + /// Gets or sets in case the share is in soft-deleted state, populate this + /// field with deleted backup item /// - [JsonProperty(PropertyName = "deletedBackupItemVersion")] - public string DeletedBackupItemVersion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "deletedBackupItemVersion")] + public string DeletedBackupItemVersion {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusValues.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusValues.cs index 59681bbf011d..00e788a3d783 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusValues.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OperationStatusValues.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for OperationStatusValues. /// + + public static class OperationStatusValues { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class OperationStatusValues public const string Failed = "Failed"; public const string Canceled = "Canceled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OverwriteOptions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OverwriteOptions.cs index 29a939719dc3..59de71b30f09 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OverwriteOptions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/OverwriteOptions.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for OverwriteOptions. /// + + public static class OverwriteOptions { public const string Invalid = "Invalid"; public const string FailOnConflict = "FailOnConflict"; public const string Overwrite = "Overwrite"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Page.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Page.cs index b2b2b1f2012b..29517b53e9c1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Page.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Page.cs @@ -1,53 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; /// /// Defines a page in Azure responses. /// /// Type of the page content items - [JsonObject] - public class Page : IPage + [Newtonsoft.Json.JsonObject] + public class Page : Microsoft.Rest.Azure.IPage { - /// - /// Gets the link to the next page. - /// - [JsonProperty("")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Page1.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Page1.cs index c4534445ccd5..73ca8a097a3a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Page1.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Page1.cs @@ -1,53 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; /// /// Defines a page in Azure responses. /// /// Type of the page content items - [JsonObject] - public class Page1 : IPage + [Newtonsoft.Json.JsonObject] + public class Page1 : Microsoft.Rest.Azure.IPage { - /// - /// Gets the link to the next page. - /// - [JsonProperty("nextLink")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("nextLink")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/PointInTimeRange.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/PointInTimeRange.cs index d44bbc75e6fd..6239e1a4c97d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/PointInTimeRange.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/PointInTimeRange.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,17 @@ public PointInTimeRange() /// /// Initializes a new instance of the PointInTimeRange class. /// - /// Start time of the time range for log - /// recovery. - /// End time of the time range for log - /// recovery. + + /// Start time of the time range for log recovery. + /// + + /// End time of the time range for log recovery. + /// public PointInTimeRange(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?)) + { - StartTime = startTime; - EndTime = endTime; + this.StartTime = startTime; + this.EndTime = endTime; CustomInit(); } @@ -45,17 +42,17 @@ public PointInTimeRange() /// partial void CustomInit(); + /// /// Gets or sets start time of the time range for log recovery. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets end time of the time range for log recovery. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItem.cs index e480672cdb9f..cd876c167df5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,56 +24,73 @@ public ProtectedItem() /// /// Initializes a new instance of the ProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - public ProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList)) + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + public ProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList)) + { - BackupManagementType = backupManagementType; - WorkloadType = workloadType; - ContainerName = containerName; - SourceResourceId = sourceResourceId; - PolicyId = policyId; - LastRecoveryPoint = lastRecoveryPoint; - BackupSetName = backupSetName; - CreateMode = createMode; - DeferredDeleteTimeInUTC = deferredDeleteTimeInUTC; - IsScheduledForDeferredDelete = isScheduledForDeferredDelete; - DeferredDeleteTimeRemaining = deferredDeleteTimeRemaining; - IsDeferredDeleteScheduleUpcoming = isDeferredDeleteScheduleUpcoming; - IsRehydrate = isRehydrate; - ResourceGuardOperationRequests = resourceGuardOperationRequests; + this.BackupManagementType = backupManagementType; + this.WorkloadType = workloadType; + this.ContainerName = containerName; + this.SourceResourceId = sourceResourceId; + this.PolicyId = policyId; + this.LastRecoveryPoint = lastRecoveryPoint; + this.BackupSetName = backupSetName; + this.CreateMode = createMode; + this.DeferredDeleteTimeInUtc = deferredDeleteTimeInUtc; + this.IsScheduledForDeferredDelete = isScheduledForDeferredDelete; + this.DeferredDeleteTimeRemaining = deferredDeleteTimeRemaining; + this.IsDeferredDeleteScheduleUpcoming = isDeferredDeleteScheduleUpcoming; + this.IsRehydrate = isRehydrate; + this.ResourceGuardOperationRequests = resourceGuardOperationRequests; CustomInit(); } @@ -90,105 +99,96 @@ public ProtectedItem() /// partial void CustomInit(); + /// - /// Gets or sets type of backup management for the backed up item. - /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets type of backup management for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets type of workload this item represents. Possible values - /// include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', - /// 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase' + /// Gets or sets type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// /// Gets or sets unique name of container /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// - /// Gets or sets ARM ID of the resource to be backed up. + /// Gets or sets aRM ID of the resource to be backed up. /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// - /// Gets or sets ID of the backup policy with which this item is backed - /// up. + /// Gets or sets iD of the backup policy with which this item is backed up. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// - /// Gets or sets timestamp when the last (latest) backup copy was - /// created for this backup item. + /// Gets or sets timestamp when the last (latest) backup copy was created for + /// this backup item. /// - [JsonProperty(PropertyName = "lastRecoveryPoint")] - public System.DateTime? LastRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRecoveryPoint")] + public System.DateTime? LastRecoveryPoint {get; set; } /// /// Gets or sets name of the backup set the backup item belongs to /// - [JsonProperty(PropertyName = "backupSetName")] - public string BackupSetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupSetName")] + public string BackupSetName {get; set; } /// - /// Gets or sets create mode to indicate recovery of existing soft - /// deleted data source or creation of new data source. Possible values - /// include: 'Invalid', 'Default', 'Recover' + /// Gets or sets create mode to indicate recovery of existing soft deleted data + /// source or creation of new data source. Possible values include: 'Invalid', 'Default', 'Recover' /// - [JsonProperty(PropertyName = "createMode")] - public string CreateMode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createMode")] + public string CreateMode {get; set; } /// /// Gets or sets time for deferred deletion in UTC /// - [JsonProperty(PropertyName = "deferredDeleteTimeInUTC")] - public System.DateTime? DeferredDeleteTimeInUTC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "deferredDeleteTimeInUTC")] + public System.DateTime? DeferredDeleteTimeInUtc {get; set; } /// - /// Gets or sets flag to identify whether the DS is scheduled for - /// deferred delete + /// Gets or sets flag to identify whether the DS is scheduled for deferred + /// delete /// - [JsonProperty(PropertyName = "isScheduledForDeferredDelete")] - public bool? IsScheduledForDeferredDelete { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isScheduledForDeferredDelete")] + public bool? IsScheduledForDeferredDelete {get; set; } /// - /// Gets or sets time remaining before the DS marked for deferred - /// delete is permanently deleted + /// Gets or sets time remaining before the DS marked for deferred delete is + /// permanently deleted /// - [JsonProperty(PropertyName = "deferredDeleteTimeRemaining")] - public string DeferredDeleteTimeRemaining { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "deferredDeleteTimeRemaining")] + public string DeferredDeleteTimeRemaining {get; set; } /// - /// Gets or sets flag to identify whether the deferred deleted DS is to - /// be purged soon + /// Gets or sets flag to identify whether the deferred deleted DS is to be + /// purged soon /// - [JsonProperty(PropertyName = "isDeferredDeleteScheduleUpcoming")] - public bool? IsDeferredDeleteScheduleUpcoming { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isDeferredDeleteScheduleUpcoming")] + public bool? IsDeferredDeleteScheduleUpcoming {get; set; } /// - /// Gets or sets flag to identify that deferred deleted DS is to be - /// moved into Pause state + /// Gets or sets flag to identify that deferred deleted DS is to be moved into + /// Pause state /// - [JsonProperty(PropertyName = "isRehydrate")] - public bool? IsRehydrate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isRehydrate")] + public bool? IsRehydrate {get; set; } /// - /// Gets or sets resourceGuardOperationRequests on which LAC check will - /// be performed + /// Gets or sets resourceGuardOperationRequests on which LAC check will be + /// performed /// - [JsonProperty(PropertyName = "resourceGuardOperationRequests")] - public IList ResourceGuardOperationRequests { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public System.Collections.Generic.IList ResourceGuardOperationRequests {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemHealthStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemHealthStatus.cs index 6e3d2ed3cdd5..f7edeab2578d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemHealthStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemHealthStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for ProtectedItemHealthStatus. /// + + public static class ProtectedItemHealthStatus { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class ProtectedItemHealthStatus public const string NotReachable = "NotReachable"; public const string IRPending = "IRPending"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemQueryObject.cs index a8f4a987b51e..b3979b4f63f3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,36 +23,51 @@ public ProtectedItemQueryObject() /// /// Initializes a new instance of the ProtectedItemQueryObject class. /// + /// Health State for the backed up item. - /// Possible values include: 'Passed', 'ActionRequired', - /// 'ActionSuggested', 'Invalid' - /// Backup management type for the - /// backed up item. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' + /// Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + /// 'Invalid' + + /// Backup management type for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' - /// Backup policy name associated with the - /// backup item. - /// Name of the container. - /// Backup Engine name - /// Friendly name of protected item - /// Name of the fabric. - /// Name of the backup set. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase' + + /// Backup policy name associated with the backup item. + /// + + /// Name of the container. + /// + + /// Backup Engine name + /// + + /// Friendly name of protected item + /// + + /// Name of the fabric. + /// + + /// Name of the backup set. + /// public ProtectedItemQueryObject(string healthState = default(string), string backupManagementType = default(string), string itemType = default(string), string policyName = default(string), string containerName = default(string), string backupEngineName = default(string), string friendlyName = default(string), string fabricName = default(string), string backupSetName = default(string)) + { - HealthState = healthState; - BackupManagementType = backupManagementType; - ItemType = itemType; - PolicyName = policyName; - ContainerName = containerName; - BackupEngineName = backupEngineName; - FriendlyName = friendlyName; - FabricName = fabricName; - BackupSetName = backupSetName; + this.HealthState = healthState; + this.BackupManagementType = backupManagementType; + this.ItemType = itemType; + this.PolicyName = policyName; + this.ContainerName = containerName; + this.BackupEngineName = backupEngineName; + this.FriendlyName = friendlyName; + this.FabricName = fabricName; + this.BackupSetName = backupSetName; CustomInit(); } @@ -67,67 +76,59 @@ public ProtectedItemQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets health State for the backed up item. Possible values - /// include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + /// Gets or sets health State for the backed up item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' /// - [JsonProperty(PropertyName = "healthState")] - public string HealthState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthState")] + public string HealthState {get; set; } /// - /// Gets or sets backup management type for the backed up item. - /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets type of workload this item represents. Possible values - /// include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', - /// 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase' + /// Gets or sets type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase' /// - [JsonProperty(PropertyName = "itemType")] - public string ItemType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "itemType")] + public string ItemType {get; set; } /// /// Gets or sets backup policy name associated with the backup item. /// - [JsonProperty(PropertyName = "policyName")] - public string PolicyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyName")] + public string PolicyName {get; set; } /// /// Gets or sets name of the container. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets backup Engine name /// - [JsonProperty(PropertyName = "backupEngineName")] - public string BackupEngineName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupEngineName")] + public string BackupEngineName {get; set; } /// /// Gets or sets friendly name of protected item /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets name of the fabric. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// /// Gets or sets name of the backup set. /// - [JsonProperty(PropertyName = "backupSetName")] - public string BackupSetName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "backupSetName")] + public string BackupSetName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemResource.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemResource.cs index b876d1eca25c..5948e913b7d0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,20 +23,33 @@ public ProtectedItemResource() /// /// Initializes a new instance of the ProtectedItemResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// ProtectedItemResource properties - public ProtectedItemResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), ProtectedItem properties = default(ProtectedItem)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// ProtectedItemResource properties + /// + public ProtectedItemResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), ProtectedItem properties = default(ProtectedItem)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -53,11 +58,11 @@ public ProtectedItemResource() /// partial void CustomInit(); + /// /// Gets or sets protectedItemResource properties /// - [JsonProperty(PropertyName = "properties")] - public ProtectedItem Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ProtectedItem Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemState.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemState.cs index d3875283fafc..d847deed1881 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectedItemState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for ProtectedItemState. /// + + public static class ProtectedItemState { public const string Invalid = "Invalid"; @@ -23,4 +20,4 @@ public static class ProtectedItemState public const string ProtectionStopped = "ProtectionStopped"; public const string ProtectionPaused = "ProtectionPaused"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectionState.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectionState.cs index dd8b452b28b3..92050ddbdc16 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectionState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ProtectionState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for ProtectionState. /// + + public static class ProtectionState { public const string Invalid = "Invalid"; @@ -23,4 +20,4 @@ public static class ProtectionState public const string ProtectionStopped = "ProtectionStopped"; public const string ProtectionPaused = "ProtectionPaused"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryMode.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryMode.cs index 92e662e7e5ad..74e5f869215e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryMode.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for RecoveryMode. /// + + public static class RecoveryMode { public const string Invalid = "Invalid"; public const string FileRecovery = "FileRecovery"; public const string WorkloadRecovery = "WorkloadRecovery"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPoint.cs index fa74acf85cb0..a9d00325dba5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPoint.cs @@ -1,21 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Base class for backup copies. Workload-specific backup copies are - /// derived from this class. + /// Base class for backup copies. Workload-specific backup copies are derived + /// from this class. /// [Newtonsoft.Json.JsonObject("RecoveryPoint")] public partial class RecoveryPoint @@ -35,4 +29,4 @@ public RecoveryPoint() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointDiskConfiguration.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointDiskConfiguration.cs index 3635d62bc192..fbf6373eac5b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointDiskConfiguration.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointDiskConfiguration.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class RecoveryPointDiskConfiguration { /// - /// Initializes a new instance of the RecoveryPointDiskConfiguration - /// class. + /// Initializes a new instance of the RecoveryPointDiskConfiguration class. /// public RecoveryPointDiskConfiguration() { @@ -30,23 +21,27 @@ public RecoveryPointDiskConfiguration() } /// - /// Initializes a new instance of the RecoveryPointDiskConfiguration - /// class. + /// Initializes a new instance of the RecoveryPointDiskConfiguration class. /// - /// Number of disks - /// included in backup - /// Number of disks attached to - /// the VM - /// Information of disks included in - /// backup - /// Information of disks excluded from - /// backup - public RecoveryPointDiskConfiguration(int? numberOfDisksIncludedInBackup = default(int?), int? numberOfDisksAttachedToVm = default(int?), IList includedDiskList = default(IList), IList excludedDiskList = default(IList)) + + /// Number of disks included in backup + /// + + /// Number of disks attached to the VM + /// + + /// Information of disks included in backup + /// + + /// Information of disks excluded from backup + /// + public RecoveryPointDiskConfiguration(int? numberOfDisksIncludedInBackup = default(int?), int? numberOfDisksAttachedToVM = default(int?), System.Collections.Generic.IList includedDiskList = default(System.Collections.Generic.IList), System.Collections.Generic.IList excludedDiskList = default(System.Collections.Generic.IList)) + { - NumberOfDisksIncludedInBackup = numberOfDisksIncludedInBackup; - NumberOfDisksAttachedToVm = numberOfDisksAttachedToVm; - IncludedDiskList = includedDiskList; - ExcludedDiskList = excludedDiskList; + this.NumberOfDisksIncludedInBackup = numberOfDisksIncludedInBackup; + this.NumberOfDisksAttachedToVM = numberOfDisksAttachedToVM; + this.IncludedDiskList = includedDiskList; + this.ExcludedDiskList = excludedDiskList; CustomInit(); } @@ -55,29 +50,29 @@ public RecoveryPointDiskConfiguration() /// partial void CustomInit(); + /// /// Gets or sets number of disks included in backup /// - [JsonProperty(PropertyName = "numberOfDisksIncludedInBackup")] - public int? NumberOfDisksIncludedInBackup { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "numberOfDisksIncludedInBackup")] + public int? NumberOfDisksIncludedInBackup {get; set; } /// /// Gets or sets number of disks attached to the VM /// - [JsonProperty(PropertyName = "numberOfDisksAttachedToVm")] - public int? NumberOfDisksAttachedToVm { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "numberOfDisksAttachedToVm")] + public int? NumberOfDisksAttachedToVM {get; set; } /// /// Gets or sets information of disks included in backup /// - [JsonProperty(PropertyName = "includedDiskList")] - public IList IncludedDiskList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "includedDiskList")] + public System.Collections.Generic.IList IncludedDiskList {get; set; } /// /// Gets or sets information of disks excluded from backup /// - [JsonProperty(PropertyName = "excludedDiskList")] - public IList ExcludedDiskList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "excludedDiskList")] + public System.Collections.Generic.IList ExcludedDiskList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointMoveReadinessInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointMoveReadinessInfo.cs index baa23e9ded06..b073d3d24cd3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointMoveReadinessInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointMoveReadinessInfo.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; public partial class RecoveryPointMoveReadinessInfo { /// - /// Initializes a new instance of the RecoveryPointMoveReadinessInfo - /// class. + /// Initializes a new instance of the RecoveryPointMoveReadinessInfo class. /// public RecoveryPointMoveReadinessInfo() { @@ -25,13 +18,19 @@ public RecoveryPointMoveReadinessInfo() } /// - /// Initializes a new instance of the RecoveryPointMoveReadinessInfo - /// class. + /// Initializes a new instance of the RecoveryPointMoveReadinessInfo class. /// + + /// + /// + + /// + /// public RecoveryPointMoveReadinessInfo(bool? isReadyForMove = default(bool?), string additionalInfo = default(string)) + { - IsReadyForMove = isReadyForMove; - AdditionalInfo = additionalInfo; + this.IsReadyForMove = isReadyForMove; + this.AdditionalInfo = additionalInfo; CustomInit(); } @@ -40,15 +39,17 @@ public RecoveryPointMoveReadinessInfo() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "isReadyForMove")] - public bool? IsReadyForMove { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isReadyForMove")] + public bool? IsReadyForMove {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "additionalInfo")] - public string AdditionalInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")] + public string AdditionalInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointResource.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointResource.cs index f0c3fe149008..60902d35608c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointResource.cs @@ -1,23 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Base class for backup copies. Workload-specific backup copies are - /// derived from this class. + /// Base class for backup copies. Workload-specific backup copies are derived + /// from this class. /// public partial class RecoveryPointResource : Resource { @@ -32,20 +24,33 @@ public RecoveryPointResource() /// /// Initializes a new instance of the RecoveryPointResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// RecoveryPointResource properties - public RecoveryPointResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), RecoveryPoint properties = default(RecoveryPoint)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// RecoveryPointResource properties + /// + public RecoveryPointResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), RecoveryPoint properties = default(RecoveryPoint)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -54,11 +59,11 @@ public RecoveryPointResource() /// partial void CustomInit(); + /// /// Gets or sets recoveryPointResource properties /// - [JsonProperty(PropertyName = "properties")] - public RecoveryPoint Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RecoveryPoint Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierInformation.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierInformation.cs index ef66c1a59316..5c7859ee5833 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierInformation.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierInformation.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. public partial class RecoveryPointTierInformation { /// - /// Initializes a new instance of the RecoveryPointTierInformation - /// class. + /// Initializes a new instance of the RecoveryPointTierInformation class. /// public RecoveryPointTierInformation() { @@ -30,20 +21,24 @@ public RecoveryPointTierInformation() } /// - /// Initializes a new instance of the RecoveryPointTierInformation - /// class. + /// Initializes a new instance of the RecoveryPointTierInformation class. /// - /// Recovery point tier type. Possible values - /// include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' - /// Recovery point tier status. Possible values - /// include: 'Invalid', 'Valid', 'Disabled', 'Deleted', + + /// Recovery point tier type. + /// Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + + /// Recovery point tier status. + /// Possible values include: 'Invalid', 'Valid', 'Disabled', 'Deleted', /// 'Rehydrated' - /// Recovery point tier status. - public RecoveryPointTierInformation(RecoveryPointTierType? type = default(RecoveryPointTierType?), RecoveryPointTierStatus? status = default(RecoveryPointTierStatus?), IDictionary extendedInfo = default(IDictionary)) + + /// Recovery point tier status. + /// + public RecoveryPointTierInformation(RecoveryPointTierType? type = default(RecoveryPointTierType?), RecoveryPointTierStatus? status = default(RecoveryPointTierStatus?), System.Collections.Generic.IDictionary extendedInfo = default(System.Collections.Generic.IDictionary)) + { - Type = type; - Status = status; - ExtendedInfo = extendedInfo; + this.Type = type; + this.Status = status; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -52,25 +47,23 @@ public RecoveryPointTierInformation() /// partial void CustomInit(); + /// - /// Gets or sets recovery point tier type. Possible values include: - /// 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + /// Gets or sets recovery point tier type. Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' /// - [JsonProperty(PropertyName = "type")] - public RecoveryPointTierType? Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public RecoveryPointTierType? Type {get; set; } /// - /// Gets or sets recovery point tier status. Possible values include: - /// 'Invalid', 'Valid', 'Disabled', 'Deleted', 'Rehydrated' + /// Gets or sets recovery point tier status. Possible values include: 'Invalid', 'Valid', 'Disabled', 'Deleted', 'Rehydrated' /// - [JsonProperty(PropertyName = "status")] - public RecoveryPointTierStatus? Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public RecoveryPointTierStatus? Status {get; set; } /// /// Gets or sets recovery point tier status. /// - [JsonProperty(PropertyName = "extendedInfo")] - public IDictionary ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public System.Collections.Generic.IDictionary ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierStatus.cs index 86d5e9de9450..15a32b0fa870 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierStatus.cs @@ -1,35 +1,28 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for RecoveryPointTierStatus. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum RecoveryPointTierStatus { - [EnumMember(Value = "Invalid")] + [System.Runtime.Serialization.EnumMember(Value = "Invalid")] Invalid, - [EnumMember(Value = "Valid")] + [System.Runtime.Serialization.EnumMember(Value = "Valid")] Valid, - [EnumMember(Value = "Disabled")] + [System.Runtime.Serialization.EnumMember(Value = "Disabled")] Disabled, - [EnumMember(Value = "Deleted")] + [System.Runtime.Serialization.EnumMember(Value = "Deleted")] Deleted, - [EnumMember(Value = "Rehydrated")] + [System.Runtime.Serialization.EnumMember(Value = "Rehydrated")] Rehydrated } internal static class RecoveryPointTierStatusEnumExtension @@ -38,7 +31,6 @@ internal static string ToSerializedValue(this RecoveryPointTierStatus? value) { return value == null ? null : ((RecoveryPointTierStatus)value).ToSerializedValue(); } - internal static string ToSerializedValue(this RecoveryPointTierStatus value) { switch( value ) @@ -56,7 +48,6 @@ internal static string ToSerializedValue(this RecoveryPointTierStatus value) } return null; } - internal static RecoveryPointTierStatus? ParseRecoveryPointTierStatus(this string value) { switch( value ) @@ -75,4 +66,4 @@ internal static string ToSerializedValue(this RecoveryPointTierStatus value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierType.cs index aaf65f967f79..167b589d7c7f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryPointTierType.cs @@ -1,33 +1,26 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for RecoveryPointTierType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum RecoveryPointTierType { - [EnumMember(Value = "Invalid")] + [System.Runtime.Serialization.EnumMember(Value = "Invalid")] Invalid, - [EnumMember(Value = "InstantRP")] + [System.Runtime.Serialization.EnumMember(Value = "InstantRP")] InstantRP, - [EnumMember(Value = "HardenedRP")] + [System.Runtime.Serialization.EnumMember(Value = "HardenedRP")] HardenedRP, - [EnumMember(Value = "ArchivedRP")] + [System.Runtime.Serialization.EnumMember(Value = "ArchivedRP")] ArchivedRP } internal static class RecoveryPointTierTypeEnumExtension @@ -36,7 +29,6 @@ internal static string ToSerializedValue(this RecoveryPointTierType? value) { return value == null ? null : ((RecoveryPointTierType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this RecoveryPointTierType value) { switch( value ) @@ -52,7 +44,6 @@ internal static string ToSerializedValue(this RecoveryPointTierType value) } return null; } - internal static RecoveryPointTierType? ParseRecoveryPointTierType(this string value) { switch( value ) @@ -69,4 +60,4 @@ internal static string ToSerializedValue(this RecoveryPointTierType value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryType.cs index 4d626a99c7d2..a424e84c64af 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RecoveryType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for RecoveryType. /// + + public static class RecoveryType { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class RecoveryType public const string RestoreDisks = "RestoreDisks"; public const string Offline = "Offline"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Resource.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Resource.cs index 09391c782a7b..706d283f0965 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Resource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Resource.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// ARM Resource. /// - public partial class Resource : IResource + public partial class Resource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the Resource class. @@ -33,23 +23,34 @@ public Resource() /// /// Initializes a new instance of the Resource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string)) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string)) + { - Id = id; - Name = name; - Type = type; - Location = location; - Tags = tags; - ETag = eTag; + this.Id = id; + this.Name = name; + this.Type = type; + this.Location = location; + this.Tags = tags; + this.ETag = eTag; CustomInit(); } @@ -58,42 +59,42 @@ public Resource() /// partial void CustomInit(); + /// /// Gets resource Id represents the complete path to the resource. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets resource name associated with the resource. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + 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; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets resource location. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets resource tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Gets or sets optional ETag. /// - [JsonProperty(PropertyName = "eTag")] - public string ETag { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "eTag")] + public string ETag {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceHealthDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceHealthDetails.cs index f65fdd2ad702..916d9858f16e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceHealthDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceHealthDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,16 +23,25 @@ public ResourceHealthDetails() /// /// Initializes a new instance of the ResourceHealthDetails class. /// - /// Health Code - /// Health Title - /// Health Message - /// Health Recommended Actions - public ResourceHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), IList recommendations = default(IList)) + + /// Health Code + /// + + /// Health Title + /// + + /// Health Message + /// + + /// Health Recommended Actions + /// + public ResourceHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - Code = code; - Title = title; - Message = message; - Recommendations = recommendations; + this.Code = code; + this.Title = title; + this.Message = message; + this.Recommendations = recommendations; CustomInit(); } @@ -49,29 +50,29 @@ public ResourceHealthDetails() /// partial void CustomInit(); + /// /// Gets health Code /// - [JsonProperty(PropertyName = "code")] - public int? Code { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public int? Code {get; private set; } /// /// Gets health Title /// - [JsonProperty(PropertyName = "title")] - public string Title { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "title")] + public string Title {get; private set; } /// /// Gets health Message /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } /// /// Gets health Recommended Actions /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceHealthStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceHealthStatus.cs index 4941b960062e..fad0b59e4714 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceHealthStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceHealthStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for ResourceHealthStatus. /// + + public static class ResourceHealthStatus { public const string Healthy = "Healthy"; @@ -23,4 +20,4 @@ public static class ResourceHealthStatus public const string PersistentUnhealthy = "PersistentUnhealthy"; public const string Invalid = "Invalid"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceList.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceList.cs index 6b8ae9386cc0..0ed2063e2972 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceList.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/ResourceList.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,14 @@ public ResourceList() /// /// Initializes a new instance of the ResourceList class. /// - /// The uri to fetch the next page of resources. - /// Call ListNext() fetches next page of resources. + + /// The uri to fetch the next page of resources. Call ListNext() fetches next + /// page of resources. + /// public ResourceList(string nextLink = default(string)) + { - NextLink = nextLink; + this.NextLink = nextLink; CustomInit(); } @@ -42,12 +39,12 @@ public ResourceList() /// partial void CustomInit(); + /// - /// Gets or sets the uri to fetch the next page of resources. Call - /// ListNext() fetches next page of resources. + /// Gets or sets the uri to fetch the next page of resources. Call ListNext() + /// fetches next page of resources. /// - [JsonProperty(PropertyName = "nextLink")] - public string NextLink { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "nextLink")] + public string NextLink {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreFileSpecs.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreFileSpecs.cs index 21fd9ed68161..877c4a51901a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreFileSpecs.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreFileSpecs.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,21 @@ public RestoreFileSpecs() /// /// Initializes a new instance of the RestoreFileSpecs class. /// - /// Source File/Folder path - /// Indicates what the Path variable stands - /// for - /// Destination folder path in target - /// FileShare + + /// Source File/Folder path + /// + + /// Indicates what the Path variable stands for + /// + + /// Destination folder path in target FileShare + /// public RestoreFileSpecs(string path = default(string), string fileSpecType = default(string), string targetFolderPath = default(string)) + { - Path = path; - FileSpecType = fileSpecType; - TargetFolderPath = targetFolderPath; + this.Path = path; + this.FileSpecType = fileSpecType; + this.TargetFolderPath = targetFolderPath; CustomInit(); } @@ -47,23 +46,23 @@ public RestoreFileSpecs() /// partial void CustomInit(); + /// /// Gets or sets source File/Folder path /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } /// /// Gets or sets indicates what the Path variable stands for /// - [JsonProperty(PropertyName = "fileSpecType")] - public string FileSpecType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fileSpecType")] + public string FileSpecType {get; set; } /// /// Gets or sets destination folder path in target FileShare /// - [JsonProperty(PropertyName = "targetFolderPath")] - public string TargetFolderPath { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetFolderPath")] + public string TargetFolderPath {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestorePointQueryType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestorePointQueryType.cs index c1b3925024c4..66294e80814a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestorePointQueryType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestorePointQueryType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for RestorePointQueryType. /// + + public static class RestorePointQueryType { public const string Invalid = "Invalid"; @@ -24,4 +21,4 @@ public static class RestorePointQueryType public const string All = "All"; public const string Incremental = "Incremental"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestorePointType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestorePointType.cs index 5a17688937ef..382a2f184216 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestorePointType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestorePointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for RestorePointType. /// + + public static class RestorePointType { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class RestorePointType public const string Differential = "Differential"; public const string Incremental = "Incremental"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreRequest.cs index ed28e262fc5b..9060c6c00b27 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -35,4 +29,4 @@ public RestoreRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreRequestType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreRequestType.cs index 7015c4dcb3de..c9388755370a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreRequestType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/RestoreRequestType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for RestoreRequestType. /// + + public static class RestoreRequestType { public const string Invalid = "Invalid"; public const string FullShareRestore = "FullShareRestore"; public const string ItemLevelRestore = "ItemLevelRestore"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectory.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectory.cs index 93bf13b245de..b84f860b0b67 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectory.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectory.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,21 @@ public SQLDataDirectory() /// /// Initializes a new instance of the SQLDataDirectory class. /// - /// Type of data directory mapping. Possible values - /// include: 'Invalid', 'Data', 'Log' - /// File path - /// Logical name of the file + + /// Type of data directory mapping + /// Possible values include: 'Invalid', 'Data', 'Log' + + /// File path + /// + + /// Logical name of the file + /// public SQLDataDirectory(string type = default(string), string path = default(string), string logicalName = default(string)) + { - Type = type; - Path = path; - LogicalName = logicalName; + this.Type = type; + this.Path = path; + this.LogicalName = logicalName; CustomInit(); } @@ -46,24 +46,23 @@ public SQLDataDirectory() /// partial void CustomInit(); + /// - /// Gets or sets type of data directory mapping. Possible values - /// include: 'Invalid', 'Data', 'Log' + /// Gets or sets type of data directory mapping Possible values include: 'Invalid', 'Data', 'Log' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Gets or sets file path /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } /// /// Gets or sets logical name of the file /// - [JsonProperty(PropertyName = "logicalName")] - public string LogicalName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "logicalName")] + public string LogicalName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectoryMapping.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectoryMapping.cs index f3c656a14b7a..1d58e0737932 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectoryMapping.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectoryMapping.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,25 @@ public SQLDataDirectoryMapping() /// /// Initializes a new instance of the SQLDataDirectoryMapping class. /// - /// Type of data directory mapping. Possible - /// values include: 'Invalid', 'Data', 'Log' - /// Restore source logical name - /// path - /// Restore source path - /// Target path + + /// Type of data directory mapping + /// Possible values include: 'Invalid', 'Data', 'Log' + + /// Restore source logical name path + /// + + /// Restore source path + /// + + /// Target path + /// public SQLDataDirectoryMapping(string mappingType = default(string), string sourceLogicalName = default(string), string sourcePath = default(string), string targetPath = default(string)) + { - MappingType = mappingType; - SourceLogicalName = sourceLogicalName; - SourcePath = sourcePath; - TargetPath = targetPath; + this.MappingType = mappingType; + this.SourceLogicalName = sourceLogicalName; + this.SourcePath = sourcePath; + this.TargetPath = targetPath; CustomInit(); } @@ -49,30 +50,29 @@ public SQLDataDirectoryMapping() /// partial void CustomInit(); + /// - /// Gets or sets type of data directory mapping. Possible values - /// include: 'Invalid', 'Data', 'Log' + /// Gets or sets type of data directory mapping Possible values include: 'Invalid', 'Data', 'Log' /// - [JsonProperty(PropertyName = "mappingType")] - public string MappingType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mappingType")] + public string MappingType {get; set; } /// /// Gets or sets restore source logical name path /// - [JsonProperty(PropertyName = "sourceLogicalName")] - public string SourceLogicalName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceLogicalName")] + public string SourceLogicalName {get; set; } /// /// Gets or sets restore source path /// - [JsonProperty(PropertyName = "sourcePath")] - public string SourcePath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourcePath")] + public string SourcePath {get; set; } /// /// Gets or sets target path /// - [JsonProperty(PropertyName = "targetPath")] - public string TargetPath { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetPath")] + public string TargetPath {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectoryType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectoryType.cs index fda7d3e1f00c..955278c8fac3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectoryType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/SQLDataDirectoryType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for SQLDataDirectoryType. /// + + public static class SQLDataDirectoryType { public const string Invalid = "Invalid"; public const string Data = "Data"; public const string Log = "Log"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/StorageType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/StorageType.cs index 50d553a1d91b..1825ba402ff2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/StorageType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/StorageType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for StorageType. /// + + public static class StorageType { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class StorageType public const string ZoneRedundant = "ZoneRedundant"; public const string ReadAccessGeoZoneRedundant = "ReadAccessGeoZoneRedundant"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/StorageTypeState.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/StorageTypeState.cs index bc63b031728e..a206fd90652b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/StorageTypeState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/StorageTypeState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for StorageTypeState. /// + + public static class StorageTypeState { public const string Invalid = "Invalid"; public const string Locked = "Locked"; public const string Unlocked = "Unlocked"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/TargetAFSRestoreInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/TargetAFSRestoreInfo.cs index 5ea7db3623de..4886d7d4a1d1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/TargetAFSRestoreInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/TargetAFSRestoreInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public TargetAFSRestoreInfo() /// /// Initializes a new instance of the TargetAFSRestoreInfo class. /// - /// File share name - /// Target file share resource ARM - /// ID + + /// File share name + /// + + /// Target file share resource ARM ID + /// public TargetAFSRestoreInfo(string name = default(string), string targetResourceId = default(string)) + { - Name = name; - TargetResourceId = targetResourceId; + this.Name = name; + this.TargetResourceId = targetResourceId; CustomInit(); } @@ -44,17 +42,17 @@ public TargetAFSRestoreInfo() /// partial void CustomInit(); + /// /// Gets or sets file share name /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets target file share resource ARM ID /// - [JsonProperty(PropertyName = "targetResourceId")] - public string TargetResourceId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceId")] + public string TargetResourceId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/TargetRestoreInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/TargetRestoreInfo.cs index 8545e07b3460..e3f1bf1004dd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/TargetRestoreInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/TargetRestoreInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,21 +23,26 @@ public TargetRestoreInfo() /// /// Initializes a new instance of the TargetRestoreInfo class. /// - /// Can Overwrite if Target DataBase - /// already exists. Possible values include: 'Invalid', - /// 'FailOnConflict', 'Overwrite' - /// Resource Id name of the container in - /// which Target DataBase resides - /// Database name InstanceName/DataBaseName - /// for SQL or System/DbName for SAP Hana - /// Target directory - /// location for restore as files. + + /// Can Overwrite if Target DataBase already exists + /// Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' + + /// Resource Id name of the container in which Target DataBase resides + /// + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP + /// Hana + /// + + /// Target directory location for restore as files. + /// public TargetRestoreInfo(string overwriteOption = default(string), string containerId = default(string), string databaseName = default(string), string targetDirectoryForFileRestore = default(string)) + { - OverwriteOption = overwriteOption; - ContainerId = containerId; - DatabaseName = databaseName; - TargetDirectoryForFileRestore = targetDirectoryForFileRestore; + this.OverwriteOption = overwriteOption; + this.ContainerId = containerId; + this.DatabaseName = databaseName; + this.TargetDirectoryForFileRestore = targetDirectoryForFileRestore; CustomInit(); } @@ -52,32 +51,31 @@ public TargetRestoreInfo() /// partial void CustomInit(); + /// - /// Gets or sets can Overwrite if Target DataBase already exists. - /// Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' + /// Gets or sets can Overwrite if Target DataBase already exists Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' /// - [JsonProperty(PropertyName = "overwriteOption")] - public string OverwriteOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "overwriteOption")] + public string OverwriteOption {get; set; } /// - /// Gets or sets resource Id name of the container in which Target - /// DataBase resides + /// Gets or sets resource Id name of the container in which Target DataBase + /// resides /// - [JsonProperty(PropertyName = "containerId")] - public string ContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerId")] + public string ContainerId {get; set; } /// /// Gets or sets database name InstanceName/DataBaseName for SQL or /// System/DbName for SAP Hana /// - [JsonProperty(PropertyName = "databaseName")] - public string DatabaseName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "databaseName")] + public string DatabaseName {get; set; } /// /// Gets or sets target directory location for restore as files. /// - [JsonProperty(PropertyName = "targetDirectoryForFileRestore")] - public string TargetDirectoryForFileRestore { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDirectoryForFileRestore")] + public string TargetDirectoryForFileRestore {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Type.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Type.cs index b475f17fc80c..d30d4a612d05 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Type.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/Type.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for Type. /// + + public static class Type { public const string Invalid = "Invalid"; public const string BackupProtectedItemCountSummary = "BackupProtectedItemCountSummary"; public const string BackupProtectionContainerCountSummary = "BackupProtectionContainerCountSummary"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/UsagesUnit.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/UsagesUnit.cs index 0764cafc2a83..d29ee2f8ecef 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/UsagesUnit.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/UsagesUnit.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for UsagesUnit. /// + + public static class UsagesUnit { public const string Count = "Count"; @@ -23,4 +20,4 @@ public static class UsagesUnit public const string CountPerSecond = "CountPerSecond"; public const string BytesPerSecond = "BytesPerSecond"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/WorkloadCrrAccessToken.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/WorkloadCrrAccessToken.cs index 7b4fdbd69668..fd980cd47e96 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/WorkloadCrrAccessToken.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/WorkloadCrrAccessToken.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; [Newtonsoft.Json.JsonObject("WorkloadCrrAccessToken")] @@ -29,62 +21,121 @@ public WorkloadCrrAccessToken() /// /// Initializes a new instance of the WorkloadCrrAccessToken class. /// - /// Access token used for - /// authentication - /// Subscription Id of the source - /// vault - /// Resource Group name of the source - /// vault - /// Resource Name of the source - /// vault - /// Resource Id of the source vault - /// Protected item container - /// id - /// Recovery Point Id - /// Recovery Point Time - /// Container Unique name - /// Container Type - /// Backup Management Type - /// Datasource Type - /// Datasource Friendly Name - /// Datasource Id - /// Datasource Container Unique - /// Name - /// CoordinatorServiceStampId - /// to be used by BCM in restore call - /// CoordinatorServiceStampUri - /// to be used by BCM in restore call - /// ProtectionServiceStampId to - /// be used by BCM in restore call - /// ProtectionServiceStampUri - /// to be used by BCM in restore call - /// Extended Information about - /// the token like FileSpec etc. - /// Recovery point Tier - /// Information - /// Recovery point information: - /// Original SA option - /// Recovery point information: - /// Managed virtual machine - /// Recovery point information: VM - /// size description - /// Active region name of BMS - /// Stamp - /// Container Id - /// Policy Name - /// Policy Id - public WorkloadCrrAccessToken(string accessTokenString = default(string), string subscriptionId = default(string), string resourceGroupName = default(string), string resourceName = default(string), string resourceId = default(string), long? protectionContainerId = default(long?), string recoveryPointId = default(string), string recoveryPointTime = default(string), string containerName = default(string), string containerType = default(string), string backupManagementType = default(string), string datasourceType = default(string), string datasourceName = default(string), string datasourceId = default(string), string datasourceContainerName = default(string), string coordinatorServiceStampId = default(string), string coordinatorServiceStampUri = default(string), string protectionServiceStampId = default(string), string protectionServiceStampUri = default(string), string tokenExtendedInformation = default(string), IDictionary rpTierInformation = default(IDictionary), bool? rpOriginalSAOption = default(bool?), bool? rpIsManagedVirtualMachine = default(bool?), string rpVMSizeDescription = default(string), string bMSActiveRegion = default(string), string protectableObjectUniqueName = default(string), string protectableObjectFriendlyName = default(string), string protectableObjectWorkloadType = default(string), string protectableObjectProtectionState = default(string), string protectableObjectContainerHostOsName = default(string), string protectableObjectParentLogicalContainerName = default(string), string containerId = default(string), string policyName = default(string), string policyId = default(string)) - : base(accessTokenString, subscriptionId, resourceGroupName, resourceName, resourceId, protectionContainerId, recoveryPointId, recoveryPointTime, containerName, containerType, backupManagementType, datasourceType, datasourceName, datasourceId, datasourceContainerName, coordinatorServiceStampId, coordinatorServiceStampUri, protectionServiceStampId, protectionServiceStampUri, tokenExtendedInformation, rpTierInformation, rpOriginalSAOption, rpIsManagedVirtualMachine, rpVMSizeDescription, bMSActiveRegion) + + /// Access token used for authentication + /// + + /// Subscription Id of the source vault + /// + + /// Resource Group name of the source vault + /// + + /// Resource Name of the source vault + /// + + /// Resource Id of the source vault + /// + + /// Protected item container id + /// + + /// Recovery Point Id + /// + + /// Recovery Point Time + /// + + /// Container Unique name + /// + + /// Container Type + /// + + /// Backup Management Type + /// + + /// Datasource Type + /// + + /// Datasource Friendly Name + /// + + /// Datasource Id + /// + + /// Datasource Container Unique Name + /// + + /// CoordinatorServiceStampId to be used by BCM in restore call + /// + + /// CoordinatorServiceStampUri to be used by BCM in restore call + /// + + /// ProtectionServiceStampId to be used by BCM in restore call + /// + + /// ProtectionServiceStampUri to be used by BCM in restore call + /// + + /// Extended Information about the token like FileSpec etc. + /// + + /// Recovery point Tier Information + /// + + /// Recovery point information: Original SA option + /// + + /// Recovery point information: Managed virtual machine + /// + + /// Recovery point information: VM size description + /// + + /// Active region name of BMS Stamp + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// Container Id + /// + + /// Policy Name + /// + + /// Policy Id + /// + public WorkloadCrrAccessToken(string accessTokenString = default(string), string subscriptionId = default(string), string resourceGroupName = default(string), string resourceName = default(string), string resourceId = default(string), long? protectionContainerId = default(long?), string recoveryPointId = default(string), string recoveryPointTime = default(string), string containerName = default(string), string containerType = default(string), string backupManagementType = default(string), string datasourceType = default(string), string datasourceName = default(string), string datasourceId = default(string), string datasourceContainerName = default(string), string coordinatorServiceStampId = default(string), string coordinatorServiceStampUri = default(string), string protectionServiceStampId = default(string), string protectionServiceStampUri = default(string), string tokenExtendedInformation = default(string), System.Collections.Generic.IDictionary rpTierInformation = default(System.Collections.Generic.IDictionary), bool? rpOriginalSaOption = default(bool?), bool? rpIsManagedVirtualMachine = default(bool?), string rpVMSizeDescription = default(string), string bmsActiveRegion = default(string), string protectableObjectUniqueName = default(string), string protectableObjectFriendlyName = default(string), string protectableObjectWorkloadType = default(string), string protectableObjectProtectionState = default(string), string protectableObjectContainerHostOSName = default(string), string protectableObjectParentLogicalContainerName = default(string), string containerId = default(string), string policyName = default(string), string policyId = default(string)) + + : base(accessTokenString, subscriptionId, resourceGroupName, resourceName, resourceId, protectionContainerId, recoveryPointId, recoveryPointTime, containerName, containerType, backupManagementType, datasourceType, datasourceName, datasourceId, datasourceContainerName, coordinatorServiceStampId, coordinatorServiceStampUri, protectionServiceStampId, protectionServiceStampUri, tokenExtendedInformation, rpTierInformation, rpOriginalSaOption, rpIsManagedVirtualMachine, rpVMSizeDescription, bmsActiveRegion) { - ProtectableObjectUniqueName = protectableObjectUniqueName; - ProtectableObjectFriendlyName = protectableObjectFriendlyName; - ProtectableObjectWorkloadType = protectableObjectWorkloadType; - ProtectableObjectProtectionState = protectableObjectProtectionState; - ProtectableObjectContainerHostOsName = protectableObjectContainerHostOsName; - ProtectableObjectParentLogicalContainerName = protectableObjectParentLogicalContainerName; - ContainerId = containerId; - PolicyName = policyName; - PolicyId = policyId; + this.ProtectableObjectUniqueName = protectableObjectUniqueName; + this.ProtectableObjectFriendlyName = protectableObjectFriendlyName; + this.ProtectableObjectWorkloadType = protectableObjectWorkloadType; + this.ProtectableObjectProtectionState = protectableObjectProtectionState; + this.ProtectableObjectContainerHostOSName = protectableObjectContainerHostOSName; + this.ProtectableObjectParentLogicalContainerName = protectableObjectParentLogicalContainerName; + this.ContainerId = containerId; + this.PolicyName = policyName; + this.PolicyId = policyId; CustomInit(); } @@ -93,53 +144,59 @@ public WorkloadCrrAccessToken() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "protectableObjectUniqueName")] - public string ProtectableObjectUniqueName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableObjectUniqueName")] + public string ProtectableObjectUniqueName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "protectableObjectFriendlyName")] - public string ProtectableObjectFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableObjectFriendlyName")] + public string ProtectableObjectFriendlyName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "protectableObjectWorkloadType")] - public string ProtectableObjectWorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableObjectWorkloadType")] + public string ProtectableObjectWorkloadType {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "protectableObjectProtectionState")] - public string ProtectableObjectProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableObjectProtectionState")] + public string ProtectableObjectProtectionState {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "protectableObjectContainerHostOsName")] - public string ProtectableObjectContainerHostOsName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableObjectContainerHostOsName")] + public string ProtectableObjectContainerHostOSName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "protectableObjectParentLogicalContainerName")] - public string ProtectableObjectParentLogicalContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableObjectParentLogicalContainerName")] + public string ProtectableObjectParentLogicalContainerName {get; set; } /// /// Gets or sets container Id /// - [JsonProperty(PropertyName = "containerId")] - public string ContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerId")] + public string ContainerId {get; set; } /// /// Gets or sets policy Name /// - [JsonProperty(PropertyName = "policyName")] - public string PolicyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyName")] + public string PolicyName {get; set; } /// /// Gets or sets policy Id /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/WorkloadType.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/WorkloadType.cs index caf20551965a..a0e4b2fe1e4c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/WorkloadType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/Models/WorkloadType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore.Models { @@ -14,13 +9,15 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore. /// /// Defines values for WorkloadType. /// + + public static class WorkloadType { public const string Invalid = "Invalid"; public const string VM = "VM"; public const string FileFolder = "FileFolder"; public const string AzureSqlDb = "AzureSqlDb"; - public const string SQLDB = "SQLDB"; + public const string Sqldb = "SQLDB"; public const string Exchange = "Exchange"; public const string Sharepoint = "Sharepoint"; public const string VMwareVM = "VMwareVM"; @@ -32,4 +29,4 @@ public static class WorkloadType public const string SAPHanaDatabase = "SAPHanaDatabase"; public const string SAPAseDatabase = "SAPAseDatabase"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsCrrOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsCrrOperations.cs index b5b0f9b11231..1e712837da6a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsCrrOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsCrrOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// RecoveryPointsCrrOperations operations. /// - internal partial class RecoveryPointsCrrOperations : IServiceOperations, IRecoveryPointsCrrOperations + internal partial class RecoveryPointsCrrOperations : Microsoft.Rest.IServiceOperations, IRecoveryPointsCrrOperations { /// /// Initializes a new instance of the RecoveryPointsCrrOperations class. @@ -37,13 +24,13 @@ internal partial class RecoveryPointsCrrOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) + internal RecoveryPointsCrrOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,12 +41,14 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) /// /// Lists the backup copies for the backed up item. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -70,22 +59,19 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) /// /// Backed up item whose backup copies are to be fetched. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -94,98 +80,113 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsrpQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsrpQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsrpQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -197,50 +198,51 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -250,9 +252,10 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -263,35 +266,37 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Provides the information of the backed up data identified using - /// RecoveryPointID. + /// Provides the information of the backed up data identified using RecoveryPointID. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with backed up item. @@ -311,13 +316,13 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -326,95 +331,110 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + if (recoveryPointId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPointId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); tracingParameters.Add("recoveryPointId", recoveryPointId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); _url = _url.Replace("{recoveryPointId}", System.Uri.EscapeDataString(recoveryPointId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -426,50 +446,51 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -479,9 +500,10 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -492,25 +514,29 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists the backup copies for the backed up item. /// @@ -523,13 +549,13 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -538,51 +564,54 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -594,50 +623,51 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -647,9 +677,10 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -660,24 +691,28 @@ internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsCrrOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsCrrOperationsExtensions.cs index 45fd1ea5979b..c7e217ddf4b9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsCrrOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsCrrOperationsExtensions.cs @@ -1,194 +1,175 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for RecoveryPointsCrrOperations. + /// Extension methods for RecoveryPointsCrrOperations /// public static partial class RecoveryPointsCrrOperationsExtensions { - /// - /// Lists the backup copies for the backed up item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Container name associated with the backed up item. - /// - /// - /// Backed up item whose backup copies are to be fetched. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Lists the backup copies for the backed up item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Container name associated with the backed up item. - /// - /// - /// Backed up item whose backup copies are to be fetched. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Container name associated with the backed up item. + /// + /// + /// Backed up item whose backup copies are to be fetched. + /// + public static Microsoft.Rest.Azure.IPage List(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IRecoveryPointsCrrOperations)operations).ListAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery).GetAwaiter().GetResult(); + } - /// - /// Provides the information of the backed up data identified using - /// RecoveryPointID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with backed up item. - /// - /// - /// Container name associated with backed up item. - /// - /// - /// Backed up item name whose backup data needs to be fetched. - /// - /// - /// RecoveryPointID represents the backed up data to be fetched. - /// - public static RecoveryPointResource Get(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId) + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Container name associated with the backed up item. + /// + /// + /// Backed up item whose backup copies are to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Provides the information of the backed up data identified using RecoveryPointID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with backed up item. + /// + /// + /// Container name associated with backed up item. + /// + /// + /// Backed up item name whose backup data needs to be fetched. + /// + /// + /// RecoveryPointID represents the backed up data to be fetched. + /// + public static RecoveryPointResource Get(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId) + { + return ((IRecoveryPointsCrrOperations)operations).GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId).GetAwaiter().GetResult(); + } - /// - /// Provides the information of the backed up data identified using - /// RecoveryPointID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with backed up item. - /// - /// - /// Container name associated with backed up item. - /// - /// - /// Backed up item name whose backup data needs to be fetched. - /// - /// - /// RecoveryPointID represents the backed up data to be fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides the information of the backed up data identified using RecoveryPointID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with backed up item. + /// + /// + /// Container name associated with backed up item. + /// + /// + /// Backed up item name whose backup data needs to be fetched. + /// + /// + /// RecoveryPointID represents the backed up data to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IRecoveryPointsCrrOperations operations, string nextPageLink) + { + return ((IRecoveryPointsCrrOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Lists the backup copies for the backed up item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IRecoveryPointsCrrOperations operations, string nextPageLink) + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IRecoveryPointsCrrOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Lists the backup copies for the backed up item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IRecoveryPointsCrrOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsOperations.cs index 54e4e46c2bf2..ed59d488c79f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; 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; /// /// RecoveryPointsOperations operations. /// - internal partial class RecoveryPointsOperations : IServiceOperations, IRecoveryPointsOperations + internal partial class RecoveryPointsOperations : Microsoft.Rest.IServiceOperations, IRecoveryPointsOperations { /// /// Initializes a new instance of the RecoveryPointsOperations class. @@ -36,13 +24,13 @@ internal partial class RecoveryPointsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal RecoveryPointsOperations(RecoveryServicesBackupClient client) + internal RecoveryPointsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,15 +39,13 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Returns the Access token for communication between BMS and Protection - /// service + /// Returns the Access token for communication between BMS and Protection service /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. @@ -82,13 +68,13 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -97,100 +83,116 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAccessTokenWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, AADPropertiesResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAccessTokenWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, AADPropertiesResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + if (recoveryPointId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPointId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); tracingParameters.Add("recoveryPointId", recoveryPointId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAccessToken", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAccessToken", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/accessToken").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); _url = _url.Replace("{recoveryPointId}", System.Uri.EscapeDataString(recoveryPointId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -202,56 +204,62 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 400) + + if ((int)_statusCode != 200) { - var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -261,9 +269,10 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -274,24 +283,28 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs index 3a94726ddda8..bf3b6594ffcc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs @@ -1,99 +1,79 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for RecoveryPointsOperations. + /// Extension methods for RecoveryPointsOperations /// public static partial class RecoveryPointsOperationsExtensions { - /// - /// Returns the Access token for communication between BMS and Protection - /// service - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Name of the container. - /// - /// - /// Name of the Protected Item. - /// - /// - /// Recovery Point Id - /// - /// - /// Get Access Token request - /// - public static CrrAccessTokenResource GetAccessToken(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, AADPropertiesResource parameters) - { - return operations.GetAccessTokenAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); - } + /// + /// Returns the Access token for communication between BMS and Protection service + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Name of the container. + /// + /// + /// Name of the Protected Item. + /// + /// + /// Recovery Point Id + /// + public static CrrAccessTokenResource GetAccessToken(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, AADPropertiesResource parameters) + { + return ((IRecoveryPointsOperations)operations).GetAccessTokenAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); + } - /// - /// Returns the Access token for communication between BMS and Protection - /// service - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Name of the container. - /// - /// - /// Name of the Protected Item. - /// - /// - /// Recovery Point Id - /// - /// - /// Get Access Token request - /// - /// - /// The cancellation token. - /// - public static async Task GetAccessTokenAsync(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, AADPropertiesResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Returns the Access token for communication between BMS and Protection service + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Name of the container. + /// + /// + /// Name of the Protected Item. + /// + /// + /// Recovery Point Id + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAccessTokenAsync(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, AADPropertiesResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAccessTokenWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetAccessTokenWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryServicesBackupClient.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryServicesBackupClient.cs index 144919b496d6..424f8b66dae1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryServicesBackupClient.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/RecoveryServicesBackupClient.cs @@ -1,131 +1,106 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - public partial class RecoveryServicesBackupClient : ServiceClient, IRecoveryServicesBackupClient, IAzureClient + public partial class RecoveryServicesBackupClient : Microsoft.Rest.ServiceClient, IRecoveryServicesBackupClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// - /// The subscription Id. + /// The API version to use for this operation. /// - public string SubscriptionId { get; set; } + public string ApiVersion { get; private set; } /// - /// Client Api Version. + /// The subscription Id. /// - public string ApiVersion { get; private set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// 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; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// 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. + /// 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; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IBackupUsageSummariesCRROperations. + /// Gets the IBackupUsageSummariesCrrOperations /// - public virtual IBackupUsageSummariesCRROperations BackupUsageSummariesCRR { get; private set; } - + public virtual IBackupUsageSummariesCrrOperations BackupUsageSummariesCrr { get; private set; } /// - /// Gets the IAadPropertiesOperations. + /// Gets the IAadPropertiesOperations /// public virtual IAadPropertiesOperations AadProperties { get; private set; } - /// - /// Gets the ICrossRegionRestoreOperations. + /// Gets the ICrossRegionRestoreOperations /// public virtual ICrossRegionRestoreOperations CrossRegionRestore { get; private set; } - /// - /// Gets the IBackupCrrJobDetailsOperations. + /// Gets the IBackupCrrJobDetailsOperations /// public virtual IBackupCrrJobDetailsOperations BackupCrrJobDetails { get; private set; } - /// - /// Gets the IBackupCrrJobsOperations. + /// Gets the IBackupCrrJobsOperations /// public virtual IBackupCrrJobsOperations BackupCrrJobs { get; private set; } - /// - /// Gets the ICrrOperationResultsOperations. + /// Gets the ICrrOperationResultsOperations /// public virtual ICrrOperationResultsOperations CrrOperationResults { get; private set; } - /// - /// Gets the ICrrOperationStatusOperations. + /// Gets the ICrrOperationStatusOperations /// public virtual ICrrOperationStatusOperations CrrOperationStatus { get; private set; } - /// - /// Gets the IRecoveryPointsOperations. + /// Gets the IRecoveryPointsOperations /// public virtual IRecoveryPointsOperations RecoveryPoints { get; private set; } - /// - /// Gets the IBackupResourceStorageConfigsOperations. + /// Gets the IBackupResourceStorageConfigsOperations /// public virtual IBackupResourceStorageConfigsOperations BackupResourceStorageConfigs { get; private set; } - /// - /// Gets the IRecoveryPointsCrrOperations. + /// Gets the IRecoveryPointsCrrOperations /// public virtual IRecoveryPointsCrrOperations RecoveryPointsCrr { get; private set; } - /// - /// Gets the IBackupProtectedItemsCrrOperations. + /// Gets the IBackupProtectedItemsCrrOperations /// public virtual IBackupProtectedItemsCrrOperations BackupProtectedItemsCrr { get; private set; } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// @@ -134,24 +109,22 @@ public partial class RecoveryServicesBackupClient : ServiceClient /// /// True: will dispose the provided httpClient on calling RecoveryServicesBackupClient.Dispose(). False: will not dispose provided httpClient - protected RecoveryServicesBackupClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected RecoveryServicesBackupClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected RecoveryServicesBackupClient(params DelegatingHandler[] handlers) : base(handlers) + protected RecoveryServicesBackupClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the RecoveryServicesBackupClient class. + /// Initializes a new instance of the RecoveryServicesBackupClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -159,11 +132,10 @@ protected RecoveryServicesBackupClient(params DelegatingHandler[] handlers) : ba /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected RecoveryServicesBackupClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected RecoveryServicesBackupClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// @@ -176,15 +148,14 @@ protected RecoveryServicesBackupClient(HttpClientHandler rootHandler, params Del /// /// Thrown when a required parameter is null /// - protected RecoveryServicesBackupClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected RecoveryServicesBackupClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// @@ -200,15 +171,15 @@ protected RecoveryServicesBackupClient(System.Uri baseUri, params DelegatingHand /// /// Thrown when a required parameter is null /// - protected RecoveryServicesBackupClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected RecoveryServicesBackupClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// @@ -221,23 +192,23 @@ protected RecoveryServicesBackupClient(System.Uri baseUri, HttpClientHandler roo /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public RecoveryServicesBackupClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -248,23 +219,23 @@ public RecoveryServicesBackupClient(ServiceClientCredentials credentials, params /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public RecoveryServicesBackupClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -276,26 +247,26 @@ public RecoveryServicesBackupClient(ServiceClientCredentials credentials, HttpCl /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public RecoveryServicesBackupClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -304,7 +275,7 @@ public RecoveryServicesBackupClient(ServiceClientCredentials credentials, HttpCl /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public RecoveryServicesBackupClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -314,33 +285,30 @@ public RecoveryServicesBackupClient(System.Uri baseUri, ServiceClientCredentials { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public RecoveryServicesBackupClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -350,78 +318,95 @@ public RecoveryServicesBackupClient(System.Uri baseUri, ServiceClientCredentials { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - BackupUsageSummariesCRR = new BackupUsageSummariesCRROperations(this); - AadProperties = new AadPropertiesOperations(this); - CrossRegionRestore = new CrossRegionRestoreOperations(this); - BackupCrrJobDetails = new BackupCrrJobDetailsOperations(this); - BackupCrrJobs = new BackupCrrJobsOperations(this); - CrrOperationResults = new CrrOperationResultsOperations(this); - CrrOperationStatus = new CrrOperationStatusOperations(this); - RecoveryPoints = new RecoveryPointsOperations(this); - BackupResourceStorageConfigs = new BackupResourceStorageConfigsOperations(this); - RecoveryPointsCrr = new RecoveryPointsCrrOperations(this); - BackupProtectedItemsCrr = new BackupProtectedItemsCrrOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-11-15"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.BackupUsageSummariesCrr = new BackupUsageSummariesCrrOperations(this); + this.AadProperties = new AadPropertiesOperations(this); + this.CrossRegionRestore = new CrossRegionRestoreOperations(this); + this.BackupCrrJobDetails = new BackupCrrJobDetailsOperations(this); + this.BackupCrrJobs = new BackupCrrJobsOperations(this); + this.CrrOperationResults = new CrrOperationResultsOperations(this); + this.CrrOperationStatus = new CrrOperationStatusOperations(this); + this.RecoveryPoints = new RecoveryPointsOperations(this); + this.BackupResourceStorageConfigs = new BackupResourceStorageConfigsOperations(this); + this.RecoveryPointsCrr = new RecoveryPointsCrrOperations(this); + this.BackupProtectedItemsCrr = new BackupProtectedItemsCrrOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2021-11-15"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - DeserializationSettings = new JsonSerializerSettings + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("jobType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("jobType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("protectedItemType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("protectedItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("jobType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("jobType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectedItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectedItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectedItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectedItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectedItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectedItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); CustomInitialize(); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/SdkInfo_RecoveryServicesBackupClient.cs b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/SdkInfo_RecoveryServicesBackupClient.cs deleted file mode 100644 index 8defc909b053..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/Generated/SdkInfo_RecoveryServicesBackupClient.cs +++ /dev/null @@ -1,37 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.RecoveryServices.Backup.CrossRegionRestore -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_RecoveryServicesBackupClient - { - get - { - return new Tuple[] - { - new Tuple("RecoveryServices", "AadProperties", "2021-11-15"), - new Tuple("RecoveryServices", "BackupCrrJobDetails", "2021-11-15"), - new Tuple("RecoveryServices", "BackupCrrJobs", "2021-11-15"), - new Tuple("RecoveryServices", "BackupProtectedItemsCrr", "2021-11-15"), - new Tuple("RecoveryServices", "BackupResourceStorageConfigs", "2021-11-15"), - new Tuple("RecoveryServices", "BackupUsageSummariesCRR", "2021-11-15"), - new Tuple("RecoveryServices", "CrossRegionRestore", "2021-11-15"), - new Tuple("RecoveryServices", "CrrOperationResults", "2021-11-15"), - new Tuple("RecoveryServices", "CrrOperationStatus", "2021-11-15"), - new Tuple("RecoveryServices", "RecoveryPoints", "2021-11-15"), - new Tuple("RecoveryServices", "RecoveryPointsCrr", "2021-11-15"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/README.md b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/README.md index d231425eade5..a77627af46a4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/README.md +++ b/src/RecoveryServices/RecoveryServices.Backup.CrossRegionRestore.Management.Sdk/README.md @@ -5,14 +5,14 @@ This directory contains management plane service clients of Az.RecoveryServices In this directory, run AutoRest: ``` autorest --reset -autorest --use:@microsoft.azure/autorest.csharp@2.3.90 -autorest.cmd README.md --version=v2 +autorest --use:@autorest/powershell@4.x ``` ### AutoRest Configuration > see https://aka.ms/autorest ``` yaml -csharp: true +isSdkGenerator: true +powershell: true clear-output-folder: true reflect-api-versions: true openapi-type: arm @@ -21,7 +21,6 @@ license-header: MICROSOFT_MIT_NO_VERSION payload-flattening-threshold: 2 ``` - ### ``` yaml commit: 1f9b94d9f01369d1438a80aaf6a658e27209c594 diff --git a/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/ConversionHelpers.cs b/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/ConversionHelpers.cs index f8ba7b2753eb..dd88b399f852 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/ConversionHelpers.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/ConversionHelpers.cs @@ -187,9 +187,9 @@ public static PolicyBase GetPolicyModelForAzureIaaSVM(ServiceClientModel.Protect } iaasPolicyModel.AzureBackupRGName = - ((ServiceClientModel.AzureIaaSVMProtectionPolicy)serviceClientResponse.Properties).InstantRPDetails.AzureBackupRGNamePrefix; + ((ServiceClientModel.AzureIaaSVMProtectionPolicy)serviceClientResponse.Properties).InstantRpDetails.AzureBackupRgNamePrefix; iaasPolicyModel.AzureBackupRGNameSuffix = - ((ServiceClientModel.AzureIaaSVMProtectionPolicy)serviceClientResponse.Properties).InstantRPDetails.AzureBackupRGNameSuffix; + ((ServiceClientModel.AzureIaaSVMProtectionPolicy)serviceClientResponse.Properties).InstantRpDetails.AzureBackupRgNameSuffix; // fetch the smart tiering details if (((ServiceClientModel.AzureIaaSVMProtectionPolicy)serviceClientResponse.Properties).TieringPolicy != null && diff --git a/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs b/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs index 92e2e3a9821f..eba83ad6f387 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs @@ -532,9 +532,9 @@ public static RecoveryPointBase GetPSAzureWorkloadRecoveryPoint( DateTime recoveryPointTime = DateTime.MinValue; - if (recoveryPoint.RecoveryPointTimeInUTC.HasValue) + if (recoveryPoint.RecoveryPointTimeInUtc.HasValue) { - recoveryPointTime = (DateTime)recoveryPoint.RecoveryPointTimeInUTC; + recoveryPointTime = (DateTime)recoveryPoint.RecoveryPointTimeInUtc; } else { @@ -894,9 +894,9 @@ public static RecoveryPointBase GetPSAzureWorkloadRecoveryPointForSecondaryRegio DateTime recoveryPointTime = DateTime.MinValue; - if (recoveryPoint.RecoveryPointTimeInUTC.HasValue) + if (recoveryPoint.RecoveryPointTimeInUtc.HasValue) { - recoveryPointTime = (DateTime)recoveryPoint.RecoveryPointTimeInUTC; + recoveryPointTime = (DateTime)recoveryPoint.RecoveryPointTimeInUtc; } else { diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperations.cs index 5d4913bdd700..6a8f95ceea79 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperations.cs @@ -1,34 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// - /// BMSPrepareDataMoveOperationResultOperations operations. + /// BmsPrepareDataMoveOperationResultOperations operations. /// - internal partial class BMSPrepareDataMoveOperationResultOperations : IServiceOperations, IBMSPrepareDataMoveOperationResultOperations + internal partial class BmsPrepareDataMoveOperationResultOperations : Microsoft.Rest.IServiceOperations, IBmsPrepareDataMoveOperationResultOperations { /// - /// Initializes a new instance of the BMSPrepareDataMoveOperationResultOperations class. + /// Initializes a new instance of the BmsPrepareDataMoveOperationResultOperations class. /// /// /// Reference to the service client. @@ -36,13 +24,13 @@ internal partial class BMSPrepareDataMoveOperationResultOperations : IServiceOpe /// /// Thrown when a required parameter is null /// - internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClient client) + internal BmsPrepareDataMoveOperationResultOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,10 +45,10 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// Headers that will be added to request. @@ -68,13 +56,13 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien /// /// 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 /// /// @@ -83,77 +71,89 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.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/operationResults/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -165,50 +165,51 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -218,9 +219,10 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -231,24 +233,28 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperationsExtensions.cs index 4ec03a992792..8eae509ae981 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BMSPrepareDataMoveOperationResultOperationsExtensions.cs @@ -1,71 +1,61 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BMSPrepareDataMoveOperationResultOperations. + /// Extension methods for BmsPrepareDataMoveOperationResultOperations /// - public static partial class BMSPrepareDataMoveOperationResultOperationsExtensions + public static partial class BmsPrepareDataMoveOperationResultOperationsExtensions { - /// - /// Fetches Operation Result for Prepare Data Move - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - public static VaultStorageConfigOperationResultResponse Get(this IBMSPrepareDataMoveOperationResultOperations operations, string vaultName, string resourceGroupName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); - } + /// + /// Fetches Operation Result for Prepare Data Move + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + public static VaultStorageConfigOperationResultResponse Get(this IBmsPrepareDataMoveOperationResultOperations operations, string vaultName, string resourceGroupName, string operationId) + { + return ((IBmsPrepareDataMoveOperationResultOperations)operations).GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); + } - /// - /// Fetches Operation Result for Prepare Data Move - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBMSPrepareDataMoveOperationResultOperations operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches Operation Result for Prepare Data Move + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBmsPrepareDataMoveOperationResultOperations operations, string vaultName, string resourceGroupName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperations.cs index 822f5cfc137f..a8e80155368c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupEnginesOperations operations. /// - internal partial class BackupEnginesOperations : IServiceOperations, IBackupEnginesOperations + internal partial class BackupEnginesOperations : Microsoft.Rest.IServiceOperations, IBackupEnginesOperations { /// /// Initializes a new instance of the BackupEnginesOperations class. @@ -37,13 +24,13 @@ internal partial class BackupEnginesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupEnginesOperations(RecoveryServicesBackupClient client) + internal BackupEnginesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,18 +39,16 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Backup management servers registered to Recovery Services Vault. Returns a - /// pageable list of servers. + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -74,13 +59,13 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -89,56 +74,70 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsBackupEnginesQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsBackupEnginesQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsBackupEnginesQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -149,25 +148,24 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -179,55 +177,56 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -237,9 +236,10 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -250,41 +250,44 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns backup management server registered to Recovery Services Vault. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the backup management server. /// - /// - /// OData parameters to apply to the operation. - /// /// /// skipToken Filter. /// @@ -294,13 +297,13 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -309,62 +312,77 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupEngineName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupEngineName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (backupEngineName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "backupEngineName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "backupEngineName"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("backupEngineName", backupEngineName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{backupEngineName}", System.Uri.EscapeDataString(backupEngineName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsBackupEngineQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsBackupEngineQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsBackupEngineQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -375,25 +393,24 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -405,55 +422,56 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -463,9 +481,10 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -476,28 +495,31 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Backup management servers registered to Recovery Services Vault. Returns a - /// pageable list of servers. + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. /// /// /// The NextLink from the previous successful call to List operation. @@ -508,13 +530,13 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -523,51 +545,54 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -579,55 +604,56 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -637,9 +663,10 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -650,24 +677,28 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperationsExtensions.cs index 0a0bfd4c53bb..1b8677d9f751 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupEnginesOperationsExtensions.cs @@ -1,178 +1,157 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupEnginesOperations. + /// Extension methods for BackupEnginesOperations /// public static partial class BackupEnginesOperationsExtensions { - /// - /// Backup management servers registered to Recovery Services Vault. Returns a - /// pageable list of servers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static IPage List(this IBackupEnginesOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); - } - - /// - /// Backup management servers registered to Recovery Services Vault. Returns a - /// pageable list of servers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupEnginesOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupEnginesOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupEnginesOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Returns backup management server registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the backup management server. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static BackupEngineBaseResource Get(this IBackupEnginesOperations operations, string vaultName, string resourceGroupName, string backupEngineName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) + /// + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupEnginesOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(vaultName, resourceGroupName, backupEngineName, odataQuery, skipToken).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Returns backup management server registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the backup management server. + /// + /// + /// skipToken Filter. + /// + public static BackupEngineBaseResource Get(this IBackupEnginesOperations operations, string vaultName, string resourceGroupName, string backupEngineName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupEnginesOperations)operations).GetAsync(vaultName, resourceGroupName, backupEngineName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Returns backup management server registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the backup management server. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBackupEnginesOperations operations, string vaultName, string resourceGroupName, string backupEngineName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Returns backup management server registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the backup management server. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBackupEnginesOperations operations, string vaultName, string resourceGroupName, string backupEngineName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, backupEngineName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, backupEngineName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupEnginesOperations operations, string nextPageLink) + { + return ((IBackupEnginesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Backup management servers registered to Recovery Services Vault. Returns a - /// pageable list of servers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupEnginesOperations operations, string nextPageLink) + /// + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupEnginesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Backup management servers registered to Recovery Services Vault. Returns a - /// pageable list of servers. - /// - /// - /// 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 IBackupEnginesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperations.cs index d40858c5223e..86196e7e823b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupJobsOperations operations. /// - internal partial class BackupJobsOperations : IServiceOperations, IBackupJobsOperations + internal partial class BackupJobsOperations : Microsoft.Rest.IServiceOperations, IBackupJobsOperations { /// /// Initializes a new instance of the BackupJobsOperations class. @@ -37,13 +24,13 @@ internal partial class BackupJobsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupJobsOperations(RecoveryServicesBackupClient client) + internal BackupJobsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,15 +41,14 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) /// /// Provides a pageable list of jobs. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -73,13 +59,13 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -88,56 +74,70 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _jobQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_jobQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_jobQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -148,25 +148,24 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -178,55 +177,56 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -236,9 +236,10 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -249,25 +250,29 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Provides a pageable list of jobs. /// @@ -280,13 +285,13 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -295,51 +300,54 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -351,55 +359,56 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -409,9 +418,10 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -422,24 +432,28 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperationsExtensions.cs index cb0d02b53ef6..87ab605df2a6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupJobsOperationsExtensions.cs @@ -1,114 +1,100 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupJobsOperations. + /// Extension methods for BackupJobsOperations /// public static partial class BackupJobsOperationsExtensions { - /// - /// Provides a pageable list of jobs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static IPage List(this IBackupJobsOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); - } + /// + /// Provides a pageable list of jobs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupJobsOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupJobsOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of jobs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupJobsOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides a pageable list of jobs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupJobsOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Provides a pageable list of jobs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupJobsOperations operations, string nextPageLink) + { + return ((IBackupJobsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of jobs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupJobsOperations operations, string nextPageLink) + /// + /// Provides a pageable list of jobs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupJobsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Provides a pageable list of jobs. - /// - /// - /// 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 IBackupJobsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperations.cs index 72ae92f70f0f..46391598fa8c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// BackupOperationResultsOperations operations. /// - internal partial class BackupOperationResultsOperations : IServiceOperations, IBackupOperationResultsOperations + internal partial class BackupOperationResultsOperations : Microsoft.Rest.IServiceOperations, IBackupOperationResultsOperations { /// /// Initializes a new instance of the BackupOperationResultsOperations class. @@ -36,13 +24,13 @@ internal partial class BackupOperationResultsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupOperationResultsOperations(RecoveryServicesBackupClient client) + internal BackupOperationResultsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,20 +39,16 @@ internal BackupOperationResultsOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Provides the status of the delete operations such as deleting backed up - /// item. Once the operation has started, the - /// status code in the response would be Accepted. It will continue to be in - /// this state till it reaches completion. On - /// successful completion, the status code will be OK. This method expects - /// OperationID as an argument. OperationID is + /// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the + /// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On + /// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is /// part of the Location header of the operation response. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// OperationID which represents the operation. @@ -75,10 +59,10 @@ internal BackupOperationResultsOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -87,77 +71,89 @@ internal BackupOperationResultsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -169,55 +165,56 @@ internal BackupOperationResultsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -227,19 +224,24 @@ internal BackupOperationResultsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperationsExtensions.cs index 2d74f93aaeb9..33fa442e1bf4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationResultsOperationsExtensions.cs @@ -1,82 +1,64 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupOperationResultsOperations. + /// Extension methods for BackupOperationResultsOperations /// public static partial class BackupOperationResultsOperationsExtensions { - /// - /// Provides the status of the delete operations such as deleting backed up - /// item. Once the operation has started, the - /// status code in the response would be Accepted. It will continue to be in - /// this state till it reaches completion. On - /// successful completion, the status code will be OK. This method expects - /// OperationID as an argument. OperationID is - /// part of the Location header of the operation response. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID which represents the operation. - /// - public static void Get(this IBackupOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId) - { - operations.GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Provides the status of the delete operations such as deleting backed up - /// item. Once the operation has started, the - /// status code in the response would be Accepted. It will continue to be in - /// this state till it reaches completion. On - /// successful completion, the status code will be OK. This method expects - /// OperationID as an argument. OperationID is - /// part of the Location header of the operation response. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID which represents the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBackupOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the + /// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On + /// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is + /// part of the Location header of the operation response. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID which represents the operation. + /// + public static void Get(this IBackupOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId) + { + ((IBackupOperationResultsOperations)operations).GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); + } + /// + /// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the + /// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On + /// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is + /// part of the Location header of the operation response. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID which represents the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBackupOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationStatusesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationStatusesOperations.cs index 5fc0eb2d099a..3d96102c8671 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationStatusesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationStatusesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// BackupOperationStatusesOperations operations. /// - internal partial class BackupOperationStatusesOperations : IServiceOperations, IBackupOperationStatusesOperations + internal partial class BackupOperationStatusesOperations : Microsoft.Rest.IServiceOperations, IBackupOperationStatusesOperations { /// /// Initializes a new instance of the BackupOperationStatusesOperations class. @@ -36,13 +24,13 @@ internal partial class BackupOperationStatusesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupOperationStatusesOperations(RecoveryServicesBackupClient client) + internal BackupOperationStatusesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,19 +39,15 @@ internal BackupOperationStatusesOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Fetches the status of an operation such as triggering a backup, restore. - /// The status can be in progress, completed - /// or failed. You can refer to the OperationStatus enum for all the possible - /// states of an operation. Some operations - /// create jobs. This method returns the list of jobs when the operation is - /// complete. + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs when the operation is complete. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// OperationID which represents the operation. @@ -74,13 +58,13 @@ internal BackupOperationStatusesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -89,77 +73,89 @@ internal BackupOperationStatusesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -171,55 +167,56 @@ internal BackupOperationStatusesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -229,9 +226,10 @@ internal BackupOperationStatusesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -242,24 +240,28 @@ internal BackupOperationStatusesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationStatusesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationStatusesOperationsExtensions.cs index 90b00f6d8a16..a3a93c2aba7f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationStatusesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupOperationStatusesOperationsExtensions.cs @@ -1,83 +1,65 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupOperationStatusesOperations. + /// Extension methods for BackupOperationStatusesOperations /// public static partial class BackupOperationStatusesOperationsExtensions { - /// - /// Fetches the status of an operation such as triggering a backup, restore. - /// The status can be in progress, completed - /// or failed. You can refer to the OperationStatus enum for all the possible - /// states of an operation. Some operations - /// create jobs. This method returns the list of jobs when the operation is - /// complete. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID which represents the operation. - /// - public static OperationStatus Get(this IBackupOperationStatusesOperations operations, string vaultName, string resourceGroupName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); - } + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs when the operation is complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID which represents the operation. + /// + public static OperationStatus Get(this IBackupOperationStatusesOperations operations, string vaultName, string resourceGroupName, string operationId) + { + return ((IBackupOperationStatusesOperations)operations).GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); + } - /// - /// Fetches the status of an operation such as triggering a backup, restore. - /// The status can be in progress, completed - /// or failed. You can refer to the OperationStatus enum for all the possible - /// states of an operation. Some operations - /// create jobs. This method returns the list of jobs when the operation is - /// complete. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID which represents the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBackupOperationStatusesOperations operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs when the operation is complete. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID which represents the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBackupOperationStatusesOperations operations, string vaultName, string resourceGroupName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupPoliciesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupPoliciesOperations.cs index 36b1209b1b32..922fa82719a8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupPoliciesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupPoliciesOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupPoliciesOperations operations. /// - internal partial class BackupPoliciesOperations : IServiceOperations, IBackupPoliciesOperations + internal partial class BackupPoliciesOperations : Microsoft.Rest.IServiceOperations, IBackupPoliciesOperations { /// /// Initializes a new instance of the BackupPoliciesOperations class. @@ -37,13 +24,13 @@ internal partial class BackupPoliciesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupPoliciesOperations(RecoveryServicesBackupClient client) + internal BackupPoliciesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,19 +39,17 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Lists of backup policies associated with Recovery Services Vault. API - /// provides pagination parameters to fetch + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch /// scoped results. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// Headers that will be added to request. @@ -72,13 +57,13 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -87,80 +72,92 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _protectionPolicyQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_protectionPolicyQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_protectionPolicyQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -172,55 +169,56 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -230,9 +228,10 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -243,28 +242,31 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Lists of backup policies associated with Recovery Services Vault. API - /// provides pagination parameters to fetch + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch /// scoped results. /// /// @@ -276,13 +278,13 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -291,51 +293,54 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -347,55 +352,56 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -405,9 +411,10 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -418,24 +425,28 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupPoliciesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupPoliciesOperationsExtensions.cs index a3367259ef1c..2c8513e3d5a3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupPoliciesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupPoliciesOperationsExtensions.cs @@ -1,116 +1,98 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupPoliciesOperations. + /// Extension methods for BackupPoliciesOperations /// public static partial class BackupPoliciesOperationsExtensions { - /// - /// Lists of backup policies associated with Recovery Services Vault. API - /// provides pagination parameters to fetch - /// scoped results. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IBackupPoliciesOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery).GetAwaiter().GetResult(); - } + /// + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch + /// scoped results. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupPoliciesOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IBackupPoliciesOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery).GetAwaiter().GetResult(); + } - /// - /// Lists of backup policies associated with Recovery Services Vault. API - /// provides pagination parameters to fetch - /// scoped results. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupPoliciesOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch + /// scoped results. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupPoliciesOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch + /// scoped results. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupPoliciesOperations operations, string nextPageLink) + { + return ((IBackupPoliciesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Lists of backup policies associated with Recovery Services Vault. API - /// provides pagination parameters to fetch - /// scoped results. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupPoliciesOperations operations, string nextPageLink) + /// + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch + /// scoped results. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupPoliciesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Lists of backup policies associated with Recovery Services Vault. API - /// provides pagination parameters to fetch - /// scoped results. - /// - /// - /// 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 IBackupPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectableItemsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectableItemsOperations.cs index 228280dc1748..ba0efd726eda 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectableItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectableItemsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectableItemsOperations operations. /// - internal partial class BackupProtectableItemsOperations : IServiceOperations, IBackupProtectableItemsOperations + internal partial class BackupProtectableItemsOperations : Microsoft.Rest.IServiceOperations, IBackupProtectableItemsOperations { /// /// Initializes a new instance of the BackupProtectableItemsOperations class. @@ -37,13 +24,13 @@ internal partial class BackupProtectableItemsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) + internal BackupProtectableItemsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,19 +39,17 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Provides a pageable list of protectable objects within your subscription - /// according to the query filter and the + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the /// pagination parameters. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -75,13 +60,13 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -90,56 +75,70 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmspoQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmspoQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmspoQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -150,25 +149,24 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -180,55 +178,56 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -238,9 +237,10 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -251,28 +251,31 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Provides a pageable list of protectable objects within your subscription - /// according to the query filter and the + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the /// pagination parameters. /// /// @@ -284,13 +287,13 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -299,51 +302,54 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -355,55 +361,56 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -413,9 +420,10 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -426,24 +434,28 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectableItemsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectableItemsOperationsExtensions.cs index de4445d8d0fc..84a132c663ee 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectableItemsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectableItemsOperationsExtensions.cs @@ -1,122 +1,104 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupProtectableItemsOperations. + /// Extension methods for BackupProtectableItemsOperations /// public static partial class BackupProtectableItemsOperationsExtensions { - /// - /// Provides a pageable list of protectable objects within your subscription - /// according to the query filter and the - /// pagination parameters. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static IPage List(this IBackupProtectableItemsOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); - } + /// + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the + /// pagination parameters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupProtectableItemsOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupProtectableItemsOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of protectable objects within your subscription - /// according to the query filter and the - /// pagination parameters. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupProtectableItemsOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the + /// pagination parameters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupProtectableItemsOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the + /// pagination parameters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupProtectableItemsOperations operations, string nextPageLink) + { + return ((IBackupProtectableItemsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of protectable objects within your subscription - /// according to the query filter and the - /// pagination parameters. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupProtectableItemsOperations operations, string nextPageLink) + /// + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the + /// pagination parameters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupProtectableItemsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Provides a pageable list of protectable objects within your subscription - /// according to the query filter and the - /// pagination parameters. - /// - /// - /// 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 IBackupProtectableItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectedItemsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectedItemsOperations.cs index 944a3d5027b0..a4eecc1e4939 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectedItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectedItemsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectedItemsOperations operations. /// - internal partial class BackupProtectedItemsOperations : IServiceOperations, IBackupProtectedItemsOperations + internal partial class BackupProtectedItemsOperations : Microsoft.Rest.IServiceOperations, IBackupProtectedItemsOperations { /// /// Initializes a new instance of the BackupProtectedItemsOperations class. @@ -37,13 +24,13 @@ internal partial class BackupProtectedItemsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) + internal BackupProtectedItemsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,15 +41,14 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// Provides a pageable list of all items that are backed up within a vault. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -73,13 +59,13 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -88,56 +74,70 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _protectedItemQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_protectedItemQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_protectedItemQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -148,25 +148,24 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -178,55 +177,56 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -236,9 +236,10 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -249,25 +250,29 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Provides a pageable list of all items that are backed up within a vault. /// @@ -280,13 +285,13 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -295,51 +300,54 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -351,55 +359,56 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -409,9 +418,10 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -422,24 +432,28 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectedItemsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectedItemsOperationsExtensions.cs index a894e3315ba5..e819be632ca0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectedItemsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectedItemsOperationsExtensions.cs @@ -1,114 +1,100 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupProtectedItemsOperations. + /// Extension methods for BackupProtectedItemsOperations /// public static partial class BackupProtectedItemsOperationsExtensions { - /// - /// Provides a pageable list of all items that are backed up within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static IPage List(this IBackupProtectedItemsOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); - } + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupProtectedItemsOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupProtectedItemsOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of all items that are backed up within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupProtectedItemsOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupProtectedItemsOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupProtectedItemsOperations operations, string nextPageLink) + { + return ((IBackupProtectedItemsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of all items that are backed up within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupProtectedItemsOperations operations, string nextPageLink) + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupProtectedItemsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Provides a pageable list of all items that are backed up within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IBackupProtectedItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionContainersOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionContainersOperations.cs index 01ed97d6584e..342ac0b3f7a4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionContainersOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectionContainersOperations operations. /// - internal partial class BackupProtectionContainersOperations : IServiceOperations, IBackupProtectionContainersOperations + internal partial class BackupProtectionContainersOperations : Microsoft.Rest.IServiceOperations, IBackupProtectionContainersOperations { /// /// Initializes a new instance of the BackupProtectionContainersOperations class. @@ -37,13 +24,13 @@ internal partial class BackupProtectionContainersOperations : IServiceOperations /// /// Thrown when a required parameter is null /// - internal BackupProtectionContainersOperations(RecoveryServicesBackupClient client) + internal BackupProtectionContainersOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,15 +41,14 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien /// /// Lists the containers registered to Recovery Services Vault. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// Headers that will be added to request. @@ -70,13 +56,13 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien /// /// 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 /// /// @@ -85,80 +71,92 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsContainerQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsContainerQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsContainerQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -170,55 +168,56 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -228,9 +227,10 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -241,25 +241,29 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists the containers registered to Recovery Services Vault. /// @@ -272,13 +276,13 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien /// /// 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 /// /// @@ -287,51 +291,54 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -343,55 +350,56 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -401,9 +409,10 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -414,24 +423,28 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionContainersOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionContainersOperationsExtensions.cs index 299f062ab42b..38f2c9793611 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionContainersOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionContainersOperationsExtensions.cs @@ -1,108 +1,94 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupProtectionContainersOperations. + /// Extension methods for BackupProtectionContainersOperations /// public static partial class BackupProtectionContainersOperationsExtensions { - /// - /// Lists the containers registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IBackupProtectionContainersOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery).GetAwaiter().GetResult(); - } + /// + /// Lists the containers registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupProtectionContainersOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IBackupProtectionContainersOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery).GetAwaiter().GetResult(); + } - /// - /// Lists the containers registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupProtectionContainersOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the containers registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupProtectionContainersOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the containers registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupProtectionContainersOperations operations, string nextPageLink) + { + return ((IBackupProtectionContainersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Lists the containers registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupProtectionContainersOperations operations, string nextPageLink) + /// + /// Lists the containers registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupProtectionContainersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Lists the containers registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IBackupProtectionContainersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionIntentOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionIntentOperations.cs index 276b87c0cab8..2763df0a25a9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionIntentOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionIntentOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectionIntentOperations operations. /// - internal partial class BackupProtectionIntentOperations : IServiceOperations, IBackupProtectionIntentOperations + internal partial class BackupProtectionIntentOperations : Microsoft.Rest.IServiceOperations, IBackupProtectionIntentOperations { /// /// Initializes a new instance of the BackupProtectionIntentOperations class. @@ -37,13 +24,13 @@ internal partial class BackupProtectionIntentOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) + internal BackupProtectionIntentOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,15 +41,14 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// Provides a pageable list of all intents that are present within a vault. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -73,13 +59,13 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -88,56 +74,70 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _protectionIntentQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_protectionIntentQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_protectionIntentQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -148,25 +148,24 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -178,55 +177,56 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -236,9 +236,10 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -249,25 +250,29 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Provides a pageable list of all intents that are present within a vault. /// @@ -280,13 +285,13 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -295,51 +300,54 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -351,55 +359,56 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -409,9 +418,10 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -422,24 +432,28 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionIntentOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionIntentOperationsExtensions.cs index 8edea65a64f6..a187a4ee4b2e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionIntentOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupProtectionIntentOperationsExtensions.cs @@ -1,114 +1,100 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupProtectionIntentOperations. + /// Extension methods for BackupProtectionIntentOperations /// public static partial class BackupProtectionIntentOperationsExtensions { - /// - /// Provides a pageable list of all intents that are present within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static IPage List(this IBackupProtectionIntentOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); - } + /// + /// Provides a pageable list of all intents that are present within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupProtectionIntentOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupProtectionIntentOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of all intents that are present within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupProtectionIntentOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides a pageable list of all intents that are present within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupProtectionIntentOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Provides a pageable list of all intents that are present within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupProtectionIntentOperations operations, string nextPageLink) + { + return ((IBackupProtectionIntentOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of all intents that are present within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupProtectionIntentOperations operations, string nextPageLink) + /// + /// Provides a pageable list of all intents that are present within a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupProtectionIntentOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Provides a pageable list of all intents that are present within a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IBackupProtectionIntentOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceEncryptionConfigsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceEncryptionConfigsOperations.cs index 8394b46cc46b..8909de2ae0a8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceEncryptionConfigsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceEncryptionConfigsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// BackupResourceEncryptionConfigsOperations operations. /// - internal partial class BackupResourceEncryptionConfigsOperations : IServiceOperations, IBackupResourceEncryptionConfigsOperations + internal partial class BackupResourceEncryptionConfigsOperations : Microsoft.Rest.IServiceOperations, IBackupResourceEncryptionConfigsOperations { /// /// Initializes a new instance of the BackupResourceEncryptionConfigsOperations class. @@ -36,13 +24,13 @@ internal partial class BackupResourceEncryptionConfigsOperations : IServiceOpera /// /// Thrown when a required parameter is null /// - internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient client) + internal BackupResourceEncryptionConfigsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Headers that will be added to request. @@ -66,13 +53,13 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient /// /// 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 /// /// @@ -81,71 +68,82 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -157,50 +155,51 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -210,9 +209,10 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -223,25 +223,29 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates Vault encryption config. /// @@ -249,8 +253,7 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault encryption input config request @@ -261,10 +264,10 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -273,76 +276,88 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient /// /// A response object containing the response body and response headers. /// - public async Task UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.SubscriptionId == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -354,56 +369,57 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -413,19 +429,24 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceEncryptionConfigsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceEncryptionConfigsOperationsExtensions.cs index c7a57b1de17e..48e1b6563ff7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceEncryptionConfigsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceEncryptionConfigsOperationsExtensions.cs @@ -1,112 +1,91 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupResourceEncryptionConfigsOperations. + /// Extension methods for BackupResourceEncryptionConfigsOperations /// public static partial class BackupResourceEncryptionConfigsOperationsExtensions { - /// - /// Fetches Vault Encryption config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - public static BackupResourceEncryptionConfigExtendedResource Get(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName) - { - return operations.GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Fetches Vault Encryption config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates Vault encryption config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault encryption input config request - /// - public static void Update(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters) - { - operations.UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } + /// + /// Fetches Vault Encryption config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static BackupResourceEncryptionConfigExtendedResource Get(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName) + { + return ((IBackupResourceEncryptionConfigsOperations)operations).GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); + } - /// - /// Updates Vault encryption config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault encryption input config request - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches Vault Encryption config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { - (await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Updates Vault encryption config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void Update(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters) + { + ((IBackupResourceEncryptionConfigsOperations)operations).UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + /// + /// Updates Vault encryption config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IBackupResourceEncryptionConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceStorageConfigsNonCRROperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceStorageConfigsNonCRROperations.cs index 589e741ffccc..5716d4696ddd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceStorageConfigsNonCRROperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceStorageConfigsNonCRROperations.cs @@ -1,34 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// - /// BackupResourceStorageConfigsNonCRROperations operations. + /// BackupResourceStorageConfigsNonCrrOperations operations. /// - internal partial class BackupResourceStorageConfigsNonCRROperations : IServiceOperations, IBackupResourceStorageConfigsNonCRROperations + internal partial class BackupResourceStorageConfigsNonCrrOperations : Microsoft.Rest.IServiceOperations, IBackupResourceStorageConfigsNonCrrOperations { /// - /// Initializes a new instance of the BackupResourceStorageConfigsNonCRROperations class. + /// Initializes a new instance of the BackupResourceStorageConfigsNonCrrOperations class. /// /// /// Reference to the service client. @@ -36,13 +24,13 @@ internal partial class BackupResourceStorageConfigsNonCRROperations : IServiceOp /// /// Thrown when a required parameter is null /// - internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClient client) + internal BackupResourceStorageConfigsNonCrrOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Headers that will be added to request. @@ -66,13 +53,13 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie /// /// 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 /// /// @@ -81,71 +68,82 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -157,50 +155,51 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -210,9 +209,10 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -223,25 +223,29 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates vault storage model type. /// @@ -249,8 +253,7 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault storage config request @@ -261,13 +264,13 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie /// /// 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 /// /// @@ -276,76 +279,88 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.SubscriptionId == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -357,56 +372,57 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -416,9 +432,10 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -429,25 +446,29 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates vault storage model type. /// @@ -455,8 +476,7 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault storage config request @@ -467,10 +487,10 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -479,76 +499,87 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie /// /// A response object containing the response body and response headers. /// - public async Task PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.SubscriptionId == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Patch", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Patch", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -560,56 +591,57 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 204) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -619,19 +651,24 @@ internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClie throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceStorageConfigsNonCRROperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceStorageConfigsNonCRROperationsExtensions.cs index f8327055149d..c0ab34c01c79 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceStorageConfigsNonCRROperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceStorageConfigsNonCRROperationsExtensions.cs @@ -1,160 +1,130 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupResourceStorageConfigsNonCRROperations. + /// Extension methods for BackupResourceStorageConfigsNonCrrOperations /// - public static partial class BackupResourceStorageConfigsNonCRROperationsExtensions + public static partial class BackupResourceStorageConfigsNonCrrOperationsExtensions { - /// - /// Fetches resource storage config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - public static BackupResourceConfigResource Get(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName) - { - return operations.GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Fetches resource storage config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates vault storage model type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault storage config request - /// - public static BackupResourceConfigResource Update(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) - { - return operations.UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Updates vault storage model type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault storage config request - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Fetches resource storage config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static BackupResourceConfigResource Get(this IBackupResourceStorageConfigsNonCrrOperations operations, string vaultName, string resourceGroupName) + { + return ((IBackupResourceStorageConfigsNonCrrOperations)operations).GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); + } - /// - /// Updates vault storage model type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault storage config request - /// - public static void Patch(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) + /// + /// Fetches resource storage config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBackupResourceStorageConfigsNonCrrOperations operations, string vaultName, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { - operations.PatchAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static BackupResourceConfigResource Update(this IBackupResourceStorageConfigsNonCrrOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) + { + return ((IBackupResourceStorageConfigsNonCrrOperations)operations).UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Updates vault storage model type. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Vault storage config request - /// - /// - /// The cancellation token. - /// - public static async Task PatchAsync(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IBackupResourceStorageConfigsNonCrrOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) { - (await operations.PatchWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void Patch(this IBackupResourceStorageConfigsNonCrrOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) + { + ((IBackupResourceStorageConfigsNonCrrOperations)operations).PatchAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PatchAsync(this IBackupResourceStorageConfigsNonCrrOperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.PatchWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceVaultConfigsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceVaultConfigsOperations.cs index 1539936618cc..f28a84953a7d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceVaultConfigsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceVaultConfigsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// BackupResourceVaultConfigsOperations operations. /// - internal partial class BackupResourceVaultConfigsOperations : IServiceOperations, IBackupResourceVaultConfigsOperations + internal partial class BackupResourceVaultConfigsOperations : Microsoft.Rest.IServiceOperations, IBackupResourceVaultConfigsOperations { /// /// Initializes a new instance of the BackupResourceVaultConfigsOperations class. @@ -36,13 +24,13 @@ internal partial class BackupResourceVaultConfigsOperations : IServiceOperations /// /// Thrown when a required parameter is null /// - internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient client) + internal BackupResourceVaultConfigsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Headers that will be added to request. @@ -66,13 +53,13 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien /// /// 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 /// /// @@ -81,71 +68,82 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -157,50 +155,51 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -210,9 +209,10 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -223,25 +223,29 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates vault security config. /// @@ -249,8 +253,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource config request @@ -261,13 +264,13 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien /// /// 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 /// /// @@ -276,76 +279,87 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.SubscriptionId == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -357,56 +371,57 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -416,9 +431,10 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -429,34 +445,37 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Updates vault security config. + /// Updates vault security config. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource config request @@ -467,13 +486,13 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien /// /// 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 /// /// @@ -482,76 +501,88 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien /// /// A response object containing the response body and response headers. /// - public async Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.SubscriptionId == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Put", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Put", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -563,56 +594,57 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -622,9 +654,10 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -635,24 +668,28 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceVaultConfigsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceVaultConfigsOperationsExtensions.cs index c7208951dd7b..6752071d05f0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceVaultConfigsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupResourceVaultConfigsOperationsExtensions.cs @@ -1,163 +1,133 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupResourceVaultConfigsOperations. + /// Extension methods for BackupResourceVaultConfigsOperations /// public static partial class BackupResourceVaultConfigsOperationsExtensions { - /// - /// Fetches resource vault config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - public static BackupResourceVaultConfigResource Get(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName) - { - return operations.GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Fetches resource vault config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Fetches resource vault config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static BackupResourceVaultConfigResource Get(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName) + { + return ((IBackupResourceVaultConfigsOperations)operations).GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); + } - /// - /// Updates vault security config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource config request - /// - public static BackupResourceVaultConfigResource Update(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters) + /// + /// Fetches resource vault config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { - return operations.UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Updates vault security config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static BackupResourceVaultConfigResource Update(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters) + { + return ((IBackupResourceVaultConfigsOperations)operations).UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Updates vault security config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource config request - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Updates vault security config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Updates vault security config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static BackupResourceVaultConfigResource Put(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters) + { + return ((IBackupResourceVaultConfigsOperations)operations).PutAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Updates vault security config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource config request - /// - public static BackupResourceVaultConfigResource Put(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters) + /// + /// Updates vault security config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PutAsync(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PutWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) { - return operations.PutAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Updates vault security config. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource config request - /// - /// - /// The cancellation token. - /// - public static async Task PutAsync(this IBackupResourceVaultConfigsOperations operations, string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PutWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupStatusOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupStatusOperations.cs index 8fe4f52de154..8c40cbf10055 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupStatusOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupStatusOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// BackupStatusOperations operations. /// - internal partial class BackupStatusOperations : IServiceOperations, IBackupStatusOperations + internal partial class BackupStatusOperations : Microsoft.Rest.IServiceOperations, IBackupStatusOperations { /// /// Initializes a new instance of the BackupStatusOperations class. @@ -36,13 +24,13 @@ internal partial class BackupStatusOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupStatusOperations(RecoveryServicesBackupClient client) + internal BackupStatusOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -65,13 +53,13 @@ internal BackupStatusOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -80,70 +68,81 @@ internal BackupStatusOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string azureRegion, BackupStatusRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string azureRegion, BackupStatusRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (azureRegion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (azureRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "azureRegion"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("azureRegion", azureRegion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus").ToString(); _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -155,61 +154,62 @@ internal BackupStatusOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -219,9 +219,10 @@ internal BackupStatusOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -232,24 +233,28 @@ internal BackupStatusOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupStatusOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupStatusOperationsExtensions.cs index 96955310faee..b7b69bc3236b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupStatusOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupStatusOperationsExtensions.cs @@ -1,65 +1,49 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupStatusOperations. + /// Extension methods for BackupStatusOperations /// public static partial class BackupStatusOperationsExtensions { - /// - /// Get the container backup status - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Container Backup Status Request - /// - public static BackupStatusResponse Get(this IBackupStatusOperations operations, string azureRegion, BackupStatusRequest parameters) - { - return operations.GetAsync(azureRegion, parameters).GetAwaiter().GetResult(); - } + /// + /// Get the container backup status + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + public static BackupStatusResponse Get(this IBackupStatusOperations operations, string azureRegion, BackupStatusRequest parameters) + { + return ((IBackupStatusOperations)operations).GetAsync(azureRegion, parameters).GetAwaiter().GetResult(); + } - /// - /// Get the container backup status - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Container Backup Status Request - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IBackupStatusOperations operations, string azureRegion, BackupStatusRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Get the container backup status + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IBackupStatusOperations operations, string azureRegion, BackupStatusRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupUsageSummariesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupUsageSummariesOperations.cs index 128be67bac7b..6ae1868523cc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupUsageSummariesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupUsageSummariesOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupUsageSummariesOperations operations. /// - internal partial class BackupUsageSummariesOperations : IServiceOperations, IBackupUsageSummariesOperations + internal partial class BackupUsageSummariesOperations : Microsoft.Rest.IServiceOperations, IBackupUsageSummariesOperations { /// /// Initializes a new instance of the BackupUsageSummariesOperations class. @@ -37,13 +24,13 @@ internal partial class BackupUsageSummariesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupUsageSummariesOperations(RecoveryServicesBackupClient client) + internal BackupUsageSummariesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,15 +41,14 @@ internal BackupUsageSummariesOperations(RecoveryServicesBackupClient client) /// /// Fetches the backup management usage summaries of the vault. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -73,13 +59,13 @@ internal BackupUsageSummariesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -88,56 +74,70 @@ internal BackupUsageSummariesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsBackupSummariesQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsBackupSummariesQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsBackupSummariesQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -148,25 +148,24 @@ internal BackupUsageSummariesOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -178,55 +177,56 @@ internal BackupUsageSummariesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -236,9 +236,10 @@ internal BackupUsageSummariesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -249,24 +250,28 @@ internal BackupUsageSummariesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupUsageSummariesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupUsageSummariesOperationsExtensions.cs index 059c667ce1b7..1ba50376d358 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupUsageSummariesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupUsageSummariesOperationsExtensions.cs @@ -1,82 +1,67 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupUsageSummariesOperations. + /// Extension methods for BackupUsageSummariesOperations /// public static partial class BackupUsageSummariesOperationsExtensions { - /// - /// Fetches the backup management usage summaries of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static IEnumerable List(this IBackupUsageSummariesOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); - } + /// + /// Fetches the backup management usage summaries of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + public static System.Collections.Generic.IEnumerable List(this IBackupUsageSummariesOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupUsageSummariesOperations)operations).ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Fetches the backup management usage summaries of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupUsageSummariesOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the backup management usage summaries of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupUsageSummariesOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupWorkloadItemsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupWorkloadItemsOperations.cs index 06d072331658..02daf99073fe 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupWorkloadItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupWorkloadItemsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// BackupWorkloadItemsOperations operations. /// - internal partial class BackupWorkloadItemsOperations : IServiceOperations, IBackupWorkloadItemsOperations + internal partial class BackupWorkloadItemsOperations : Microsoft.Rest.IServiceOperations, IBackupWorkloadItemsOperations { /// /// Initializes a new instance of the BackupWorkloadItemsOperations class. @@ -37,13 +24,13 @@ internal partial class BackupWorkloadItemsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) + internal BackupWorkloadItemsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,16 +39,17 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Provides a pageable list of workload item of a specific container according - /// to the query filter and the pagination + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination /// parameters. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. @@ -69,9 +57,6 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) /// /// Name of the container. /// - /// - /// OData parameters to apply to the operation. - /// /// /// skipToken Filter. /// @@ -81,13 +66,13 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -96,68 +81,84 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsWorkloadItemQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsWorkloadItemQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsWorkloadItemQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -168,25 +169,24 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -198,55 +198,56 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -256,9 +257,10 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -269,28 +271,31 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Provides a pageable list of workload item of a specific container according - /// to the query filter and the pagination + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination /// parameters. /// /// @@ -302,13 +307,13 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -317,51 +322,54 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -373,55 +381,56 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -431,9 +440,10 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -444,24 +454,28 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupWorkloadItemsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupWorkloadItemsOperationsExtensions.cs index be55e004e594..da951b97b6f6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupWorkloadItemsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupWorkloadItemsOperationsExtensions.cs @@ -1,134 +1,116 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupWorkloadItemsOperations. + /// Extension methods for BackupWorkloadItemsOperations /// public static partial class BackupWorkloadItemsOperationsExtensions { - /// - /// Provides a pageable list of workload item of a specific container according - /// to the query filter and the pagination - /// parameters. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Name of the container. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - public static IPage List(this IBackupWorkloadItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(vaultName, resourceGroupName, fabricName, containerName, odataQuery, skipToken).GetAwaiter().GetResult(); - } + /// + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination + /// parameters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Name of the container. + /// + /// + /// skipToken Filter. + /// + public static Microsoft.Rest.Azure.IPage List(this IBackupWorkloadItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IBackupWorkloadItemsOperations)operations).ListAsync(vaultName, resourceGroupName, fabricName, containerName, odataQuery, skipToken).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of workload item of a specific container according - /// to the query filter and the pagination - /// parameters. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Name of the container. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// skipToken Filter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IBackupWorkloadItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination + /// parameters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Name of the container. + /// + /// + /// skipToken Filter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IBackupWorkloadItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination + /// parameters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IBackupWorkloadItemsOperations operations, string nextPageLink) + { + return ((IBackupWorkloadItemsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Provides a pageable list of workload item of a specific container according - /// to the query filter and the pagination - /// parameters. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IBackupWorkloadItemsOperations operations, string nextPageLink) + /// + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination + /// parameters. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IBackupWorkloadItemsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Provides a pageable list of workload item of a specific container according - /// to the query filter and the pagination - /// parameters. - /// - /// - /// 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 IBackupWorkloadItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupsOperations.cs index 8ec339518a32..fda50eb03c14 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// BackupsOperations operations. /// - internal partial class BackupsOperations : IServiceOperations, IBackupsOperations + internal partial class BackupsOperations : Microsoft.Rest.IServiceOperations, IBackupsOperations { /// /// Initializes a new instance of the BackupsOperations class. @@ -36,13 +24,13 @@ internal partial class BackupsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupsOperations(RecoveryServicesBackupClient client) + internal BackupsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,16 +39,14 @@ internal BackupsOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Triggers backup for specified backed up item. This is an asynchronous - /// operation. To know the status of the + /// Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the /// operation, call GetProtectedItemOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -80,10 +66,10 @@ internal BackupsOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -92,94 +78,109 @@ internal BackupsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Trigger", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Trigger", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -191,61 +192,62 @@ internal BackupsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -255,19 +257,24 @@ internal BackupsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupsOperationsExtensions.cs index da3da1d73abf..20ef2631b859 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/BackupsOperationsExtensions.cs @@ -1,92 +1,72 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for BackupsOperations. + /// Extension methods for BackupsOperations /// public static partial class BackupsOperationsExtensions { - /// - /// Triggers backup for specified backed up item. This is an asynchronous - /// operation. To know the status of the - /// operation, call GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Container name associated with the backup item. - /// - /// - /// Backup item for which backup needs to be triggered. - /// - /// - /// resource backup request - /// - public static void Trigger(this IBackupsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters) - { - operations.TriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Triggers backup for specified backed up item. This is an asynchronous - /// operation. To know the status of the - /// operation, call GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Container name associated with the backup item. - /// - /// - /// Backup item for which backup needs to be triggered. - /// - /// - /// resource backup request - /// - /// - /// The cancellation token. - /// - public static async Task TriggerAsync(this IBackupsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.TriggerWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the + /// operation, call GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Container name associated with the backup item. + /// + /// + /// Backup item for which backup needs to be triggered. + /// + public static void Trigger(this IBackupsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters) + { + ((IBackupsOperations)operations).TriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters).GetAwaiter().GetResult(); + } + /// + /// Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the + /// operation, call GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Container name associated with the backup item. + /// + /// + /// Backup item for which backup needs to be triggered. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TriggerAsync(this IBackupsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.TriggerWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/DeletedProtectionContainersOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/DeletedProtectionContainersOperations.cs index 7f3f42adaaf5..ff805ec02a61 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/DeletedProtectionContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/DeletedProtectionContainersOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// DeletedProtectionContainersOperations operations. /// - internal partial class DeletedProtectionContainersOperations : IServiceOperations, IDeletedProtectionContainersOperations + internal partial class DeletedProtectionContainersOperations : Microsoft.Rest.IServiceOperations, IDeletedProtectionContainersOperations { /// /// Initializes a new instance of the DeletedProtectionContainersOperations class. @@ -37,13 +24,13 @@ internal partial class DeletedProtectionContainersOperations : IServiceOperation /// /// Thrown when a required parameter is null /// - internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient client) + internal DeletedProtectionContainersOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,29 +41,28 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie /// /// Lists the soft deleted containers registered to Recovery Services Vault. /// + /// + /// + /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the recovery services vault. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -85,80 +71,92 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.ApiVersion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupDeletedProtectionContainers").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsContainerQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsContainerQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsContainerQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -170,55 +168,56 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -228,9 +227,10 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -241,25 +241,29 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists the soft deleted containers registered to Recovery Services Vault. /// @@ -272,13 +276,13 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie /// /// 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 /// /// @@ -287,51 +291,54 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -343,55 +350,56 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -401,9 +409,10 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -414,24 +423,28 @@ internal DeletedProtectionContainersOperations(RecoveryServicesBackupClient clie _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/DeletedProtectionContainersOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/DeletedProtectionContainersOperationsExtensions.cs index bf8b93d20657..0057c27dec23 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/DeletedProtectionContainersOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/DeletedProtectionContainersOperationsExtensions.cs @@ -1,108 +1,94 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for DeletedProtectionContainersOperations. + /// Extension methods for DeletedProtectionContainersOperations /// public static partial class DeletedProtectionContainersOperationsExtensions { - /// - /// Lists the soft deleted containers registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IDeletedProtectionContainersOperations operations, string resourceGroupName, string vaultName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(resourceGroupName, vaultName, odataQuery).GetAwaiter().GetResult(); - } + /// + /// Lists the soft deleted containers registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the recovery services vault. + /// + public static Microsoft.Rest.Azure.IPage List(this IDeletedProtectionContainersOperations operations, string resourceGroupName, string vaultName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IDeletedProtectionContainersOperations)operations).ListAsync(resourceGroupName, vaultName, odataQuery).GetAwaiter().GetResult(); + } - /// - /// Lists the soft deleted containers registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IDeletedProtectionContainersOperations operations, string resourceGroupName, string vaultName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the soft deleted containers registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IDeletedProtectionContainersOperations operations, string resourceGroupName, string vaultName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, vaultName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, vaultName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the soft deleted containers registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IDeletedProtectionContainersOperations operations, string nextPageLink) + { + return ((IDeletedProtectionContainersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Lists the soft deleted containers registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IDeletedProtectionContainersOperations operations, string nextPageLink) + /// + /// Lists the soft deleted containers registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IDeletedProtectionContainersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Lists the soft deleted containers registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IDeletedProtectionContainersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ExportJobsOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ExportJobsOperationResultsOperations.cs index bca2e6e8e02c..b8c15c44b9ca 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ExportJobsOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ExportJobsOperationResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ExportJobsOperationResultsOperations operations. /// - internal partial class ExportJobsOperationResultsOperations : IServiceOperations, IExportJobsOperationResultsOperations + internal partial class ExportJobsOperationResultsOperations : Microsoft.Rest.IServiceOperations, IExportJobsOperationResultsOperations { /// /// Initializes a new instance of the ExportJobsOperationResultsOperations class. @@ -36,13 +24,13 @@ internal partial class ExportJobsOperationResultsOperations : IServiceOperations /// /// Thrown when a required parameter is null /// - internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient client) + internal ExportJobsOperationResultsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,17 +39,14 @@ internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient clien public RecoveryServicesBackupClient Client { get; private set; } /// - /// Gets the operation result of operation triggered by Export Jobs API. If the - /// operation is successful, then it also - /// contains URL of a Blob and a SAS key to access the same. The blob contains - /// exported jobs in JSON serialized format. + /// Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also + /// contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// OperationID which represents the export job. @@ -72,13 +57,13 @@ internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient clien /// /// 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 /// /// @@ -87,77 +72,89 @@ internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient clien /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -169,55 +166,56 @@ internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -227,9 +225,10 @@ internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -240,16 +239,16 @@ internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -258,24 +257,28 @@ internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ExportJobsOperationResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ExportJobsOperationResultsOperationsExtensions.cs index 677a335e5134..97e1a7268b63 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ExportJobsOperationResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ExportJobsOperationResultsOperationsExtensions.cs @@ -1,79 +1,63 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ExportJobsOperationResultsOperations. + /// Extension methods for ExportJobsOperationResultsOperations /// public static partial class ExportJobsOperationResultsOperationsExtensions { - /// - /// Gets the operation result of operation triggered by Export Jobs API. If the - /// operation is successful, then it also - /// contains URL of a Blob and a SAS key to access the same. The blob contains - /// exported jobs in JSON serialized format. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID which represents the export job. - /// - public static OperationResultInfoBaseResource Get(this IExportJobsOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); - } + /// + /// Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also + /// contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID which represents the export job. + /// + public static OperationResultInfoBaseResource Get(this IExportJobsOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId) + { + return ((IExportJobsOperationResultsOperations)operations).GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); + } - /// - /// Gets the operation result of operation triggered by Export Jobs API. If the - /// operation is successful, then it also - /// contains URL of a Blob and a SAS key to access the same. The blob contains - /// exported jobs in JSON serialized format. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID which represents the export job. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IExportJobsOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also + /// contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID which represents the export job. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IExportJobsOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/FeatureSupportOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/FeatureSupportOperations.cs index 6850eef7a84f..4bf5dbae1eab 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/FeatureSupportOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/FeatureSupportOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// FeatureSupportOperations operations. /// - internal partial class FeatureSupportOperations : IServiceOperations, IFeatureSupportOperations + internal partial class FeatureSupportOperations : Microsoft.Rest.IServiceOperations, IFeatureSupportOperations { /// /// Initializes a new instance of the FeatureSupportOperations class. @@ -36,13 +24,13 @@ internal partial class FeatureSupportOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal FeatureSupportOperations(RecoveryServicesBackupClient client) + internal FeatureSupportOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,8 +39,7 @@ internal FeatureSupportOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// It will validate if given feature with resource properties is supported in - /// service + /// It will validate if given feature with resource properties is supported in service /// /// /// Azure region to hit Api @@ -66,13 +53,13 @@ internal FeatureSupportOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -81,70 +68,81 @@ internal FeatureSupportOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ValidateWithHttpMessagesAsync(string azureRegion, FeatureSupportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ValidateWithHttpMessagesAsync(string azureRegion, FeatureSupportRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (azureRegion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (azureRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "azureRegion"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("azureRegion", azureRegion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Validate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Validate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures").ToString(); _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -156,61 +154,62 @@ internal FeatureSupportOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -220,9 +219,10 @@ internal FeatureSupportOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -233,24 +233,28 @@ internal FeatureSupportOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/FeatureSupportOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/FeatureSupportOperationsExtensions.cs index 313340ae0c68..e69c295b9516 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/FeatureSupportOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/FeatureSupportOperationsExtensions.cs @@ -1,67 +1,49 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for FeatureSupportOperations. + /// Extension methods for FeatureSupportOperations /// public static partial class FeatureSupportOperationsExtensions { - /// - /// It will validate if given feature with resource properties is supported in - /// service - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Feature support request object - /// - public static AzureVMResourceFeatureSupportResponse Validate(this IFeatureSupportOperations operations, string azureRegion, FeatureSupportRequest parameters) - { - return operations.ValidateAsync(azureRegion, parameters).GetAwaiter().GetResult(); - } + /// + /// It will validate if given feature with resource properties is supported in service + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + public static AzureVMResourceFeatureSupportResponse Validate(this IFeatureSupportOperations operations, string azureRegion, FeatureSupportRequest parameters) + { + return ((IFeatureSupportOperations)operations).ValidateAsync(azureRegion, parameters).GetAwaiter().GetResult(); + } - /// - /// It will validate if given feature with resource properties is supported in - /// service - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Feature support request object - /// - /// - /// The cancellation token. - /// - public static async Task ValidateAsync(this IFeatureSupportOperations operations, string azureRegion, FeatureSupportRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// It will validate if given feature with resource properties is supported in service + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateAsync(this IFeatureSupportOperations operations, string azureRegion, FeatureSupportRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ValidateWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ValidateWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBMSPrepareDataMoveOperationResultOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBMSPrepareDataMoveOperationResultOperations.cs index b69d631e073b..90f5d725fcab 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBMSPrepareDataMoveOperationResultOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBMSPrepareDataMoveOperationResultOperations.cs @@ -1,39 +1,32 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// BMSPrepareDataMoveOperationResultOperations operations. + /// BmsPrepareDataMoveOperationResultOperations operations. /// - public partial interface IBMSPrepareDataMoveOperationResultOperations + public partial interface IBmsPrepareDataMoveOperationResultOperations { /// /// Fetches Operation Result for Prepare Data Move /// + /// + /// Fetches Operation Result for Prepare Data Move + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// The headers that will be added to request. @@ -41,15 +34,13 @@ public partial interface IBMSPrepareDataMoveOperationResultOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupEnginesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupEnginesOperations.cs index d4655c357583..4582664a6e0c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupEnginesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupEnginesOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupEnginesOperations operations. @@ -25,18 +14,19 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IBackupEnginesOperations { /// - /// Backup management servers registered to Recovery Services Vault. - /// Returns a pageable list of servers. + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. /// + /// + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -53,27 +43,26 @@ public partial interface IBackupEnginesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns backup management server registered to Recovery Services - /// Vault. + /// Returns backup management server registered to Recovery Services Vault. /// + /// + /// Returns backup management server registered to Recovery Services Vault. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the backup management server. /// - /// - /// OData parameters to apply to the operation. - /// /// /// skipToken Filter. /// @@ -89,14 +78,14 @@ public partial interface IBackupEnginesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupEngineName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupEngineName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Backup management servers registered to Recovery Services Vault. - /// Returns a pageable list of servers. + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. /// + /// + /// Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -112,9 +101,7 @@ public partial interface IBackupEnginesOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupJobsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupJobsOperations.cs index 5b1d7af253dd..a180373334fb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupJobsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupJobsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupJobsOperations operations. @@ -27,15 +16,17 @@ public partial interface IBackupJobsOperations /// /// Provides a pageable list of jobs. /// + /// + /// Provides a pageable list of jobs. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -52,13 +43,14 @@ public partial interface IBackupJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Provides a pageable list of jobs. /// + /// + /// Provides a pageable list of jobs. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -74,9 +66,7 @@ public partial interface IBackupJobsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupOperationResultsOperations.cs index be5b3099a3ac..15bdafed8ad3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupOperationResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupOperationResultsOperations operations. @@ -24,20 +14,22 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IBackupOperationResultsOperations { /// - /// Provides the status of the delete operations such as deleting - /// backed up item. Once the operation has started, the - /// status code in the response would be Accepted. It will continue to - /// be in this state till it reaches completion. On - /// successful completion, the status code will be OK. This method - /// expects OperationID as an argument. OperationID is + /// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the + /// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On + /// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is /// part of the Location header of the operation response. /// + /// + /// Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the + /// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On + /// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is + /// part of the Location header of the operation response. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// OperationID which represents the operation. @@ -51,9 +43,7 @@ public partial interface IBackupOperationResultsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupOperationStatusesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupOperationStatusesOperations.cs index f514a80af475..774629b9d032 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupOperationStatusesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupOperationStatusesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupOperationStatusesOperations operations. @@ -24,19 +14,20 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IBackupOperationStatusesOperations { /// - /// Fetches the status of an operation such as triggering a backup, - /// restore. The status can be in progress, completed - /// or failed. You can refer to the OperationStatus enum for all the - /// possible states of an operation. Some operations - /// create jobs. This method returns the list of jobs when the - /// operation is complete. + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs when the operation is complete. /// + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs when the operation is complete. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// OperationID which represents the operation. @@ -53,9 +44,7 @@ public partial interface IBackupOperationStatusesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupPoliciesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupPoliciesOperations.cs index 0b5734870718..21e3d0225859 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupPoliciesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupPoliciesOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupPoliciesOperations operations. @@ -25,19 +14,21 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IBackupPoliciesOperations { /// - /// Lists of backup policies associated with Recovery Services Vault. - /// API provides pagination parameters to fetch + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch /// scoped results. /// + /// + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch + /// scoped results. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// The headers that will be added to request. @@ -51,15 +42,16 @@ public partial interface IBackupPoliciesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists of backup policies associated with Recovery Services Vault. - /// API provides pagination parameters to fetch + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch /// scoped results. /// + /// + /// Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch + /// scoped results. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -75,9 +67,7 @@ public partial interface IBackupPoliciesOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectableItemsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectableItemsOperations.cs index 94e07cee74b6..902b635f4792 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectableItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectableItemsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectableItemsOperations operations. @@ -25,19 +14,21 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IBackupProtectableItemsOperations { /// - /// Provides a pageable list of protectable objects within your - /// subscription according to the query filter and the + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the /// pagination parameters. /// + /// + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the + /// pagination parameters. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -54,15 +45,16 @@ public partial interface IBackupProtectableItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Provides a pageable list of protectable objects within your - /// subscription according to the query filter and the + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the /// pagination parameters. /// + /// + /// Provides a pageable list of protectable objects within your subscription according to the query filter and the + /// pagination parameters. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -78,9 +70,7 @@ public partial interface IBackupProtectableItemsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectedItemsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectedItemsOperations.cs index 457b5e1a0528..6b816f81907a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectedItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectedItemsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectedItemsOperations operations. @@ -25,18 +14,19 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IBackupProtectedItemsOperations { /// - /// Provides a pageable list of all items that are backed up within a - /// vault. + /// Provides a pageable list of all items that are backed up within a vault. /// + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -53,14 +43,14 @@ public partial interface IBackupProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Provides a pageable list of all items that are backed up within a - /// vault. + /// Provides a pageable list of all items that are backed up within a vault. /// + /// + /// Provides a pageable list of all items that are backed up within a vault. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -76,9 +66,7 @@ public partial interface IBackupProtectedItemsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectionContainersOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectionContainersOperations.cs index 716c158c6620..e92c5be7b990 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectionContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectionContainersOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectionContainersOperations operations. @@ -27,15 +16,17 @@ public partial interface IBackupProtectionContainersOperations /// /// Lists the containers registered to Recovery Services Vault. /// + /// + /// Lists the containers registered to Recovery Services Vault. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// The headers that will be added to request. @@ -49,13 +40,14 @@ public partial interface IBackupProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists the containers registered to Recovery Services Vault. /// + /// + /// Lists the containers registered to Recovery Services Vault. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -71,9 +63,7 @@ public partial interface IBackupProtectionContainersOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectionIntentOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectionIntentOperations.cs index 34de2af2760c..7e555fdf3738 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectionIntentOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupProtectionIntentOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupProtectionIntentOperations operations. @@ -25,18 +14,19 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IBackupProtectionIntentOperations { /// - /// Provides a pageable list of all intents that are present within a - /// vault. + /// Provides a pageable list of all intents that are present within a vault. /// + /// + /// Provides a pageable list of all intents that are present within a vault. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -53,14 +43,14 @@ public partial interface IBackupProtectionIntentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Provides a pageable list of all intents that are present within a - /// vault. + /// Provides a pageable list of all intents that are present within a vault. /// + /// + /// Provides a pageable list of all intents that are present within a vault. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -76,9 +66,7 @@ public partial interface IBackupProtectionIntentOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceEncryptionConfigsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceEncryptionConfigsOperations.cs index e831f22920b8..2aca37ae7119 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceEncryptionConfigsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceEncryptionConfigsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupResourceEncryptionConfigsOperations operations. @@ -26,12 +16,14 @@ public partial interface IBackupResourceEncryptionConfigsOperations /// /// Fetches Vault Encryption config. /// + /// + /// Fetches Vault Encryption config. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The headers that will be added to request. @@ -39,25 +31,25 @@ public partial interface IBackupResourceEncryptionConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates Vault encryption config. /// + /// + /// Updates Vault encryption config. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault encryption input config request @@ -68,12 +60,10 @@ public partial interface IBackupResourceEncryptionConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceEncryptionConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceStorageConfigsNonCRROperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceStorageConfigsNonCRROperations.cs index 13112dcfed1c..a7d41db3edf1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceStorageConfigsNonCRROperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceStorageConfigsNonCRROperations.cs @@ -1,37 +1,29 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// BackupResourceStorageConfigsNonCRROperations operations. + /// BackupResourceStorageConfigsNonCrrOperations operations. /// - public partial interface IBackupResourceStorageConfigsNonCRROperations + public partial interface IBackupResourceStorageConfigsNonCrrOperations { /// /// Fetches resource storage config. /// + /// + /// Fetches resource storage config. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The headers that will be added to request. @@ -39,25 +31,25 @@ public partial interface IBackupResourceStorageConfigsNonCRROperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates vault storage model type. /// + /// + /// Updates vault storage model type. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault storage config request @@ -68,25 +60,25 @@ public partial interface IBackupResourceStorageConfigsNonCRROperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates vault storage model type. /// + /// + /// Updates vault storage model type. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Vault storage config request @@ -97,12 +89,10 @@ public partial interface IBackupResourceStorageConfigsNonCRROperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceVaultConfigsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceVaultConfigsOperations.cs index 0c94ca97a9a5..b92effda4fc8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceVaultConfigsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupResourceVaultConfigsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupResourceVaultConfigsOperations operations. @@ -26,12 +16,14 @@ public partial interface IBackupResourceVaultConfigsOperations /// /// Fetches resource vault config. /// + /// + /// Fetches resource vault config. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The headers that will be added to request. @@ -39,25 +31,25 @@ public partial interface IBackupResourceVaultConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates vault security config. /// + /// + /// Updates vault security config. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource config request @@ -68,25 +60,25 @@ public partial interface IBackupResourceVaultConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates vault security config. + /// Updates vault security config. /// + /// + /// Updates vault security config. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource config request @@ -97,15 +89,13 @@ public partial interface IBackupResourceVaultConfigsOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceVaultConfigResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupStatusOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupStatusOperations.cs index b93d51178ca8..73dd9ed6cd35 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupStatusOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupStatusOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupStatusOperations operations. @@ -26,6 +16,9 @@ public partial interface IBackupStatusOperations /// /// Get the container backup status /// + /// + /// Get the container backup status + /// /// /// Azure region to hit Api /// @@ -44,9 +37,7 @@ public partial interface IBackupStatusOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string azureRegion, BackupStatusRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string azureRegion, BackupStatusRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupUsageSummariesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupUsageSummariesOperations.cs index c84fbf81b462..37a5c692fe48 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupUsageSummariesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupUsageSummariesOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupUsageSummariesOperations operations. @@ -27,15 +16,17 @@ public partial interface IBackupUsageSummariesOperations /// /// Fetches the backup management usage summaries of the vault. /// + /// + /// Fetches the backup management usage summaries of the vault. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// skipToken Filter. @@ -52,9 +43,7 @@ public partial interface IBackupUsageSummariesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupWorkloadItemsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupWorkloadItemsOperations.cs index 74bdb3563556..37b4fd01a88f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupWorkloadItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupWorkloadItemsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupWorkloadItemsOperations operations. @@ -25,16 +14,21 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IBackupWorkloadItemsOperations { /// - /// Provides a pageable list of workload item of a specific container - /// according to the query filter and the pagination + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination /// parameters. /// + /// + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination + /// parameters. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. @@ -42,9 +36,6 @@ public partial interface IBackupWorkloadItemsOperations /// /// Name of the container. /// - /// - /// OData parameters to apply to the operation. - /// /// /// skipToken Filter. /// @@ -60,15 +51,16 @@ public partial interface IBackupWorkloadItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Provides a pageable list of workload item of a specific container - /// according to the query filter and the pagination + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination /// parameters. /// + /// + /// Provides a pageable list of workload item of a specific container according to the query filter and the pagination + /// parameters. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -84,9 +76,7 @@ public partial interface IBackupWorkloadItemsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupsOperations.cs index c152e3cd8a35..9ed16c4c2395 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IBackupsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// BackupsOperations operations. @@ -24,16 +14,18 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IBackupsOperations { /// - /// Triggers backup for specified backed up item. This is an - /// asynchronous operation. To know the status of the + /// Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the /// operation, call GetProtectedItemOperationResult API. /// + /// + /// Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the + /// operation, call GetProtectedItemOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -56,9 +48,7 @@ public partial interface IBackupsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, BackupRequestResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IDeletedProtectionContainersOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IDeletedProtectionContainersOperations.cs index 5a5a0a4faebf..b2199d921d98 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IDeletedProtectionContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IDeletedProtectionContainersOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// DeletedProtectionContainersOperations operations. @@ -25,19 +14,20 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IDeletedProtectionContainersOperations { /// - /// Lists the soft deleted containers registered to Recovery Services - /// Vault. + /// Lists the soft deleted containers registered to Recovery Services Vault. /// + /// + /// Lists the soft deleted containers registered to Recovery Services Vault. + /// + /// + /// + /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the recovery services vault. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// @@ -50,14 +40,14 @@ public partial interface IDeletedProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists the soft deleted containers registered to Recovery Services - /// Vault. + /// Lists the soft deleted containers registered to Recovery Services Vault. /// + /// + /// Lists the soft deleted containers registered to Recovery Services Vault. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -73,9 +63,7 @@ public partial interface IDeletedProtectionContainersOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IExportJobsOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IExportJobsOperationResultsOperations.cs index ad084fd7013c..d71e20fe35dd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IExportJobsOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IExportJobsOperationResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ExportJobsOperationResultsOperations operations. @@ -24,17 +14,18 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IExportJobsOperationResultsOperations { /// - /// Gets the operation result of operation triggered by Export Jobs - /// API. If the operation is successful, then it also - /// contains URL of a Blob and a SAS key to access the same. The blob - /// contains exported jobs in JSON serialized format. + /// Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also + /// contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. /// + /// + /// Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also + /// contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// OperationID which represents the export job. @@ -51,9 +42,7 @@ public partial interface IExportJobsOperationResultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IFeatureSupportOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IFeatureSupportOperations.cs index 1870c7686202..5d0b52545bd4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IFeatureSupportOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IFeatureSupportOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// FeatureSupportOperations operations. @@ -24,9 +14,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IFeatureSupportOperations { /// - /// It will validate if given feature with resource properties is - /// supported in service + /// It will validate if given feature with resource properties is supported in service /// + /// + /// It will validate if given feature with resource properties is supported in service + /// /// /// Azure region to hit Api /// @@ -45,9 +37,7 @@ public partial interface IFeatureSupportOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ValidateWithHttpMessagesAsync(string azureRegion, FeatureSupportRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ValidateWithHttpMessagesAsync(string azureRegion, FeatureSupportRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IItemLevelRecoveryConnectionsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IItemLevelRecoveryConnectionsOperations.cs index 770a73544040..a2bad5905db3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IItemLevelRecoveryConnectionsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IItemLevelRecoveryConnectionsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ItemLevelRecoveryConnectionsOperations operations. @@ -24,18 +14,20 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IItemLevelRecoveryConnectionsOperations { /// - /// Provisions a script which invokes an iSCSI connection to the backup - /// data. Executing this script opens a file - /// explorer displaying all the recoverable files and folders. This is - /// an asynchronous operation. To know the status of + /// Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file + /// explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of /// provisioning, call GetProtectedItemOperationResult API. /// + /// + /// Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file + /// explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of + /// provisioning, call GetProtectedItemOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up items. @@ -47,8 +39,7 @@ public partial interface IItemLevelRecoveryConnectionsOperations /// Backed up item name whose files/folders are to be restored. /// /// - /// Recovery point ID which represents backed up data. iSCSI connection - /// will be provisioned + /// Recovery point ID which represents backed up data. iSCSI connection will be provisioned /// for this backed up data. /// /// @@ -63,22 +54,21 @@ public partial interface IItemLevelRecoveryConnectionsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task ProvisionWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task ProvisionWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Revokes an iSCSI connection which can be used to download a script. - /// Executing this script opens a file explorer - /// displaying all recoverable files and folders. This is an - /// asynchronous operation. + /// Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer + /// displaying all recoverable files and folders. This is an asynchronous operation. /// + /// + /// Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer + /// displaying all recoverable files and folders. This is an asynchronous operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up items. @@ -90,8 +80,7 @@ public partial interface IItemLevelRecoveryConnectionsOperations /// Backed up item name whose files/folders are to be restored. /// /// - /// Recovery point ID which represents backed up data. iSCSI connection - /// will be revoked for + /// Recovery point ID which represents backed up data. iSCSI connection will be revoked for /// this backed up data. /// /// @@ -103,9 +92,7 @@ public partial interface IItemLevelRecoveryConnectionsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task RevokeWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task RevokeWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobCancellationsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobCancellationsOperations.cs index 4eccb07fd16b..6ddcda28e624 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobCancellationsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobCancellationsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// JobCancellationsOperations operations. @@ -24,16 +14,18 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IJobCancellationsOperations { /// - /// Cancels a job. This is an asynchronous operation. To know the - /// status of the cancellation, call + /// Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call /// GetCancelOperationResult API. /// + /// + /// Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call + /// GetCancelOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the job to cancel. @@ -47,9 +39,7 @@ public partial interface IJobCancellationsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobDetailsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobDetailsOperations.cs index 4b9d658775ab..8a03207c19a2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobDetailsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobDetailsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// JobDetailsOperations operations. @@ -26,12 +16,14 @@ public partial interface IJobDetailsOperations /// /// Gets extended information associated with the job. /// + /// + /// Gets extended information associated with the job. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the job whose details are to be fetched. @@ -48,9 +40,7 @@ public partial interface IJobDetailsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobOperationResultsOperations.cs index 12b9a3436927..fcf84ba6496a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobOperationResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// JobOperationResultsOperations operations. @@ -26,19 +16,20 @@ public partial interface IJobOperationResultsOperations /// /// Fetches the result of any operation. /// + /// + /// Fetches the result of any operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Job name whose operation result has to be fetched. /// /// - /// OperationID which represents the operation whose result has to be - /// fetched. + /// OperationID which represents the operation whose result has to be fetched. /// /// /// The headers that will be added to request. @@ -49,9 +40,7 @@ public partial interface IJobOperationResultsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobsOperations.cs index f228dcdf6e5e..3e98ab1db6e1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IJobsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// JobsOperations operations. @@ -25,18 +14,19 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IJobsOperations { /// - /// Triggers export of jobs specified by filters and returns an - /// OperationID to track. + /// Triggers export of jobs specified by filters and returns an OperationID to track. /// + /// + /// Triggers export of jobs specified by filters and returns an OperationID to track. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// The headers that will be added to request. @@ -47,9 +37,7 @@ public partial interface IJobsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task ExportWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task ExportWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IOperationOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IOperationOperations.cs index 178ed8961c01..0d331e82a01e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IOperationOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IOperationOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// OperationOperations operations. @@ -24,15 +14,16 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IOperationOperations { /// - /// Validate operation for specified backed up item. This is a - /// synchronous operation. + /// Validate operation for specified backed up item. This is a synchronous operation. /// + /// + /// Validate operation for specified backed up item. This is a synchronous operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource validate operation request @@ -49,9 +40,7 @@ public partial interface IOperationOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ValidateWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ValidateWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IOperations.cs index 7b83082570bc..e18607c91b4a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// Operations operations. @@ -26,6 +16,9 @@ public partial interface IOperations /// /// Returns the list of available operations. /// + /// + /// Returns the list of available operations. + /// /// /// The headers that will be added to request. /// @@ -38,13 +31,14 @@ public partial interface IOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Returns the list of available operations. /// + /// + /// Returns the list of available operations. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -60,9 +54,7 @@ public partial interface IOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IPrivateEndpointConnectionOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IPrivateEndpointConnectionOperations.cs index 2157123768fc..1d3a5e28114f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IPrivateEndpointConnectionOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IPrivateEndpointConnectionOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// PrivateEndpointConnectionOperations operations. @@ -26,12 +16,14 @@ public partial interface IPrivateEndpointConnectionOperations /// /// Get Private Endpoint Connection. This call is made by Backup Admin. /// + /// + /// Get Private Endpoint Connection. This call is made by Backup Admin. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -42,26 +34,25 @@ public partial interface IPrivateEndpointConnectionOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Approve or Reject Private Endpoint requests. This call is made by - /// Backup Admin. + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. /// + /// + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -81,20 +72,19 @@ public partial interface IPrivateEndpointConnectionOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete Private Endpoint requests. This call is made by Backup - /// Admin. + /// Delete Private Endpoint requests. This call is made by Backup Admin. /// + /// + /// Delete Private Endpoint requests. This call is made by Backup Admin. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -108,20 +98,19 @@ public partial interface IPrivateEndpointConnectionOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Approve or Reject Private Endpoint requests. This call is made by - /// Backup Admin. + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. /// + /// + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -141,20 +130,19 @@ public partial interface IPrivateEndpointConnectionOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginPutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginPutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete Private Endpoint requests. This call is made by Backup - /// Admin. + /// Delete Private Endpoint requests. This call is made by Backup Admin. /// + /// + /// Delete Private Endpoint requests. This call is made by Backup Admin. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -168,9 +156,7 @@ public partial interface IPrivateEndpointConnectionOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IPrivateEndpointOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IPrivateEndpointOperations.cs index cd01ac1403a3..2638a959bb01 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IPrivateEndpointOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IPrivateEndpointOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// PrivateEndpointOperations operations. @@ -26,12 +16,14 @@ public partial interface IPrivateEndpointOperations /// /// Gets the operation status for a private endpoint connection. /// + /// + /// Gets the operation status for a private endpoint connection. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -45,15 +37,13 @@ public partial interface IPrivateEndpointOperations /// /// 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> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectableContainersOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectableContainersOperations.cs index cb141bd9cf19..6e9d44a02ca2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectableContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectableContainersOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectableContainersOperations operations. @@ -25,20 +14,22 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IProtectableContainersOperations { /// - /// Lists the containers that can be registered to Recovery Services - /// Vault. + /// Lists the containers that can be registered to Recovery Services Vault. /// + /// + /// Lists the containers that can be registered to Recovery Services Vault. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// - /// - /// - /// OData parameters to apply to the operation. + /// /// /// /// The headers that will be added to request. @@ -52,14 +43,14 @@ public partial interface IProtectableContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists the containers that can be registered to Recovery Services - /// Vault. + /// Lists the containers that can be registered to Recovery Services Vault. /// + /// + /// Lists the containers that can be registered to Recovery Services Vault. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -75,9 +66,7 @@ public partial interface IProtectableContainersOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemOperationResultsOperations.cs index e20249fe28b2..1fd9c9ef36bf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemOperationResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectedItemOperationResultsOperations operations. @@ -26,12 +16,14 @@ public partial interface IProtectedItemOperationResultsOperations /// /// Fetches the result of any operation on the backup item. /// + /// + /// Fetches the result of any operation on the backup item. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -43,8 +35,7 @@ public partial interface IProtectedItemOperationResultsOperations /// Backup item name whose details are to be fetched. /// /// - /// OperationID which represents the operation whose result needs to be - /// fetched. + /// OperationID which represents the operation whose result needs to be fetched. /// /// /// The headers that will be added to request. @@ -58,9 +49,7 @@ public partial interface IProtectedItemOperationResultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemOperationStatusesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemOperationStatusesOperations.cs index 55f73b091aa0..caed2a21b6ca 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemOperationStatusesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemOperationStatusesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectedItemOperationStatusesOperations operations. @@ -24,19 +14,20 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IProtectedItemOperationStatusesOperations { /// - /// Fetches the status of an operation such as triggering a backup, - /// restore. The status can be in progress, completed - /// or failed. You can refer to the OperationStatus enum for all the - /// possible states of the operation. Some operations - /// create jobs. This method returns the list of jobs associated with - /// the operation. + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations + /// create jobs. This method returns the list of jobs associated with the operation. /// + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations + /// create jobs. This method returns the list of jobs associated with the operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -48,8 +39,7 @@ public partial interface IProtectedItemOperationStatusesOperations /// Backup item name whose details are to be fetched. /// /// - /// OperationID represents the operation whose status needs to be - /// fetched. + /// OperationID represents the operation whose status needs to be fetched. /// /// /// The headers that will be added to request. @@ -63,9 +53,7 @@ public partial interface IProtectedItemOperationStatusesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemsOperations.cs index 2ec2ff0b561c..cc4bf8552083 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectedItemsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectedItemsOperations operations. @@ -25,16 +14,21 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IProtectedItemsOperations { /// - /// Provides the details of the backed up item. This is an asynchronous - /// operation. To know the status of the operation, + /// Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, /// call the GetItemOperationResult API. /// + /// + /// Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -45,9 +39,6 @@ public partial interface IProtectedItemsOperations /// /// Backed up item name whose details are to be fetched. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// @@ -60,22 +51,21 @@ public partial interface IProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Enables backup of an item or to modifies the backup policy - /// information of an already backed up item. This is an - /// asynchronous operation. To know the status of the operation, call - /// the GetItemOperationResult API. + /// Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + /// asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. /// + /// + /// Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + /// asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -101,21 +91,21 @@ public partial interface IProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Used to disable backup of an item within a container. This is an - /// asynchronous operation. To know the status of the + /// Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the /// request, call the GetItemOperationResult API. /// + /// + /// Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the + /// request, call the GetItemOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -135,9 +125,7 @@ public partial interface IProtectedItemsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainerOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainerOperationResultsOperations.cs index 77f9daec1509..e3ebb3497e81 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainerOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainerOperationResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectionContainerOperationResultsOperations operations. @@ -26,12 +16,14 @@ public partial interface IProtectionContainerOperationResultsOperations /// /// Fetches the result of any operation on the container. /// + /// + /// Fetches the result of any operation on the container. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. @@ -40,8 +32,7 @@ public partial interface IProtectionContainerOperationResultsOperations /// Container name whose information should be fetched. /// /// - /// Operation ID which represents the operation whose result needs to - /// be fetched. + /// Operation ID which represents the operation whose result needs to be fetched. /// /// /// The headers that will be added to request. @@ -55,9 +46,7 @@ public partial interface IProtectionContainerOperationResultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainerRefreshOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainerRefreshOperationResultsOperations.cs index 92fc918f3bbf..8c02758a2788 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainerRefreshOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainerRefreshOperationResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectionContainerRefreshOperationResultsOperations operations. @@ -24,22 +14,22 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IProtectionContainerRefreshOperationResultsOperations { /// - /// Provides the result of the refresh operation triggered by the - /// BeginRefresh operation. + /// Provides the result of the refresh operation triggered by the BeginRefresh operation. /// + /// + /// Provides the result of the refresh operation triggered by the BeginRefresh operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. /// /// - /// Operation ID associated with the operation whose result needs to be - /// fetched. + /// Operation ID associated with the operation whose result needs to be fetched. /// /// /// The headers that will be added to request. @@ -50,9 +40,7 @@ public partial interface IProtectionContainerRefreshOperationResultsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainersOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainersOperations.cs index 6fefb5551645..070d604eeba0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionContainersOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectionContainersOperations operations. @@ -25,15 +14,16 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IProtectionContainersOperations { /// - /// Gets details of the specific container registered to your Recovery - /// Services Vault. + /// Gets details of the specific container registered to your Recovery Services Vault. /// + /// + /// Gets details of the specific container registered to your Recovery Services Vault. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the fabric where the container belongs. @@ -53,22 +43,23 @@ public partial interface IProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Registers the container with Recovery Services vault. - /// This is an asynchronous operation. To track the operation status, - /// use location header to call get latest status of + /// This is an asynchronous operation. To track the operation status, use location header to call get latest status of /// the operation. /// + /// + /// Registers the container with Recovery Services vault. + /// This is an asynchronous operation. To track the operation status, use location header to call get latest status of + /// the operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. @@ -91,29 +82,27 @@ public partial interface IProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RegisterWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, ProtectionContainerResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RegisterWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, ProtectionContainerResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Unregisters the given container from your Recovery Services Vault. - /// This is an asynchronous operation. To determine - /// whether the backend service has finished processing the request, - /// call Get Container Operation Result API. + /// Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine + /// whether the backend service has finished processing the request, call Get Container Operation Result API. /// + /// + /// Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine + /// whether the backend service has finished processing the request, call Get Container Operation Result API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the fabric where the container belongs. /// /// - /// Name of the container which needs to be unregistered from the - /// Recovery Services Vault. + /// Name of the container which needs to be unregistered from the Recovery Services Vault. /// /// /// The headers that will be added to request. @@ -124,23 +113,22 @@ public partial interface IProtectionContainersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task UnregisterWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task UnregisterWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Inquires all the protectable items under the given container. + /// This is an async operation and the results should be tracked using location header or Azure-async-url. /// /// - /// This is an async operation and the results should be tracked using - /// location header or Azure-async-url. + /// This is an async operation and the results should be tracked using location header or Azure-async-url. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric Name associated with the container. @@ -148,9 +136,6 @@ public partial interface IProtectionContainersOperations /// /// Name of the container in which inquiry needs to be triggered. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// @@ -160,29 +145,28 @@ public partial interface IProtectionContainersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task InquireWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task InquireWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Discovers all the containers in the subscription that can be backed - /// up to Recovery Services Vault. This is an - /// asynchronous operation. To know the status of the operation, call - /// GetRefreshOperationResult API. + /// Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an + /// asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. /// + /// + /// Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an + /// asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated the container. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// @@ -192,9 +176,7 @@ public partial interface IProtectionContainersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task RefreshWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task RefreshWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionIntentOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionIntentOperations.cs index 86ded50cf6b2..b91276d7ba03 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionIntentOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionIntentOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectionIntentOperations operations. @@ -29,6 +19,12 @@ public partial interface IProtectionIntentOperations /// 2. VM is already protected /// 3. Any VM related configuration passed in properties. /// + /// + /// It will validate followings + /// 1. Vault capacity + /// 2. VM is already protected + /// 3. Any VM related configuration passed in properties. + /// /// /// Azure region to hit Api /// @@ -47,21 +43,21 @@ public partial interface IProtectionIntentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ValidateWithHttpMessagesAsync(string azureRegion, PreValidateEnableBackupRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ValidateWithHttpMessagesAsync(string azureRegion, PreValidateEnableBackupRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Provides the details of the protection intent up item. This is an - /// asynchronous operation. To know the status of the operation, + /// Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation, /// call the GetItemOperationResult API. /// + /// + /// Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -81,20 +77,19 @@ public partial interface IProtectionIntentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Create Intent for Enabling backup of an item. This is a synchronous - /// operation. + /// Create Intent for Enabling backup of an item. This is a synchronous operation. /// + /// + /// Create Intent for Enabling backup of an item. This is a synchronous operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -117,19 +112,19 @@ public partial interface IProtectionIntentOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, ProtectionIntentResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, ProtectionIntentResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Used to remove intent from an item /// + /// + /// Used to remove intent from an item + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the intent. @@ -146,9 +141,7 @@ public partial interface IProtectionIntentOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPoliciesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPoliciesOperations.cs index f816e1096525..f083e048bd0b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPoliciesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPoliciesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectionPoliciesOperations operations. @@ -24,17 +14,18 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IProtectionPoliciesOperations { /// - /// Provides the details of the backup policies associated to Recovery - /// Services Vault. This is an asynchronous - /// operation. Status of the operation can be fetched using - /// GetPolicyOperationResult API. + /// Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous + /// operation. Status of the operation can be fetched using GetPolicyOperationResult API. /// + /// + /// Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous + /// operation. Status of the operation can be fetched using GetPolicyOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Backup policy information to be fetched. @@ -51,21 +42,21 @@ public partial interface IProtectionPoliciesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates or modifies a backup policy. This is an asynchronous - /// operation. Status of the operation can be fetched + /// Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched /// using GetPolicyOperationResult API. /// + /// + /// Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched + /// using GetPolicyOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Backup policy to be created. @@ -85,22 +76,21 @@ public partial interface IProtectionPoliciesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, ProtectionPolicyResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, ProtectionPolicyResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes specified backup policy from your Recovery Services Vault. - /// This is an asynchronous operation. Status of the - /// operation can be fetched using GetProtectionPolicyOperationResult - /// API. + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. /// + /// + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Backup policy to be deleted. @@ -114,22 +104,21 @@ public partial interface IProtectionPoliciesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes specified backup policy from your Recovery Services Vault. - /// This is an asynchronous operation. Status of the - /// operation can be fetched using GetProtectionPolicyOperationResult - /// API. + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. /// + /// + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Backup policy to be deleted. @@ -143,9 +132,7 @@ public partial interface IProtectionPoliciesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPolicyOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPolicyOperationResultsOperations.cs index 06c0549fe83e..fc68bce7fa5c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPolicyOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPolicyOperationResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectionPolicyOperationResultsOperations operations. @@ -26,19 +16,20 @@ public partial interface IProtectionPolicyOperationResultsOperations /// /// Provides the result of an operation. /// + /// + /// Provides the result of an operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// - /// Backup policy name whose operation's result needs to be fetched. + /// Backup policy name whose operation's result needs to be fetched. /// /// - /// Operation ID which represents the operation whose result needs to - /// be fetched. + /// Operation ID which represents the operation whose result needs to be fetched. /// /// /// The headers that will be added to request. @@ -52,9 +43,7 @@ public partial interface IProtectionPolicyOperationResultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPolicyOperationStatusesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPolicyOperationStatusesOperations.cs index 0a9ae300d3a3..7afba6eb536f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPolicyOperationStatusesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IProtectionPolicyOperationStatusesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectionPolicyOperationStatusesOperations operations. @@ -24,26 +14,26 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IProtectionPolicyOperationStatusesOperations { /// - /// Provides the status of the asynchronous operations like backup, - /// restore. The status can be in progress, completed - /// or failed. You can refer to the Operation Status enum for all the - /// possible states of an operation. Some operations - /// create jobs. This method returns the list of jobs associated with - /// operation. + /// Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed + /// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs associated with operation. /// + /// + /// Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed + /// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs associated with operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// - /// Backup policy name whose operation's status needs to be fetched. + /// Backup policy name whose operation's status needs to be fetched. /// /// - /// Operation ID which represents an operation whose status needs to be - /// fetched. + /// Operation ID which represents an operation whose status needs to be fetched. /// /// /// The headers that will be added to request. @@ -57,9 +47,7 @@ public partial interface IProtectionPolicyOperationStatusesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryPointsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryPointsOperations.cs index 2d6874694647..efcdad686bbd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryPointsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryPointsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// RecoveryPointsOperations operations. @@ -27,12 +16,17 @@ public partial interface IRecoveryPointsOperations /// /// Lists the backup copies for the backed up item. /// + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -43,9 +37,6 @@ public partial interface IRecoveryPointsOperations /// /// Backed up item whose backup copies are to be fetched. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// @@ -58,22 +49,21 @@ public partial interface IRecoveryPointsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Provides the information of the backed up data identified using - /// RecoveryPointID. This is an asynchronous operation. - /// To know the status of the operation, call the - /// GetProtectedItemOperationResult API. + /// Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. + /// To know the status of the operation, call the GetProtectedItemOperationResult API. /// + /// + /// Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. + /// To know the status of the operation, call the GetProtectedItemOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with backed up item. @@ -99,13 +89,14 @@ public partial interface IRecoveryPointsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists the backup copies for the backed up item. /// + /// + /// Lists the backup copies for the backed up item. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -121,9 +112,7 @@ public partial interface IRecoveryPointsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryPointsRecommendedForMoveOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryPointsRecommendedForMoveOperations.cs index 56c307fb98dc..9f07e1c28679 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryPointsRecommendedForMoveOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryPointsRecommendedForMoveOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// RecoveryPointsRecommendedForMoveOperations operations. @@ -26,23 +16,28 @@ public partial interface IRecoveryPointsRecommendedForMoveOperations /// /// Lists the recovery points recommended for move to another tier /// + /// + /// Lists the recovery points recommended for move to another tier + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// + /// /// /// + /// /// /// /// Gets the class type. /// - /// + /// /// List of Recovery Points excluded from Move /// /// @@ -57,13 +52,14 @@ public partial interface IRecoveryPointsRecommendedForMoveOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string objectType = default(string), IList excludedRPList = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string objectType = default(string), System.Collections.Generic.IList excludedRpList = default(System.Collections.Generic.IList), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists the recovery points recommended for move to another tier /// + /// + /// Lists the recovery points recommended for move to another tier + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -79,9 +75,7 @@ public partial interface IRecoveryPointsRecommendedForMoveOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryServicesBackupClient.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryServicesBackupClient.cs index 4f38d074d3d5..e95c396666a3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryServicesBackupClient.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRecoveryServicesBackupClient.cs @@ -1,27 +1,18 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// + /// /// - public partial interface IRecoveryServicesBackupClient : System.IDisposable + public partial interface IRecoveryServicesBackupClient : System.IDisposable { /// /// The base URI of the service. @@ -31,303 +22,311 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// - /// The subscription Id. + /// The API version to use for this operation. /// - string SubscriptionId { get; set; } + string ApiVersion { get;} + /// - /// Client Api Version. + /// The subscription Id. /// - string ApiVersion { get; } + string SubscriptionId { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// - /// 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 + /// 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; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the IBackupResourceStorageConfigsNonCRROperations. + /// Gets the IBackupResourceStorageConfigsNonCrrOperations /// - IBackupResourceStorageConfigsNonCRROperations BackupResourceStorageConfigsNonCRR { get; } + IBackupResourceStorageConfigsNonCrrOperations BackupResourceStorageConfigsNonCrr { get; } /// - /// Gets the IProtectionIntentOperations. + /// Gets the IProtectionIntentOperations /// IProtectionIntentOperations ProtectionIntent { get; } /// - /// Gets the IBackupStatusOperations. + /// Gets the IBackupStatusOperations /// IBackupStatusOperations BackupStatus { get; } /// - /// Gets the IFeatureSupportOperations. + /// Gets the IFeatureSupportOperations /// IFeatureSupportOperations FeatureSupport { get; } /// - /// Gets the IBackupProtectionIntentOperations. + /// Gets the IBackupProtectionIntentOperations /// IBackupProtectionIntentOperations BackupProtectionIntent { get; } /// - /// Gets the IBackupUsageSummariesOperations. + /// Gets the IBackupUsageSummariesOperations /// IBackupUsageSummariesOperations BackupUsageSummaries { get; } /// - /// Gets the IOperations. + /// Gets the IOperations /// IOperations Operations { get; } /// - /// Gets the IBackupResourceVaultConfigsOperations. + /// Gets the IBackupResourceVaultConfigsOperations /// IBackupResourceVaultConfigsOperations BackupResourceVaultConfigs { get; } /// - /// Gets the IBackupResourceEncryptionConfigsOperations. + /// Gets the IBackupResourceEncryptionConfigsOperations /// IBackupResourceEncryptionConfigsOperations BackupResourceEncryptionConfigs { get; } /// - /// Gets the IPrivateEndpointConnectionOperations. + /// Gets the IPrivateEndpointConnectionOperations /// IPrivateEndpointConnectionOperations PrivateEndpointConnection { get; } /// - /// Gets the IPrivateEndpointOperations. + /// Gets the IPrivateEndpointOperations /// IPrivateEndpointOperations PrivateEndpoint { get; } /// - /// Gets the IBMSPrepareDataMoveOperationResultOperations. + /// Gets the IBmsPrepareDataMoveOperationResultOperations /// - IBMSPrepareDataMoveOperationResultOperations BMSPrepareDataMoveOperationResult { get; } + IBmsPrepareDataMoveOperationResultOperations BmsPrepareDataMoveOperationResult { get; } /// - /// Gets the IProtectedItemsOperations. + /// Gets the IProtectedItemsOperations /// IProtectedItemsOperations ProtectedItems { get; } /// - /// Gets the IProtectedItemOperationResultsOperations. + /// Gets the IProtectedItemOperationResultsOperations /// IProtectedItemOperationResultsOperations ProtectedItemOperationResults { get; } /// - /// Gets the IRecoveryPointsOperations. + /// Gets the IRecoveryPointsOperations /// IRecoveryPointsOperations RecoveryPoints { get; } /// - /// Gets the IRestoresOperations. + /// Gets the IRestoresOperations /// IRestoresOperations Restores { get; } /// - /// Gets the IBackupPoliciesOperations. + /// Gets the IBackupPoliciesOperations /// IBackupPoliciesOperations BackupPolicies { get; } /// - /// Gets the IProtectionPoliciesOperations. + /// Gets the IProtectionPoliciesOperations /// IProtectionPoliciesOperations ProtectionPolicies { get; } /// - /// Gets the IProtectionPolicyOperationResultsOperations. + /// Gets the IProtectionPolicyOperationResultsOperations /// IProtectionPolicyOperationResultsOperations ProtectionPolicyOperationResults { get; } /// - /// Gets the IBackupJobsOperations. + /// Gets the IBackupJobsOperations /// IBackupJobsOperations BackupJobs { get; } /// - /// Gets the IJobDetailsOperations. + /// Gets the IJobDetailsOperations /// IJobDetailsOperations JobDetails { get; } /// - /// Gets the IJobCancellationsOperations. + /// Gets the IJobCancellationsOperations /// IJobCancellationsOperations JobCancellations { get; } /// - /// Gets the IJobOperationResultsOperations. + /// Gets the IJobOperationResultsOperations /// IJobOperationResultsOperations JobOperationResults { get; } /// - /// Gets the IExportJobsOperationResultsOperations. + /// Gets the IExportJobsOperationResultsOperations /// IExportJobsOperationResultsOperations ExportJobsOperationResults { get; } /// - /// Gets the IJobsOperations. + /// Gets the IJobsOperations /// IJobsOperations Jobs { get; } /// - /// Gets the IBackupProtectedItemsOperations. + /// Gets the IBackupProtectedItemsOperations /// IBackupProtectedItemsOperations BackupProtectedItems { get; } /// - /// Gets the IOperationOperations. + /// Gets the IOperationOperations /// IOperationOperations Operation { get; } /// - /// Gets the IValidateOperationOperations. + /// Gets the IValidateOperationOperations /// IValidateOperationOperations ValidateOperation { get; } /// - /// Gets the IValidateOperationResultsOperations. + /// Gets the IValidateOperationResultsOperations /// IValidateOperationResultsOperations ValidateOperationResults { get; } /// - /// Gets the IValidateOperationStatusesOperations. + /// Gets the IValidateOperationStatusesOperations /// IValidateOperationStatusesOperations ValidateOperationStatuses { get; } /// - /// Gets the IBackupEnginesOperations. + /// Gets the IBackupEnginesOperations /// IBackupEnginesOperations BackupEngines { get; } /// - /// Gets the IProtectionContainerRefreshOperationResultsOperations. + /// Gets the IProtectionContainerRefreshOperationResultsOperations /// IProtectionContainerRefreshOperationResultsOperations ProtectionContainerRefreshOperationResults { get; } /// - /// Gets the IProtectableContainersOperations. + /// Gets the IProtectableContainersOperations /// IProtectableContainersOperations ProtectableContainers { get; } /// - /// Gets the IProtectionContainersOperations. + /// Gets the IProtectionContainersOperations /// IProtectionContainersOperations ProtectionContainers { get; } /// - /// Gets the IBackupWorkloadItemsOperations. + /// Gets the IBackupWorkloadItemsOperations /// IBackupWorkloadItemsOperations BackupWorkloadItems { get; } /// - /// Gets the IProtectionContainerOperationResultsOperations. + /// Gets the IProtectionContainerOperationResultsOperations /// IProtectionContainerOperationResultsOperations ProtectionContainerOperationResults { get; } /// - /// Gets the IBackupsOperations. + /// Gets the IBackupsOperations /// IBackupsOperations Backups { get; } /// - /// Gets the IProtectedItemOperationStatusesOperations. + /// Gets the IProtectedItemOperationStatusesOperations /// IProtectedItemOperationStatusesOperations ProtectedItemOperationStatuses { get; } /// - /// Gets the IItemLevelRecoveryConnectionsOperations. + /// Gets the IItemLevelRecoveryConnectionsOperations /// IItemLevelRecoveryConnectionsOperations ItemLevelRecoveryConnections { get; } /// - /// Gets the IBackupOperationResultsOperations. + /// Gets the IBackupOperationResultsOperations /// IBackupOperationResultsOperations BackupOperationResults { get; } /// - /// Gets the IBackupOperationStatusesOperations. + /// Gets the IBackupOperationStatusesOperations /// IBackupOperationStatusesOperations BackupOperationStatuses { get; } /// - /// Gets the IProtectionPolicyOperationStatusesOperations. + /// Gets the IProtectionPolicyOperationStatusesOperations /// IProtectionPolicyOperationStatusesOperations ProtectionPolicyOperationStatuses { get; } /// - /// Gets the IBackupProtectableItemsOperations. + /// Gets the IBackupProtectableItemsOperations /// IBackupProtectableItemsOperations BackupProtectableItems { get; } /// - /// Gets the IBackupProtectionContainersOperations. + /// Gets the IBackupProtectionContainersOperations /// IBackupProtectionContainersOperations BackupProtectionContainers { get; } /// - /// Gets the IDeletedProtectionContainersOperations. + /// Gets the IDeletedProtectionContainersOperations /// IDeletedProtectionContainersOperations DeletedProtectionContainers { get; } /// - /// Gets the ISecurityPINsOperations. + /// Gets the ISecurityPiNsOperations /// - ISecurityPINsOperations SecurityPINs { get; } + ISecurityPiNsOperations SecurityPiNs { get; } /// - /// Gets the IRecoveryPointsRecommendedForMoveOperations. + /// Gets the IRecoveryPointsRecommendedForMoveOperations /// IRecoveryPointsRecommendedForMoveOperations RecoveryPointsRecommendedForMove { get; } /// - /// Gets the IResourceGuardProxiesOperations. + /// Gets the IResourceGuardProxiesOperations /// IResourceGuardProxiesOperations ResourceGuardProxies { get; } /// - /// Gets the IResourceGuardProxyOperations. + /// Gets the IResourceGuardProxyOperations /// IResourceGuardProxyOperations ResourceGuardProxy { get; } /// /// Fetches operation status for data move operation on vault /// + /// + /// Fetches operation status for data move operation on vault + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// The headers that will be added to request. @@ -335,17 +334,25 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// /// The cancellation token. /// - Task> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Prepares source vault for Data Move operation /// + /// + /// Prepares source vault for Data Move operation + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Prepare data move request @@ -356,17 +363,22 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// /// The cancellation token. /// - Task BMSPrepareDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task BMSPrepareDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Triggers Data Move Operation on target vault /// + /// + /// Triggers Data Move Operation on target vault + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Trigger data move request @@ -377,25 +389,34 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// /// The cancellation token. /// - Task BMSTriggerDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task BMSTriggerDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Move recovery point from one datastore to another store. /// + /// + /// Move recovery point from one datastore to another store. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// + /// /// /// + /// /// /// + /// /// /// /// Move Resource Across Tiers Request @@ -406,17 +427,22 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// /// The cancellation token. /// - Task MoveRecoveryPointWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task MoveRecoveryPointWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Prepares source vault for Data Move operation /// + /// + /// Prepares source vault for Data Move operation + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Prepare data move request @@ -427,17 +453,22 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// /// The cancellation token. /// - Task BeginBMSPrepareDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task BeginBMSPrepareDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Triggers Data Move Operation on target vault /// + /// + /// Triggers Data Move Operation on target vault + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Trigger data move request @@ -448,25 +479,34 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// /// The cancellation token. /// - Task BeginBMSTriggerDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task BeginBMSTriggerDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Move recovery point from one datastore to another store. /// + /// + /// Move recovery point from one datastore to another store. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// + /// /// /// + /// /// /// + /// /// /// /// Move Resource Across Tiers Request @@ -477,7 +517,10 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// /// The cancellation token. /// - Task BeginMoveRecoveryPointWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task BeginMoveRecoveryPointWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IResourceGuardProxiesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IResourceGuardProxiesOperations.cs index c9136c39db8e..f1168b1d1a5d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IResourceGuardProxiesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IResourceGuardProxiesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ResourceGuardProxiesOperations operations. @@ -26,12 +16,14 @@ public partial interface IResourceGuardProxiesOperations /// /// List the ResourceGuardProxies under vault /// + /// + /// List the ResourceGuardProxies under vault + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The headers that will be added to request. @@ -45,13 +37,14 @@ public partial interface IResourceGuardProxiesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// List the ResourceGuardProxies under vault /// + /// + /// List the ResourceGuardProxies under vault + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -67,9 +60,7 @@ public partial interface IResourceGuardProxiesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> GetNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> GetNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IResourceGuardProxyOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IResourceGuardProxyOperations.cs index 15110cc68f15..68b944c7f34c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IResourceGuardProxyOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IResourceGuardProxyOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ResourceGuardProxyOperations operations. @@ -24,17 +14,19 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IResourceGuardProxyOperations { /// - /// Returns ResourceGuardProxy under vault and with the name referenced - /// in request + /// Returns ResourceGuardProxy under vault and with the name referenced in request /// + /// + /// Returns ResourceGuardProxy under vault and with the name referenced in request + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// The headers that will be added to request. @@ -48,22 +40,24 @@ public partial interface IResourceGuardProxyOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Add or Update ResourceGuardProxy under vault /// Secures vault critical operations /// + /// + /// Add or Update ResourceGuardProxy under vault + /// Secures vault critical operations + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// Request body for operation @@ -80,21 +74,22 @@ public partial interface IResourceGuardProxyOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, ResourceGuardProxyBaseResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, ResourceGuardProxyBaseResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Delete ResourceGuardProxy under vault /// + /// + /// Delete ResourceGuardProxy under vault + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// The headers that will be added to request. @@ -105,25 +100,28 @@ public partial interface IResourceGuardProxyOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Secures delete ResourceGuardProxy operations. /// + /// + /// Secures delete ResourceGuardProxy operations. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// + /// /// /// + /// /// /// /// The headers that will be added to request. @@ -137,9 +135,7 @@ public partial interface IResourceGuardProxyOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UnlockDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, IList resourceGuardOperationRequests = default(IList), string resourceToBeDeleted = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UnlockDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string resourceToBeDeleted = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRestoresOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRestoresOperations.cs index b28a4e2c03e3..6b2702d7c584 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRestoresOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IRestoresOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// RestoresOperations operations. @@ -24,16 +14,18 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IRestoresOperations { /// - /// Restores the specified backed up data. This is an asynchronous - /// operation. To know the status of this API call, use + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use /// GetProtectedItemOperationResult API. /// + /// + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use + /// GetProtectedItemOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up items. @@ -45,8 +37,7 @@ public partial interface IRestoresOperations /// Backed up item to be restored. /// /// - /// Recovery point ID which represents the backed up data to be - /// restored. + /// Recovery point ID which represents the backed up data to be restored. /// /// /// resource restore request @@ -60,21 +51,21 @@ public partial interface IRestoresOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Restores the specified backed up data. This is an asynchronous - /// operation. To know the status of this API call, use + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use /// GetProtectedItemOperationResult API. /// + /// + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use + /// GetProtectedItemOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up items. @@ -86,8 +77,7 @@ public partial interface IRestoresOperations /// Backed up item to be restored. /// /// - /// Recovery point ID which represents the backed up data to be - /// restored. + /// Recovery point ID which represents the backed up data to be restored. /// /// /// resource restore request @@ -101,9 +91,7 @@ public partial interface IRestoresOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginTriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginTriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ISecurityPINsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ISecurityPINsOperations.cs index 66a54ba927b4..ca280503ec69 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ISecurityPINsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ISecurityPINsOperations.cs @@ -1,37 +1,29 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// SecurityPINsOperations operations. + /// SecurityPiNsOperations operations. /// - public partial interface ISecurityPINsOperations + public partial interface ISecurityPiNsOperations { /// /// Get the security PIN. /// + /// + /// Get the security PIN. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// ResourceGuard Operation Requests @@ -48,9 +40,7 @@ public partial interface ISecurityPINsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, IList resourceGuardOperationRequests = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationOperations.cs index 80c77bb50e78..e4e2b25df4e8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ValidateOperationOperations operations. @@ -24,16 +14,16 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IValidateOperationOperations { /// - /// Validate operation for specified backed up item in the form of an - /// asynchronous operation. Returns tracking headers which can be - /// tracked using GetValidateOperationResult API. + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. /// + /// + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource validate operation request @@ -47,21 +37,19 @@ public partial interface IValidateOperationOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Validate operation for specified backed up item in the form of an - /// asynchronous operation. Returns tracking headers which can be - /// tracked using GetValidateOperationResult API. + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. /// + /// + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource validate operation request @@ -75,9 +63,7 @@ public partial interface IValidateOperationOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginTriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginTriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationResultsOperations.cs index 26b982ac7108..5f4d5c8d0579 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ValidateOperationResultsOperations operations. @@ -26,16 +16,17 @@ public partial interface IValidateOperationResultsOperations /// /// Fetches the result of a triggered validate operation. /// + /// + /// Fetches the result of a triggered validate operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// - /// OperationID which represents the operation whose result needs to be - /// fetched. + /// OperationID which represents the operation whose result needs to be fetched. /// /// /// The headers that will be added to request. @@ -49,9 +40,7 @@ public partial interface IValidateOperationResultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationStatusesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationStatusesOperations.cs index cc157a42ad9b..12b12a6e94f4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationStatusesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/IValidateOperationStatusesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ValidateOperationStatusesOperations operations. @@ -24,23 +14,23 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup public partial interface IValidateOperationStatusesOperations { /// - /// Fetches the status of a triggered validate operation. The status - /// can be in progress, completed - /// or failed. You can refer to the OperationStatus enum for all the - /// possible states of the operation. - /// If operation has completed, this method returns the list of errors - /// obtained while validating the operation. + /// Fetches the status of a triggered validate operation. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. + /// If operation has completed, this method returns the list of errors obtained while validating the operation. /// + /// + /// Fetches the status of a triggered validate operation. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. + /// If operation has completed, this method returns the list of errors obtained while validating the operation. + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// - /// OperationID represents the operation whose status needs to be - /// fetched. + /// OperationID represents the operation whose status needs to be fetched. /// /// /// The headers that will be added to request. @@ -54,9 +44,7 @@ public partial interface IValidateOperationStatusesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ItemLevelRecoveryConnectionsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ItemLevelRecoveryConnectionsOperations.cs index 3d4450b76e3a..a18e808cb156 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ItemLevelRecoveryConnectionsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ItemLevelRecoveryConnectionsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ItemLevelRecoveryConnectionsOperations operations. /// - internal partial class ItemLevelRecoveryConnectionsOperations : IServiceOperations, IItemLevelRecoveryConnectionsOperations + internal partial class ItemLevelRecoveryConnectionsOperations : Microsoft.Rest.IServiceOperations, IItemLevelRecoveryConnectionsOperations { /// /// Initializes a new instance of the ItemLevelRecoveryConnectionsOperations class. @@ -36,13 +24,13 @@ internal partial class ItemLevelRecoveryConnectionsOperations : IServiceOperatio /// /// Thrown when a required parameter is null /// - internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient client) + internal ItemLevelRecoveryConnectionsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,18 +39,15 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli public RecoveryServicesBackupClient Client { get; private set; } /// - /// Provisions a script which invokes an iSCSI connection to the backup data. - /// Executing this script opens a file - /// explorer displaying all the recoverable files and folders. This is an - /// asynchronous operation. To know the status of + /// Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file + /// explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of /// provisioning, call GetProtectedItemOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up items. @@ -74,8 +59,7 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli /// Backed up item name whose files/folders are to be restored. /// /// - /// Recovery point ID which represents backed up data. iSCSI connection will be - /// provisioned + /// Recovery point ID which represents backed up data. iSCSI connection will be provisioned /// for this backed up data. /// /// @@ -87,10 +71,10 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -99,100 +83,116 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli /// /// A response object containing the response body and response headers. /// - public async Task ProvisionWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task ProvisionWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + if (recoveryPointId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPointId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); tracingParameters.Add("recoveryPointId", recoveryPointId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Provision", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Provision", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); _url = _url.Replace("{recoveryPointId}", System.Uri.EscapeDataString(recoveryPointId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -204,61 +204,62 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -268,32 +269,34 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Revokes an iSCSI connection which can be used to download a script. - /// Executing this script opens a file explorer - /// displaying all recoverable files and folders. This is an asynchronous - /// operation. + /// Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer + /// displaying all recoverable files and folders. This is an asynchronous operation. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up items. @@ -305,8 +308,7 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli /// Backed up item name whose files/folders are to be restored. /// /// - /// Recovery point ID which represents backed up data. iSCSI connection will be - /// revoked for + /// Recovery point ID which represents backed up data. iSCSI connection will be revoked for /// this backed up data. /// /// @@ -315,10 +317,10 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -327,95 +329,110 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli /// /// A response object containing the response body and response headers. /// - public async Task RevokeWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task RevokeWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + if (recoveryPointId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPointId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); tracingParameters.Add("recoveryPointId", recoveryPointId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Revoke", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Revoke", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); _url = _url.Replace("{recoveryPointId}", System.Uri.EscapeDataString(recoveryPointId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -427,55 +444,56 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -485,19 +503,24 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ItemLevelRecoveryConnectionsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ItemLevelRecoveryConnectionsOperationsExtensions.cs index c3e25242af48..643c9e905243 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ItemLevelRecoveryConnectionsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ItemLevelRecoveryConnectionsOperationsExtensions.cs @@ -1,179 +1,146 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ItemLevelRecoveryConnectionsOperations. + /// Extension methods for ItemLevelRecoveryConnectionsOperations /// public static partial class ItemLevelRecoveryConnectionsOperationsExtensions { - /// - /// Provisions a script which invokes an iSCSI connection to the backup data. - /// Executing this script opens a file - /// explorer displaying all the recoverable files and folders. This is an - /// asynchronous operation. To know the status of - /// provisioning, call GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up items. - /// - /// - /// Container name associated with the backed up items. - /// - /// - /// Backed up item name whose files/folders are to be restored. - /// - /// - /// Recovery point ID which represents backed up data. iSCSI connection will be - /// provisioned - /// for this backed up data. - /// - /// - /// resource ILR request - /// - public static void Provision(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters) - { - operations.ProvisionAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); - } - - /// - /// Provisions a script which invokes an iSCSI connection to the backup data. - /// Executing this script opens a file - /// explorer displaying all the recoverable files and folders. This is an - /// asynchronous operation. To know the status of - /// provisioning, call GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up items. - /// - /// - /// Container name associated with the backed up items. - /// - /// - /// Backed up item name whose files/folders are to be restored. - /// - /// - /// Recovery point ID which represents backed up data. iSCSI connection will be - /// provisioned - /// for this backed up data. - /// - /// - /// resource ILR request - /// - /// - /// The cancellation token. - /// - public static async Task ProvisionAsync(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ProvisionWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Revokes an iSCSI connection which can be used to download a script. - /// Executing this script opens a file explorer - /// displaying all recoverable files and folders. This is an asynchronous - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up items. - /// - /// - /// Container name associated with the backed up items. - /// - /// - /// Backed up item name whose files/folders are to be restored. - /// - /// - /// Recovery point ID which represents backed up data. iSCSI connection will be - /// revoked for - /// this backed up data. - /// - public static void Revoke(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId) - { - operations.RevokeAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId).GetAwaiter().GetResult(); - } + /// + /// Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file + /// explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of + /// provisioning, call GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up items. + /// + /// + /// Container name associated with the backed up items. + /// + /// + /// Backed up item name whose files/folders are to be restored. + /// + /// + /// Recovery point ID which represents backed up data. iSCSI connection will be provisioned + /// for this backed up data. + /// + public static void Provision(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters) + { + ((IItemLevelRecoveryConnectionsOperations)operations).ProvisionAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); + } - /// - /// Revokes an iSCSI connection which can be used to download a script. - /// Executing this script opens a file explorer - /// displaying all recoverable files and folders. This is an asynchronous - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up items. - /// - /// - /// Container name associated with the backed up items. - /// - /// - /// Backed up item name whose files/folders are to be restored. - /// - /// - /// Recovery point ID which represents backed up data. iSCSI connection will be - /// revoked for - /// this backed up data. - /// - /// - /// The cancellation token. - /// - public static async Task RevokeAsync(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RevokeWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file + /// explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of + /// provisioning, call GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up items. + /// + /// + /// Container name associated with the backed up items. + /// + /// + /// Backed up item name whose files/folders are to be restored. + /// + /// + /// Recovery point ID which represents backed up data. iSCSI connection will be provisioned + /// for this backed up data. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ProvisionAsync(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, ILRRequestResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.ProvisionWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer + /// displaying all recoverable files and folders. This is an asynchronous operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up items. + /// + /// + /// Container name associated with the backed up items. + /// + /// + /// Backed up item name whose files/folders are to be restored. + /// + /// + /// Recovery point ID which represents backed up data. iSCSI connection will be revoked for + /// this backed up data. + /// + public static void Revoke(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId) + { + ((IItemLevelRecoveryConnectionsOperations)operations).RevokeAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId).GetAwaiter().GetResult(); + } + /// + /// Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer + /// displaying all recoverable files and folders. This is an asynchronous operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up items. + /// + /// + /// Container name associated with the backed up items. + /// + /// + /// Backed up item name whose files/folders are to be restored. + /// + /// + /// Recovery point ID which represents backed up data. iSCSI connection will be revoked for + /// this backed up data. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RevokeAsync(this IItemLevelRecoveryConnectionsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.RevokeWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobCancellationsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobCancellationsOperations.cs index d0860d8c4e8e..7ca3a9a460a6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobCancellationsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobCancellationsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// JobCancellationsOperations operations. /// - internal partial class JobCancellationsOperations : IServiceOperations, IJobCancellationsOperations + internal partial class JobCancellationsOperations : Microsoft.Rest.IServiceOperations, IJobCancellationsOperations { /// /// Initializes a new instance of the JobCancellationsOperations class. @@ -36,13 +24,13 @@ internal partial class JobCancellationsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal JobCancellationsOperations(RecoveryServicesBackupClient client) + internal JobCancellationsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,16 +39,14 @@ internal JobCancellationsOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Cancels a job. This is an asynchronous operation. To know the status of the - /// cancellation, call + /// Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call /// GetCancelOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the job to cancel. @@ -71,10 +57,10 @@ internal JobCancellationsOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -83,77 +69,89 @@ internal JobCancellationsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (jobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "jobName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Trigger", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Trigger", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -165,55 +163,56 @@ internal JobCancellationsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -223,19 +222,24 @@ internal JobCancellationsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobCancellationsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobCancellationsOperationsExtensions.cs index b7f48e152ea6..e24c2795a01b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobCancellationsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobCancellationsOperationsExtensions.cs @@ -1,74 +1,60 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for JobCancellationsOperations. + /// Extension methods for JobCancellationsOperations /// public static partial class JobCancellationsOperationsExtensions { - /// - /// Cancels a job. This is an asynchronous operation. To know the status of the - /// cancellation, call - /// GetCancelOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the job to cancel. - /// - public static void Trigger(this IJobCancellationsOperations operations, string vaultName, string resourceGroupName, string jobName) - { - operations.TriggerAsync(vaultName, resourceGroupName, jobName).GetAwaiter().GetResult(); - } - - /// - /// Cancels a job. This is an asynchronous operation. To know the status of the - /// cancellation, call - /// GetCancelOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the job to cancel. - /// - /// - /// The cancellation token. - /// - public static async Task TriggerAsync(this IJobCancellationsOperations operations, string vaultName, string resourceGroupName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.TriggerWithHttpMessagesAsync(vaultName, resourceGroupName, jobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call + /// GetCancelOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the job to cancel. + /// + public static void Trigger(this IJobCancellationsOperations operations, string vaultName, string resourceGroupName, string jobName) + { + ((IJobCancellationsOperations)operations).TriggerAsync(vaultName, resourceGroupName, jobName).GetAwaiter().GetResult(); + } + /// + /// Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call + /// GetCancelOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the job to cancel. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TriggerAsync(this IJobCancellationsOperations operations, string vaultName, string resourceGroupName, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.TriggerWithHttpMessagesAsync(vaultName, resourceGroupName, jobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobDetailsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobDetailsOperations.cs index 04b62e89ef0d..02706b996501 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobDetailsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobDetailsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// JobDetailsOperations operations. /// - internal partial class JobDetailsOperations : IServiceOperations, IJobDetailsOperations + internal partial class JobDetailsOperations : Microsoft.Rest.IServiceOperations, IJobDetailsOperations { /// /// Initializes a new instance of the JobDetailsOperations class. @@ -36,13 +24,13 @@ internal partial class JobDetailsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal JobDetailsOperations(RecoveryServicesBackupClient client) + internal JobDetailsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal JobDetailsOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the job whose details are to be fetched. @@ -69,13 +56,13 @@ internal JobDetailsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -84,77 +71,89 @@ internal JobDetailsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (jobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "jobName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -166,55 +165,56 @@ internal JobDetailsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -224,9 +224,10 @@ internal JobDetailsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -237,24 +238,28 @@ internal JobDetailsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobDetailsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobDetailsOperationsExtensions.cs index 37c20f7309c6..1ea0d1a9f29b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobDetailsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobDetailsOperationsExtensions.cs @@ -1,73 +1,61 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for JobDetailsOperations. + /// Extension methods for JobDetailsOperations /// public static partial class JobDetailsOperationsExtensions { - /// - /// Gets extended information associated with the job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the job whose details are to be fetched. - /// - public static JobResource Get(this IJobDetailsOperations operations, string vaultName, string resourceGroupName, string jobName) - { - return operations.GetAsync(vaultName, resourceGroupName, jobName).GetAwaiter().GetResult(); - } + /// + /// Gets extended information associated with the job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the job whose details are to be fetched. + /// + public static JobResource Get(this IJobDetailsOperations operations, string vaultName, string resourceGroupName, string jobName) + { + return ((IJobDetailsOperations)operations).GetAsync(vaultName, resourceGroupName, jobName).GetAwaiter().GetResult(); + } - /// - /// Gets extended information associated with the job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the job whose details are to be fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IJobDetailsOperations operations, string vaultName, string resourceGroupName, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets extended information associated with the job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the job whose details are to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IJobDetailsOperations operations, string vaultName, string resourceGroupName, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, jobName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, jobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobOperationResultsOperations.cs index bb11e13d4d4e..5bca8cd20602 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobOperationResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// JobOperationResultsOperations operations. /// - internal partial class JobOperationResultsOperations : IServiceOperations, IJobOperationResultsOperations + internal partial class JobOperationResultsOperations : Microsoft.Rest.IServiceOperations, IJobOperationResultsOperations { /// /// Initializes a new instance of the JobOperationResultsOperations class. @@ -36,13 +24,13 @@ internal partial class JobOperationResultsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal JobOperationResultsOperations(RecoveryServicesBackupClient client) + internal JobOperationResultsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal JobOperationResultsOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Job name whose operation result has to be fetched. @@ -72,10 +59,10 @@ internal JobOperationResultsOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -84,83 +71,96 @@ internal JobOperationResultsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string jobName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (jobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "jobName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -172,55 +172,56 @@ internal JobOperationResultsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -230,19 +231,24 @@ internal JobOperationResultsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobOperationResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobOperationResultsOperationsExtensions.cs index 21da091c2a80..0b6078deb356 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobOperationResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobOperationResultsOperationsExtensions.cs @@ -1,76 +1,64 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for JobOperationResultsOperations. + /// Extension methods for JobOperationResultsOperations /// public static partial class JobOperationResultsOperationsExtensions { - /// - /// Fetches the result of any operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Job name whose operation result has to be fetched. - /// - /// - /// OperationID which represents the operation whose result has to be fetched. - /// - public static void Get(this IJobOperationResultsOperations operations, string vaultName, string resourceGroupName, string jobName, string operationId) - { - operations.GetAsync(vaultName, resourceGroupName, jobName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Fetches the result of any operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Job name whose operation result has to be fetched. - /// - /// - /// OperationID which represents the operation whose result has to be fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IJobOperationResultsOperations operations, string vaultName, string resourceGroupName, string jobName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, jobName, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Fetches the result of any operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Job name whose operation result has to be fetched. + /// + /// + /// OperationID which represents the operation whose result has to be fetched. + /// + public static void Get(this IJobOperationResultsOperations operations, string vaultName, string resourceGroupName, string jobName, string operationId) + { + ((IJobOperationResultsOperations)operations).GetAsync(vaultName, resourceGroupName, jobName, operationId).GetAwaiter().GetResult(); + } + /// + /// Fetches the result of any operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Job name whose operation result has to be fetched. + /// + /// + /// OperationID which represents the operation whose result has to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IJobOperationResultsOperations operations, string vaultName, string resourceGroupName, string jobName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, jobName, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobsOperations.cs index 5fb8984b9e4d..5270fedfa954 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// JobsOperations operations. /// - internal partial class JobsOperations : IServiceOperations, IJobsOperations + internal partial class JobsOperations : Microsoft.Rest.IServiceOperations, IJobsOperations { /// /// Initializes a new instance of the JobsOperations class. @@ -37,13 +24,13 @@ internal partial class JobsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal JobsOperations(RecoveryServicesBackupClient client) + internal JobsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,18 +39,16 @@ internal JobsOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Triggers export of jobs specified by filters and returns an OperationID to - /// track. + /// Triggers export of jobs specified by filters and returns an OperationID to track. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. + /// The name of the resource group where the recovery services vault is present. /// /// /// Headers that will be added to request. @@ -71,10 +56,10 @@ internal JobsOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -83,80 +68,92 @@ internal JobsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task ExportWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task ExportWithHttpMessagesAsync(string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Export", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Export", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _jobQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_jobQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_jobQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -168,55 +165,56 @@ internal JobsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -226,19 +224,24 @@ internal JobsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobsOperationsExtensions.cs index 4c558e364303..d2e20f1bd109 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/JobsOperationsExtensions.cs @@ -1,73 +1,58 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for JobsOperations. + /// Extension methods for JobsOperations /// public static partial class JobsOperationsExtensions { - /// - /// Triggers export of jobs specified by filters and returns an OperationID to - /// track. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - public static void Export(this IJobsOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery)) - { - operations.ExportAsync(vaultName, resourceGroupName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Triggers export of jobs specified by filters and returns an OperationID to - /// track. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task ExportAsync(this IJobsOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ExportWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Triggers export of jobs specified by filters and returns an OperationID to track. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void Export(this IJobsOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + ((IJobsOperations)operations).ExportAsync(vaultName, resourceGroupName, odataQuery).GetAwaiter().GetResult(); + } + /// + /// Triggers export of jobs specified by filters and returns an OperationID to track. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportAsync(this IJobsOperations operations, string vaultName, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.ExportWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AcquireStorageAccountLock.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AcquireStorageAccountLock.cs index 3f7b3c2b8aff..68665ace32ee 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AcquireStorageAccountLock.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AcquireStorageAccountLock.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for AcquireStorageAccountLock. /// + + public static class AcquireStorageAccountLock { public const string Acquire = "Acquire"; public const string NotAcquire = "NotAcquire"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupGoalFeatureSupportRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupGoalFeatureSupportRequest.cs index 86cca3ce5398..54e61716073b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupGoalFeatureSupportRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupGoalFeatureSupportRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureBackupGoalFeatureSupportRequest : FeatureSupportRequest { /// - /// Initializes a new instance of the - /// AzureBackupGoalFeatureSupportRequest class. + /// Initializes a new instance of the AzureBackupGoalFeatureSupportRequest class. /// public AzureBackupGoalFeatureSupportRequest() { @@ -35,4 +28,4 @@ public AzureBackupGoalFeatureSupportRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupServerContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupServerContainer.cs index c60f05f69574..513bc18dbb54 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupServerContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupServerContainer.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,32 +24,50 @@ public AzureBackupServerContainer() /// /// Initializes a new instance of the AzureBackupServerContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// Specifies whether the container is - /// re-registrable. - /// ID of container. - /// Number of protected items in the - /// BackupEngine - /// Backup engine Agent version - /// List of BackupEngines protecting the - /// container - /// To check if upgrade - /// available - /// Protection status of the - /// container. - /// Extended Info of the container. - public AzureBackupServerContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), bool? canReRegister = default(bool?), string containerId = default(string), long? protectedItemCount = default(long?), string dpmAgentVersion = default(string), IList dpmServers = default(IList), bool? upgradeAvailable = default(bool?), string protectionStatus = default(string), DPMContainerExtendedInfo extendedInfo = default(DPMContainerExtendedInfo)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, canReRegister, containerId, protectedItemCount, dpmAgentVersion, dpmServers, upgradeAvailable, protectionStatus, extendedInfo) + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// Specifies whether the container is re-registrable. + /// + + /// ID of container. + /// + + /// Number of protected items in the BackupEngine + /// + + /// Backup engine Agent version + /// + + /// List of BackupEngines protecting the container + /// + + /// To check if upgrade available + /// + + /// Protection status of the container. + /// + + /// Extended Info of the container. + /// + public AzureBackupServerContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), bool? canReRegister = default(bool?), string containerId = default(string), long? protectedItemCount = default(long?), string dpmAgentVersion = default(string), System.Collections.Generic.IList dpmServers = default(System.Collections.Generic.IList), bool? upgradeAvailable = default(bool?), string protectionStatus = default(string), DPMContainerExtendedInfo extendedInfo = default(DPMContainerExtendedInfo)) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, canReRegister, containerId, protectedItemCount, dpmAgentVersion, dpmServers, upgradeAvailable, protectionStatus, extendedInfo) { CustomInit(); } @@ -68,4 +78,4 @@ public AzureBackupServerContainer() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupServerEngine.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupServerEngine.cs index bbc7ccd3560c..31037fdb57ac 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupServerEngine.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureBackupServerEngine.cs @@ -1,21 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Backup engine type when Azure Backup Server is used to manage the - /// backups. + /// Backup engine type when Azure Backup Server is used to manage the backups. /// [Newtonsoft.Json.JsonObject("AzureBackupServerEngine")] public partial class AzureBackupServerEngine : BackupEngineBase @@ -31,32 +24,49 @@ public AzureBackupServerEngine() /// /// Initializes a new instance of the AzureBackupServerEngine class. /// - /// Friendly name of the backup - /// engine. - /// Type of backup management for - /// the backup engine. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// Registration status of the backup - /// engine with the Recovery Services Vault. - /// Status of the backup engine with - /// the Recovery Services Vault. = - /// {Active/Deleting/DeleteFailed} - /// Backup status of the backup - /// engine. - /// Flag indicating if the backup engine be - /// registered, once already registered. - /// ID of the backup engine. - /// Backup engine version - /// Backup agent version - /// To check if backup - /// agent upgrade available - /// To check if backup engine - /// upgrade available - /// Extended info of the - /// backupengine + + /// Friendly name of the backup engine. + /// + + /// Type of backup management for the backup engine. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Registration status of the backup engine with the Recovery Services Vault. + /// + + /// Status of the backup engine with the Recovery Services Vault. = + /// {Active/Deleting/DeleteFailed} + /// + + /// Backup status of the backup engine. + /// + + /// Flag indicating if the backup engine be registered, once already + /// registered. + /// + + /// ID of the backup engine. + /// + + /// Backup engine version + /// + + /// Backup agent version + /// + + /// To check if backup agent upgrade available + /// + + /// To check if backup engine upgrade available + /// + + /// Extended info of the backupengine + /// public AzureBackupServerEngine(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string backupEngineState = default(string), string healthStatus = default(string), bool? canReRegister = default(bool?), string backupEngineId = default(string), string dpmVersion = default(string), string azureBackupAgentVersion = default(string), bool? isAzureBackupAgentUpgradeAvailable = default(bool?), bool? isDpmUpgradeAvailable = default(bool?), BackupEngineExtendedInfo extendedInfo = default(BackupEngineExtendedInfo)) - : base(friendlyName, backupManagementType, registrationStatus, backupEngineState, healthStatus, canReRegister, backupEngineId, dpmVersion, azureBackupAgentVersion, isAzureBackupAgentUpgradeAvailable, isDpmUpgradeAvailable, extendedInfo) + + : base(friendlyName, backupManagementType, registrationStatus, backupEngineState, healthStatus, canReRegister, backupEngineId, dpmVersion, azureBackupAgentVersion, isAzureBackupAgentUpgradeAvailable, isDpmUpgradeAvailable, extendedInfo) { CustomInit(); } @@ -67,4 +77,4 @@ public AzureBackupServerEngine() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareBackupRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareBackupRequest.cs index c8406dd491f9..d45374c92915 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareBackupRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareBackupRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureFileShareBackupRequest : BackupRequest { /// - /// Initializes a new instance of the AzureFileShareBackupRequest - /// class. + /// Initializes a new instance of the AzureFileShareBackupRequest class. /// public AzureFileShareBackupRequest() { @@ -29,14 +22,15 @@ public AzureFileShareBackupRequest() } /// - /// Initializes a new instance of the AzureFileShareBackupRequest - /// class. + /// Initializes a new instance of the AzureFileShareBackupRequest class. /// - /// Backup copy will expire - /// after the time specified (UTC). - public AzureFileShareBackupRequest(System.DateTime? recoveryPointExpiryTimeInUTC = default(System.DateTime?)) + + /// Backup copy will expire after the time specified (UTC). + /// + public AzureFileShareBackupRequest(System.DateTime? recoveryPointExpiryTimeInUtc = default(System.DateTime?)) + { - RecoveryPointExpiryTimeInUTC = recoveryPointExpiryTimeInUTC; + this.RecoveryPointExpiryTimeInUtc = recoveryPointExpiryTimeInUtc; CustomInit(); } @@ -45,12 +39,11 @@ public AzureFileShareBackupRequest() /// partial void CustomInit(); + /// - /// Gets or sets backup copy will expire after the time specified - /// (UTC). + /// Gets or sets backup copy will expire after the time specified (UTC). /// - [JsonProperty(PropertyName = "recoveryPointExpiryTimeInUTC")] - public System.DateTime? RecoveryPointExpiryTimeInUTC { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointExpiryTimeInUTC")] + public System.DateTime? RecoveryPointExpiryTimeInUtc {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProtectableItem.cs index 3711ae672073..0671d8bf7f74 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProtectableItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureFileShareProtectableItem : WorkloadProtectableItem { /// - /// Initializes a new instance of the AzureFileShareProtectableItem - /// class. + /// Initializes a new instance of the AzureFileShareProtectableItem class. /// public AzureFileShareProtectableItem() { @@ -29,31 +22,38 @@ public AzureFileShareProtectableItem() } /// - /// Initializes a new instance of the AzureFileShareProtectableItem - /// class. + /// Initializes a new instance of the AzureFileShareProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Full Fabric ID of container - /// to which this protectable item belongs. For example, ARM - /// ID. - /// Friendly name of - /// container to which this protectable item belongs. + + /// Full Fabric ID of container to which this protectable item belongs. For + /// example, ARM ID. + /// + + /// Friendly name of container to which this protectable item belongs. + /// + /// File Share type XSync or XSMB. /// Possible values include: 'Invalid', 'XSMB', 'XSync' public AzureFileShareProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentContainerFabricId = default(string), string parentContainerFriendlyName = default(string), string azureFileShareType = default(string)) - : base(backupManagementType, workloadType, friendlyName, protectionState) + + : base(backupManagementType, workloadType, friendlyName, protectionState) { - ParentContainerFabricId = parentContainerFabricId; - ParentContainerFriendlyName = parentContainerFriendlyName; - AzureFileShareType = azureFileShareType; + this.ParentContainerFabricId = parentContainerFabricId; + this.ParentContainerFriendlyName = parentContainerFriendlyName; + this.AzureFileShareType = azureFileShareType; CustomInit(); } @@ -62,26 +62,25 @@ public AzureFileShareProtectableItem() /// partial void CustomInit(); + /// - /// Gets or sets full Fabric ID of container to which this protectable - /// item belongs. For example, ARM ID. + /// Gets or sets full Fabric ID of container to which this protectable item + /// belongs. For example, ARM ID. /// - [JsonProperty(PropertyName = "parentContainerFabricId")] - public string ParentContainerFabricId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentContainerFabricId")] + public string ParentContainerFabricId {get; set; } /// - /// Gets or sets friendly name of container to which this protectable - /// item belongs. + /// Gets or sets friendly name of container to which this protectable item + /// belongs. /// - [JsonProperty(PropertyName = "parentContainerFriendlyName")] - public string ParentContainerFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentContainerFriendlyName")] + public string ParentContainerFriendlyName {get; set; } /// - /// Gets or sets file Share type XSync or XSMB. Possible values - /// include: 'Invalid', 'XSMB', 'XSync' + /// Gets or sets file Share type XSync or XSMB. Possible values include: 'Invalid', 'XSMB', 'XSync' /// - [JsonProperty(PropertyName = "azureFileShareType")] - public string AzureFileShareType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "azureFileShareType")] + public string AzureFileShareType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProtectionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProtectionPolicy.cs index f107e2e14be6..f1e4df8b209c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProtectionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProtectionPolicy.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureFileShareProtectionPolicy : ProtectionPolicy { /// - /// Initializes a new instance of the AzureFileShareProtectionPolicy - /// class. + /// Initializes a new instance of the AzureFileShareProtectionPolicy class. /// public AzureFileShareProtectionPolicy() { @@ -31,32 +22,38 @@ public AzureFileShareProtectionPolicy() } /// - /// Initializes a new instance of the AzureFileShareProtectionPolicy - /// class. + /// Initializes a new instance of the AzureFileShareProtectionPolicy class. /// - /// Number of items associated with - /// this policy. - /// ResourceGuard - /// Operation Requests - /// Type of workload for the backup - /// management. Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Backup schedule specified as part of - /// backup policy. - /// Retention policy with the details on - /// backup copy retention ranges. - /// TimeZone optional input as string. For - /// example: TimeZone = "Pacific Standard Time". - public AzureFileShareProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), string workLoadType = default(string), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), string timeZone = default(string)) - : base(protectedItemsCount, resourceGuardOperationRequests) + + /// Number of items associated with this policy. + /// + + /// ResourceGuard Operation Requests + /// + + /// Type of workload for the backup management + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Backup schedule specified as part of backup policy. + /// + + /// Retention policy with the details on backup copy retention ranges. + /// + + /// TimeZone optional input as string. For example: TimeZone = "Pacific + /// Standard Time". + /// + public AzureFileShareProtectionPolicy(int? protectedItemsCount = default(int?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string workLoadType = default(string), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), string timeZone = default(string)) + + : base(protectedItemsCount, resourceGuardOperationRequests) { - WorkLoadType = workLoadType; - SchedulePolicy = schedulePolicy; - RetentionPolicy = retentionPolicy; - TimeZone = timeZone; + this.WorkLoadType = workLoadType; + this.SchedulePolicy = schedulePolicy; + this.RetentionPolicy = retentionPolicy; + this.TimeZone = timeZone; CustomInit(); } @@ -65,35 +62,31 @@ public AzureFileShareProtectionPolicy() /// partial void CustomInit(); + /// - /// Gets or sets type of workload for the backup management. Possible - /// values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', - /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', - /// 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets or sets type of workload for the backup management Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workLoadType")] - public string WorkLoadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workLoadType")] + public string WorkLoadType {get; set; } /// /// Gets or sets backup schedule specified as part of backup policy. /// - [JsonProperty(PropertyName = "schedulePolicy")] - public SchedulePolicy SchedulePolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "schedulePolicy")] + public SchedulePolicy SchedulePolicy {get; set; } /// - /// Gets or sets retention policy with the details on backup copy - /// retention ranges. + /// Gets or sets retention policy with the details on backup copy retention + /// ranges. /// - [JsonProperty(PropertyName = "retentionPolicy")] - public RetentionPolicy RetentionPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionPolicy")] + public RetentionPolicy RetentionPolicy {get; set; } /// - /// Gets or sets timeZone optional input as string. For example: - /// TimeZone = "Pacific Standard Time". + /// Gets or sets timeZone optional input as string. For example: TimeZone = + /// "Pacific Standard Time". /// - [JsonProperty(PropertyName = "timeZone")] - public string TimeZone { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "timeZone")] + public string TimeZone {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProvisionILRRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProvisionILRRequest.cs index de6622cba79d..5fe3dcf2cc14 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProvisionILRRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareProvisionILRRequest.cs @@ -1,28 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Update snapshot Uri with the correct friendly Name of the source Azure - /// file share. + /// Update snapshot Uri with the correct friendly Name of the source Azure file + /// share. /// [Newtonsoft.Json.JsonObject("AzureFileShareProvisionILRRequest")] public partial class AzureFileShareProvisionILRRequest : ILRRequest { /// - /// Initializes a new instance of the AzureFileShareProvisionILRRequest - /// class. + /// Initializes a new instance of the AzureFileShareProvisionILRRequest class. /// public AzureFileShareProvisionILRRequest() { @@ -30,16 +23,19 @@ public AzureFileShareProvisionILRRequest() } /// - /// Initializes a new instance of the AzureFileShareProvisionILRRequest - /// class. + /// Initializes a new instance of the AzureFileShareProvisionILRRequest class. /// - /// Recovery point ID. - /// Source Storage account ARM - /// Id + + /// Recovery point ID. + /// + + /// Source Storage account ARM Id + /// public AzureFileShareProvisionILRRequest(string recoveryPointId = default(string), string sourceResourceId = default(string)) + { - RecoveryPointId = recoveryPointId; - SourceResourceId = sourceResourceId; + this.RecoveryPointId = recoveryPointId; + this.SourceResourceId = sourceResourceId; CustomInit(); } @@ -48,17 +44,17 @@ public AzureFileShareProvisionILRRequest() /// partial void CustomInit(); + /// /// Gets or sets recovery point ID. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// /// Gets or sets source Storage account ARM Id /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareRecoveryPoint.cs index ef91e66dc2e4..51a43a6a288e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareRecoveryPoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureFileShareRecoveryPoint : RecoveryPoint { /// - /// Initializes a new instance of the AzureFileShareRecoveryPoint - /// class. + /// Initializes a new instance of the AzureFileShareRecoveryPoint class. /// public AzureFileShareRecoveryPoint() { @@ -29,26 +22,32 @@ public AzureFileShareRecoveryPoint() } /// - /// Initializes a new instance of the AzureFileShareRecoveryPoint - /// class. + /// Initializes a new instance of the AzureFileShareRecoveryPoint class. /// - /// Type of the backup copy. Specifies - /// whether it is a crash consistent backup or app consistent. - /// Time at which this backup copy was - /// created. - /// Contains Url to the snapshot of - /// fileshare, if applicable - /// Contains recovery point - /// size - /// Properties of Recovery - /// Point - public AzureFileShareRecoveryPoint(string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string fileShareSnapshotUri = default(string), int? recoveryPointSizeInGB = default(int?), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties)) + + /// Type of the backup copy. Specifies whether it is a crash consistent backup + /// or app consistent. + /// + + /// Time at which this backup copy was created. + /// + + /// Contains Url to the snapshot of fileshare, if applicable + /// + + /// Contains recovery point size + /// + + /// Properties of Recovery Point + /// + public AzureFileShareRecoveryPoint(string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string fileShareSnapshotUri = default(string), int? recoveryPointSizeInGb = default(int?), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties)) + { - RecoveryPointType = recoveryPointType; - RecoveryPointTime = recoveryPointTime; - FileShareSnapshotUri = fileShareSnapshotUri; - RecoveryPointSizeInGB = recoveryPointSizeInGB; - RecoveryPointProperties = recoveryPointProperties; + this.RecoveryPointType = recoveryPointType; + this.RecoveryPointTime = recoveryPointTime; + this.FileShareSnapshotUri = fileShareSnapshotUri; + this.RecoveryPointSizeInGb = recoveryPointSizeInGb; + this.RecoveryPointProperties = recoveryPointProperties; CustomInit(); } @@ -57,37 +56,36 @@ public AzureFileShareRecoveryPoint() /// partial void CustomInit(); + /// - /// Gets or sets type of the backup copy. Specifies whether it is a - /// crash consistent backup or app consistent. + /// Gets or sets type of the backup copy. Specifies whether it is a crash + /// consistent backup or app consistent. /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// /// Gets or sets time at which this backup copy was created. /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public System.DateTime? RecoveryPointTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime {get; set; } /// - /// Gets or sets contains Url to the snapshot of fileshare, if - /// applicable + /// Gets or sets contains Url to the snapshot of fileshare, if applicable /// - [JsonProperty(PropertyName = "fileShareSnapshotUri")] - public string FileShareSnapshotUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fileShareSnapshotUri")] + public string FileShareSnapshotUri {get; set; } /// /// Gets or sets contains recovery point size /// - [JsonProperty(PropertyName = "recoveryPointSizeInGB")] - public int? RecoveryPointSizeInGB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointSizeInGB")] + public int? RecoveryPointSizeInGb {get; set; } /// /// Gets or sets properties of Recovery Point /// - [JsonProperty(PropertyName = "recoveryPointProperties")] - public RecoveryPointProperties RecoveryPointProperties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointProperties")] + public RecoveryPointProperties RecoveryPointProperties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareRestoreRequest.cs index 52c1d9dc7af9..4fb54ec3e193 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureFileShareRestoreRequest : RestoreRequest { /// - /// Initializes a new instance of the AzureFileShareRestoreRequest - /// class. + /// Initializes a new instance of the AzureFileShareRestoreRequest class. /// public AzureFileShareRestoreRequest() { @@ -31,31 +22,38 @@ public AzureFileShareRestoreRequest() } /// - /// Initializes a new instance of the AzureFileShareRestoreRequest - /// class. + /// Initializes a new instance of the AzureFileShareRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Source storage account ARM - /// Id + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Source storage account ARM Id + /// + /// Options to resolve copy conflicts. - /// Possible values include: 'Invalid', 'CreateCopy', 'Skip', - /// 'Overwrite', 'FailOnConflict' - /// Restore Type (FullShareRestore or - /// ItemLevelRestore). Possible values include: 'Invalid', - /// 'FullShareRestore', 'ItemLevelRestore' - /// List of Source Files/Folders(which - /// need to recover) and TargetFolderPath details - /// Target File Share Details - public AzureFileShareRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), string copyOptions = default(string), string restoreRequestType = default(string), IList restoreFileSpecs = default(IList), TargetAFSRestoreInfo targetDetails = default(TargetAFSRestoreInfo)) + /// Possible values include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', + /// 'FailOnConflict' + + /// Restore Type (FullShareRestore or ItemLevelRestore) + /// Possible values include: 'Invalid', 'FullShareRestore', 'ItemLevelRestore' + + /// List of Source Files/Folders(which need to recover) and TargetFolderPath + /// details + /// + + /// Target File Share Details + /// + public AzureFileShareRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), string copyOptions = default(string), string restoreRequestType = default(string), System.Collections.Generic.IList restoreFileSpecs = default(System.Collections.Generic.IList), TargetAFSRestoreInfo targetDetails = default(TargetAFSRestoreInfo)) + { - RecoveryType = recoveryType; - SourceResourceId = sourceResourceId; - CopyOptions = copyOptions; - RestoreRequestType = restoreRequestType; - RestoreFileSpecs = restoreFileSpecs; - TargetDetails = targetDetails; + this.RecoveryType = recoveryType; + this.SourceResourceId = sourceResourceId; + this.CopyOptions = copyOptions; + this.RestoreRequestType = restoreRequestType; + this.RestoreFileSpecs = restoreFileSpecs; + this.TargetDetails = targetDetails; CustomInit(); } @@ -64,48 +62,42 @@ public AzureFileShareRestoreRequest() /// partial void CustomInit(); + /// - /// Gets or sets type of this recovery. Possible values include: - /// 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', - /// 'Offline' + /// Gets or sets type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', 'Offline' /// - [JsonProperty(PropertyName = "recoveryType")] - public string RecoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryType")] + public string RecoveryType {get; set; } /// /// Gets or sets source storage account ARM Id /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// - /// Gets or sets options to resolve copy conflicts. Possible values - /// include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', - /// 'FailOnConflict' + /// Gets or sets options to resolve copy conflicts. Possible values include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite', 'FailOnConflict' /// - [JsonProperty(PropertyName = "copyOptions")] - public string CopyOptions { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "copyOptions")] + public string CopyOptions {get; set; } /// - /// Gets or sets restore Type (FullShareRestore or ItemLevelRestore). - /// Possible values include: 'Invalid', 'FullShareRestore', - /// 'ItemLevelRestore' + /// Gets or sets restore Type (FullShareRestore or ItemLevelRestore) Possible values include: 'Invalid', 'FullShareRestore', 'ItemLevelRestore' /// - [JsonProperty(PropertyName = "restoreRequestType")] - public string RestoreRequestType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreRequestType")] + public string RestoreRequestType {get; set; } /// - /// Gets or sets list of Source Files/Folders(which need to recover) - /// and TargetFolderPath details + /// Gets or sets list of Source Files/Folders(which need to recover) and + /// TargetFolderPath details /// - [JsonProperty(PropertyName = "restoreFileSpecs")] - public IList RestoreFileSpecs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreFileSpecs")] + public System.Collections.Generic.IList RestoreFileSpecs {get; set; } /// /// Gets or sets target File Share Details /// - [JsonProperty(PropertyName = "targetDetails")] - public TargetAFSRestoreInfo TargetDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDetails")] + public TargetAFSRestoreInfo TargetDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareType.cs index 7ac97297a1d5..d669b1d0fb89 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileShareType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for AzureFileShareType. /// + + public static class AzureFileShareType { public const string Invalid = "Invalid"; - public const string XSMB = "XSMB"; + public const string Xsmb = "XSMB"; public const string XSync = "XSync"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileshareProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileshareProtectedItem.cs index 107838d78d53..2993ced9f15e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileshareProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileshareProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureFileshareProtectedItem : ProtectedItem { /// - /// Initializes a new instance of the AzureFileshareProtectedItem - /// class. + /// Initializes a new instance of the AzureFileshareProtectedItem class. /// public AzureFileshareProtectedItem() { @@ -31,75 +22,101 @@ public AzureFileshareProtectedItem() } /// - /// Initializes a new instance of the AzureFileshareProtectedItem - /// class. + /// Initializes a new instance of the AzureFileshareProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the fileshare - /// represented by this backup item. - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the fileshare represented by this backup item. + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. - /// Timestamp of the last backup operation - /// on this backup item. - /// Health details of different KPIs - /// Additional information with this backup - /// item. - public AzureFileshareProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), IDictionary kpisHealths = default(IDictionary), AzureFileshareProtectedItemExtendedInfo extendedInfo = default(AzureFileshareProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Health details of different KPIs + /// + + /// Additional information with this backup item. + /// + public AzureFileshareProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary), AzureFileshareProtectedItemExtendedInfo extendedInfo = default(AzureFileshareProtectedItemExtendedInfo)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) { - FriendlyName = friendlyName; - ProtectionStatus = protectionStatus; - ProtectionState = protectionState; - LastBackupStatus = lastBackupStatus; - LastBackupTime = lastBackupTime; - KpisHealths = kpisHealths; - ExtendedInfo = extendedInfo; + this.FriendlyName = friendlyName; + this.ProtectionStatus = protectionStatus; + this.ProtectionState = protectionState; + this.LastBackupStatus = lastBackupStatus; + this.LastBackupTime = lastBackupTime; + this.KpisHealths = kpisHealths; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -108,52 +125,49 @@ public AzureFileshareProtectedItem() /// partial void CustomInit(); + /// - /// Gets or sets friendly name of the fileshare represented by this - /// backup item. + /// Gets or sets friendly name of the fileshare represented by this backup + /// item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets backup status of this backup item. /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; set; } /// - /// Gets or sets backup state of this backup item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' + /// Gets or sets backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// - /// Gets or sets last backup operation status. Possible values: - /// Healthy, Unhealthy. + /// Gets or sets last backup operation status. Possible values: Healthy, + /// Unhealthy. /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// - /// Gets or sets timestamp of the last backup operation on this backup - /// item. + /// Gets or sets timestamp of the last backup operation on this backup item. /// - [JsonProperty(PropertyName = "lastBackupTime")] - public System.DateTime? LastBackupTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupTime")] + public System.DateTime? LastBackupTime {get; set; } /// /// Gets or sets health details of different KPIs /// - [JsonProperty(PropertyName = "kpisHealths")] - public IDictionary KpisHealths { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kpisHealths")] + public System.Collections.Generic.IDictionary KpisHealths {get; set; } /// /// Gets or sets additional information with this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureFileshareProtectedItemExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureFileshareProtectedItemExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileshareProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileshareProtectedItemExtendedInfo.cs index 677953657036..47c7a435a4d0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileshareProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureFileshareProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureFileshareProtectedItemExtendedInfo { /// - /// Initializes a new instance of the - /// AzureFileshareProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureFileshareProtectedItemExtendedInfo class. /// public AzureFileshareProtectedItemExtendedInfo() { @@ -28,27 +21,33 @@ public AzureFileshareProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the - /// AzureFileshareProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureFileshareProtectedItemExtendedInfo class. /// - /// The oldest backup copy available - /// for this item in the service. - /// Number of available backup copies - /// associated with this backup item. - /// Indicates consistency of policy object - /// and policy applied to this backup item. - /// Indicates the state of this resource. - /// Possible values are from enum ResourceState {Invalid, Active, - /// SoftDeleted, Deleted} - /// The resource state sync time - /// for this backup item. + + /// The oldest backup copy available for this item in the service. + /// + + /// Number of available backup copies associated with this backup item. + /// + + /// Indicates consistency of policy object and policy applied to this backup + /// item. + /// + + /// Indicates the state of this resource. Possible values are from enum + /// ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// + + /// The resource state sync time for this backup item. + /// public AzureFileshareProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), string policyState = default(string), string resourceState = default(string), System.DateTime? resourceStateSyncTime = default(System.DateTime?)) + { - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; - PolicyState = policyState; - ResourceState = resourceState; - ResourceStateSyncTime = resourceStateSyncTime; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; + this.PolicyState = policyState; + this.ResourceState = resourceState; + this.ResourceStateSyncTime = resourceStateSyncTime; CustomInit(); } @@ -57,39 +56,38 @@ public AzureFileshareProtectedItemExtendedInfo() /// partial void CustomInit(); + /// - /// Gets or sets the oldest backup copy available for this item in the - /// service. + /// Gets or sets the oldest backup copy available for this item in the service. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets number of available backup copies associated with this - /// backup item. + /// Gets or sets number of available backup copies associated with this backup + /// item. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } /// - /// Gets or sets indicates consistency of policy object and policy - /// applied to this backup item. + /// Gets or sets indicates consistency of policy object and policy applied to + /// this backup item. /// - [JsonProperty(PropertyName = "policyState")] - public string PolicyState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyState")] + public string PolicyState {get; set; } /// - /// Gets indicates the state of this resource. Possible values are from - /// enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + /// Gets indicates the state of this resource. Possible values are from enum + /// ResourceState {Invalid, Active, SoftDeleted, Deleted} /// - [JsonProperty(PropertyName = "resourceState")] - public string ResourceState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceState")] + public string ResourceState {get; private set; } /// /// Gets the resource state sync time for this backup item. /// - [JsonProperty(PropertyName = "resourceStateSyncTime")] - public System.DateTime? ResourceStateSyncTime { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceStateSyncTime")] + public System.DateTime? ResourceStateSyncTime {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMContainer.cs index 8730ffa6a92b..6c9bab7104d2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureIaaSClassicComputeVMContainer : IaaSVMContainer { /// - /// Initializes a new instance of the - /// AzureIaaSClassicComputeVMContainer class. + /// Initializes a new instance of the AzureIaaSClassicComputeVMContainer class. /// public AzureIaaSClassicComputeVMContainer() { @@ -30,29 +23,39 @@ public AzureIaaSClassicComputeVMContainer() } /// - /// Initializes a new instance of the - /// AzureIaaSClassicComputeVMContainer class. + /// Initializes a new instance of the AzureIaaSClassicComputeVMContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// Fully qualified ARM url of the - /// virtual machine represented by this Azure IaaS VM - /// container. - /// Specifies whether the container - /// represents a Classic or an Azure Resource Manager VM. - /// Resource group name of Recovery - /// Services Vault. + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// Fully qualified ARM url of the virtual machine represented by this Azure + /// IaaS VM container. + /// + + /// Specifies whether the container represents a Classic or an Azure Resource + /// Manager VM. + /// + + /// Resource group name of Recovery Services Vault. + /// public AzureIaaSClassicComputeVMContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), string virtualMachineId = default(string), string virtualMachineVersion = default(string), string resourceGroup = default(string)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, virtualMachineId, virtualMachineVersion, resourceGroup) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, virtualMachineId, virtualMachineVersion, resourceGroup) { CustomInit(); } @@ -63,4 +66,4 @@ public AzureIaaSClassicComputeVMContainer() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectableItem.cs index fc0d07a25829..04455391742b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectableItem.cs @@ -1,28 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// IaaS VM workload-specific backup item representing the Classic Compute - /// VM. + /// IaaS VM workload-specific backup item representing the Classic Compute VM. /// [Newtonsoft.Json.JsonObject("Microsoft.ClassicCompute/virtualMachines")] public partial class AzureIaaSClassicComputeVMProtectableItem : IaaSVMProtectableItem { /// - /// Initializes a new instance of the - /// AzureIaaSClassicComputeVMProtectableItem class. + /// Initializes a new instance of the AzureIaaSClassicComputeVMProtectableItem class. /// public AzureIaaSClassicComputeVMProtectableItem() { @@ -30,26 +22,34 @@ public AzureIaaSClassicComputeVMProtectableItem() } /// - /// Initializes a new instance of the - /// AzureIaaSClassicComputeVMProtectableItem class. + /// Initializes a new instance of the AzureIaaSClassicComputeVMProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Fully qualified ARM ID of the - /// virtual machine. - /// Specifies whether the container - /// represents a Classic or an Azure Resource Manager VM. - /// Resource group name of Recovery - /// Services Vault. + + /// Fully qualified ARM ID of the virtual machine. + /// + + /// Specifies whether the container represents a Classic or an Azure Resource + /// Manager VM. + /// + + /// Resource group name of Recovery Services Vault. + /// public AzureIaaSClassicComputeVMProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string virtualMachineId = default(string), string virtualMachineVersion = default(string), string resourceGroup = default(string)) - : base(backupManagementType, workloadType, friendlyName, protectionState, virtualMachineId, virtualMachineVersion, resourceGroup) + + : base(backupManagementType, workloadType, friendlyName, protectionState, virtualMachineId, virtualMachineVersion, resourceGroup) { CustomInit(); } @@ -60,4 +60,4 @@ public AzureIaaSClassicComputeVMProtectableItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs index 3750b1a499e0..a909d107a9f9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs @@ -1,30 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// IaaS VM workload-specific backup item representing the Classic Compute - /// VM. + /// IaaS VM workload-specific backup item representing the Classic Compute VM. /// [Newtonsoft.Json.JsonObject("Microsoft.ClassicCompute/virtualMachines")] public partial class AzureIaaSClassicComputeVMProtectedItem : AzureIaaSVMProtectedItem { /// - /// Initializes a new instance of the - /// AzureIaaSClassicComputeVMProtectedItem class. + /// Initializes a new instance of the AzureIaaSClassicComputeVMProtectedItem class. /// public AzureIaaSClassicComputeVMProtectedItem() { @@ -32,76 +22,109 @@ public AzureIaaSClassicComputeVMProtectedItem() } /// - /// Initializes a new instance of the - /// AzureIaaSClassicComputeVMProtectedItem class. + /// Initializes a new instance of the AzureIaaSClassicComputeVMProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the VM represented by - /// this backup item. - /// Fully qualified ARM ID of the - /// virtual machine represented by this item. - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the VM represented by this backup item. + /// + + /// Fully qualified ARM ID of the virtual machine represented by this item. + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' + /// Health status of protected item. - /// Possible values include: 'Passed', 'ActionRequired', - /// 'ActionSuggested', 'Invalid' - /// Health details on this backup - /// item. - /// Health details of different KPIs - /// Last backup operation - /// status. - /// Timestamp of the last backup operation - /// on this backup item. - /// Data ID of the protected - /// item. - /// Additional information for this backup - /// item. - public AzureIaaSClassicComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) + /// Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + /// 'Invalid' + + /// Health details on this backup item. + /// + + /// Health details of different KPIs + /// + + /// Last backup operation status. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Data ID of the protected item. + /// + + /// Additional information for this backup item. + /// + + /// Extended Properties for Azure IaasVM Backup. + /// + public AzureIaaSClassicComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), System.Collections.Generic.IList healthDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) { CustomInit(); } @@ -112,4 +135,4 @@ public AzureIaaSClassicComputeVMProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMContainer.cs index 2bdd6922652a..fb2a47a4b7ba 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureIaaSComputeVMContainer : IaaSVMContainer { /// - /// Initializes a new instance of the AzureIaaSComputeVMContainer - /// class. + /// Initializes a new instance of the AzureIaaSComputeVMContainer class. /// public AzureIaaSComputeVMContainer() { @@ -30,29 +23,39 @@ public AzureIaaSComputeVMContainer() } /// - /// Initializes a new instance of the AzureIaaSComputeVMContainer - /// class. + /// Initializes a new instance of the AzureIaaSComputeVMContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// Fully qualified ARM url of the - /// virtual machine represented by this Azure IaaS VM - /// container. - /// Specifies whether the container - /// represents a Classic or an Azure Resource Manager VM. - /// Resource group name of Recovery - /// Services Vault. + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// Fully qualified ARM url of the virtual machine represented by this Azure + /// IaaS VM container. + /// + + /// Specifies whether the container represents a Classic or an Azure Resource + /// Manager VM. + /// + + /// Resource group name of Recovery Services Vault. + /// public AzureIaaSComputeVMContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), string virtualMachineId = default(string), string virtualMachineVersion = default(string), string resourceGroup = default(string)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, virtualMachineId, virtualMachineVersion, resourceGroup) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, virtualMachineId, virtualMachineVersion, resourceGroup) { CustomInit(); } @@ -63,4 +66,4 @@ public AzureIaaSComputeVMContainer() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectableItem.cs index 59ac2c12a87b..74608ec0e7b6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectableItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureIaaSComputeVMProtectableItem : IaaSVMProtectableItem { /// - /// Initializes a new instance of the AzureIaaSComputeVMProtectableItem - /// class. + /// Initializes a new instance of the AzureIaaSComputeVMProtectableItem class. /// public AzureIaaSComputeVMProtectableItem() { @@ -30,26 +23,34 @@ public AzureIaaSComputeVMProtectableItem() } /// - /// Initializes a new instance of the AzureIaaSComputeVMProtectableItem - /// class. + /// Initializes a new instance of the AzureIaaSComputeVMProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Fully qualified ARM ID of the - /// virtual machine. - /// Specifies whether the container - /// represents a Classic or an Azure Resource Manager VM. - /// Resource group name of Recovery - /// Services Vault. + + /// Fully qualified ARM ID of the virtual machine. + /// + + /// Specifies whether the container represents a Classic or an Azure Resource + /// Manager VM. + /// + + /// Resource group name of Recovery Services Vault. + /// public AzureIaaSComputeVMProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string virtualMachineId = default(string), string virtualMachineVersion = default(string), string resourceGroup = default(string)) - : base(backupManagementType, workloadType, friendlyName, protectionState, virtualMachineId, virtualMachineVersion, resourceGroup) + + : base(backupManagementType, workloadType, friendlyName, protectionState, virtualMachineId, virtualMachineVersion, resourceGroup) { CustomInit(); } @@ -60,4 +61,4 @@ public AzureIaaSComputeVMProtectableItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectedItem.cs index 9c234224b067..c1c46cf23b32 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSComputeVMProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureIaaSComputeVMProtectedItem : AzureIaaSVMProtectedItem { /// - /// Initializes a new instance of the AzureIaaSComputeVMProtectedItem - /// class. + /// Initializes a new instance of the AzureIaaSComputeVMProtectedItem class. /// public AzureIaaSComputeVMProtectedItem() { @@ -32,76 +23,109 @@ public AzureIaaSComputeVMProtectedItem() } /// - /// Initializes a new instance of the AzureIaaSComputeVMProtectedItem - /// class. + /// Initializes a new instance of the AzureIaaSComputeVMProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the VM represented by - /// this backup item. - /// Fully qualified ARM ID of the - /// virtual machine represented by this item. - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the VM represented by this backup item. + /// + + /// Fully qualified ARM ID of the virtual machine represented by this item. + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' + /// Health status of protected item. - /// Possible values include: 'Passed', 'ActionRequired', - /// 'ActionSuggested', 'Invalid' - /// Health details on this backup - /// item. - /// Health details of different KPIs - /// Last backup operation - /// status. - /// Timestamp of the last backup operation - /// on this backup item. - /// Data ID of the protected - /// item. - /// Additional information for this backup - /// item. - public AzureIaaSComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) + /// Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + /// 'Invalid' + + /// Health details on this backup item. + /// + + /// Health details of different KPIs + /// + + /// Last backup operation status. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Data ID of the protected item. + /// + + /// Additional information for this backup item. + /// + + /// Extended Properties for Azure IaasVM Backup. + /// + public AzureIaaSComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), System.Collections.Generic.IList healthDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) { CustomInit(); } @@ -112,4 +136,4 @@ public AzureIaaSComputeVMProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMErrorInfo.cs index 3697f94b4e6f..21034972a698 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,18 +23,25 @@ public AzureIaaSVMErrorInfo() /// /// Initializes a new instance of the AzureIaaSVMErrorInfo class. /// - /// Error code. - /// Title: Typically, the entity that the - /// error pertains to. - /// Localized error string. - /// List of localized recommendations for - /// above error code. - public AzureIaaSVMErrorInfo(int? errorCode = default(int?), string errorTitle = default(string), string errorString = default(string), IList recommendations = default(IList)) + + /// Error code. + /// + + /// Title: Typically, the entity that the error pertains to. + /// + + /// Localized error string. + /// + + /// List of localized recommendations for above error code. + /// + public AzureIaaSVMErrorInfo(int? errorCode = default(int?), string errorTitle = default(string), string errorString = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - ErrorCode = errorCode; - ErrorTitle = errorTitle; - ErrorString = errorString; - Recommendations = recommendations; + this.ErrorCode = errorCode; + this.ErrorTitle = errorTitle; + this.ErrorString = errorString; + this.Recommendations = recommendations; CustomInit(); } @@ -51,29 +50,29 @@ public AzureIaaSVMErrorInfo() /// partial void CustomInit(); + /// /// Gets error code. /// - [JsonProperty(PropertyName = "errorCode")] - public int? ErrorCode { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode {get; private set; } /// /// Gets title: Typically, the entity that the error pertains to. /// - [JsonProperty(PropertyName = "errorTitle")] - public string ErrorTitle { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorTitle")] + public string ErrorTitle {get; private set; } /// /// Gets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; private set; } /// /// Gets list of localized recommendations for above error code. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMHealthDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMHealthDetails.cs index badee80b0b95..f1bfd5b90eb4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMHealthDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMHealthDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -30,12 +23,21 @@ public AzureIaaSVMHealthDetails() /// /// Initializes a new instance of the AzureIaaSVMHealthDetails class. /// - /// Health Code - /// Health Title - /// Health Message - /// Health Recommended Actions - public AzureIaaSVMHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), IList recommendations = default(IList)) - : base(code, title, message, recommendations) + + /// Health Code + /// + + /// Health Title + /// + + /// Health Message + /// + + /// Health Recommended Actions + /// + public AzureIaaSVMHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + + : base(code, title, message, recommendations) { CustomInit(); } @@ -46,4 +48,4 @@ public AzureIaaSVMHealthDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJob.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJob.cs index b639a0107d87..7b6a792c5f83 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,41 +24,62 @@ public AzureIaaSVMJob() /// /// Initializes a new instance of the AzureIaaSVMJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Time elapsed during the execution of this - /// job. - /// Gets or sets the state/actions applicable - /// on this job like cancel/retry. - /// Error details on execution of this - /// job. - /// Specifies whether the backup - /// item is a Classic or an Azure Resource Manager VM. - /// Additional information for this - /// job. - /// Container name of the entity on which - /// the current job is executing. - /// Indicated that whether the job is - /// adhoc(true) or scheduled(false) - public AzureIaaSVMJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), IList errorDetails = default(IList), string virtualMachineVersion = default(string), AzureIaaSVMJobExtendedInfo extendedInfo = default(AzureIaaSVMJobExtendedInfo), string containerName = default(string), bool? isUserTriggered = default(bool?)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Time elapsed during the execution of this job. + /// + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + /// + + /// Error details on execution of this job. + /// + + /// Specifies whether the backup item is a Classic or an Azure Resource Manager + /// VM. + /// + + /// Additional information for this job. + /// + + /// Container name of the entity on which the current job is executing. + /// + + /// Indicated that whether the job is adhoc(true) or scheduled(false) + /// + public AzureIaaSVMJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), string virtualMachineVersion = default(string), AzureIaaSVMJobExtendedInfo extendedInfo = default(AzureIaaSVMJobExtendedInfo), string containerName = default(string), bool? isUserTriggered = default(bool?)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - Duration = duration; - ActionsInfo = actionsInfo; - ErrorDetails = errorDetails; - VirtualMachineVersion = virtualMachineVersion; - ExtendedInfo = extendedInfo; - ContainerName = containerName; - IsUserTriggered = isUserTriggered; + this.Duration = duration; + this.ActionsInfo = actionsInfo; + this.ErrorDetails = errorDetails; + this.VirtualMachineVersion = virtualMachineVersion; + this.ExtendedInfo = extendedInfo; + this.ContainerName = containerName; + this.IsUserTriggered = isUserTriggered; CustomInit(); } @@ -75,51 +88,51 @@ public AzureIaaSVMJob() /// partial void CustomInit(); + /// /// Gets or sets time elapsed during the execution of this job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets the state/actions applicable on this job like + /// Gets or sets gets or sets the state/actions applicable on this job like /// cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets error details on execution of this job. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// - /// Gets or sets specifies whether the backup item is a Classic or an - /// Azure Resource Manager VM. + /// Gets or sets specifies whether the backup item is a Classic or an Azure + /// Resource Manager VM. /// - [JsonProperty(PropertyName = "virtualMachineVersion")] - public string VirtualMachineVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineVersion")] + public string VirtualMachineVersion {get; set; } /// /// Gets or sets additional information for this job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureIaaSVMJobExtendedInfo ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureIaaSVMJobExtendedInfo ExtendedInfo {get; set; } /// - /// Gets or sets container name of the entity on which the current job - /// is executing. + /// Gets or sets container name of the entity on which the current job is + /// executing. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets indicated that whether the job is adhoc(true) or /// scheduled(false) /// - [JsonProperty(PropertyName = "isUserTriggered")] - public bool? IsUserTriggered { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isUserTriggered")] + public bool? IsUserTriggered {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobExtendedInfo.cs index c5e810f56a75..91dc00606396 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,24 +23,33 @@ public AzureIaaSVMJobExtendedInfo() /// /// Initializes a new instance of the AzureIaaSVMJobExtendedInfo class. /// - /// List of tasks associated with this - /// job. - /// Job properties. - /// Job internal properties. - /// Indicates progress of the job. - /// Null if it has not started or completed. - /// Time remaining for - /// execution of this job. - /// Non localized error message on - /// job execution. - public AzureIaaSVMJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), IDictionary internalPropertyBag = default(IDictionary), double? progressPercentage = default(double?), string estimatedRemainingDuration = default(string), string dynamicErrorMessage = default(string)) + + /// List of tasks associated with this job. + /// + + /// Job properties. + /// + + /// Job internal properties. + /// + + /// Indicates progress of the job. Null if it has not started or completed. + /// + + /// Time remaining for execution of this job. + /// + + /// Non localized error message on job execution. + /// + public AzureIaaSVMJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary internalPropertyBag = default(System.Collections.Generic.IDictionary), double? progressPercentage = default(double?), string estimatedRemainingDuration = default(string), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - InternalPropertyBag = internalPropertyBag; - ProgressPercentage = progressPercentage; - EstimatedRemainingDuration = estimatedRemainingDuration; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.InternalPropertyBag = internalPropertyBag; + this.ProgressPercentage = progressPercentage; + this.EstimatedRemainingDuration = estimatedRemainingDuration; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -57,42 +58,42 @@ public AzureIaaSVMJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks associated with this job. /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets job internal properties. /// - [JsonProperty(PropertyName = "internalPropertyBag")] - public IDictionary InternalPropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "internalPropertyBag")] + public System.Collections.Generic.IDictionary InternalPropertyBag {get; set; } /// - /// Gets or sets indicates progress of the job. Null if it has not - /// started or completed. + /// Gets or sets indicates progress of the job. Null if it has not started or + /// completed. /// - [JsonProperty(PropertyName = "progressPercentage")] - public double? ProgressPercentage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "progressPercentage")] + public double? ProgressPercentage {get; set; } /// /// Gets or sets time remaining for execution of this job. /// - [JsonProperty(PropertyName = "estimatedRemainingDuration")] - public string EstimatedRemainingDuration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "estimatedRemainingDuration")] + public string EstimatedRemainingDuration {get; set; } /// /// Gets or sets non localized error message on job execution. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobTaskDetails.cs index 8dba5bff4bcf..e0f0da1a8185 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,26 +23,42 @@ public AzureIaaSVMJobTaskDetails() /// /// Initializes a new instance of the AzureIaaSVMJobTaskDetails class. /// - /// The task display name. - /// The start time. - /// The end time. - /// The instanceId. - /// Time elapsed for task. - /// The status. - /// Progress of the task. - /// Details about execution of the - /// task. - /// eg: number of bytes transferred etc + + /// The task display name. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// The instanceId. + /// + + /// Time elapsed for task. + /// + + /// The status. + /// + + /// Progress of the task. + /// + + /// Details about execution of the task. + /// eg: number of bytes transferred etc + /// public AzureIaaSVMJobTaskDetails(string taskId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string instanceId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), string status = default(string), double? progressPercentage = default(double?), string taskExecutionDetails = default(string)) + { - TaskId = taskId; - StartTime = startTime; - EndTime = endTime; - InstanceId = instanceId; - Duration = duration; - Status = status; - ProgressPercentage = progressPercentage; - TaskExecutionDetails = taskExecutionDetails; + this.TaskId = taskId; + this.StartTime = startTime; + this.EndTime = endTime; + this.InstanceId = instanceId; + this.Duration = duration; + this.Status = status; + this.ProgressPercentage = progressPercentage; + this.TaskExecutionDetails = taskExecutionDetails; CustomInit(); } @@ -57,54 +67,54 @@ public AzureIaaSVMJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets the instanceId. /// - [JsonProperty(PropertyName = "instanceId")] - public string InstanceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "instanceId")] + public string InstanceId {get; set; } /// /// Gets or sets time elapsed for task. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets progress of the task. /// - [JsonProperty(PropertyName = "progressPercentage")] - public double? ProgressPercentage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "progressPercentage")] + public double? ProgressPercentage {get; set; } /// /// Gets or sets details about execution of the task. /// eg: number of bytes transferred etc /// - [JsonProperty(PropertyName = "taskExecutionDetails")] - public string TaskExecutionDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "taskExecutionDetails")] + public string TaskExecutionDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobV2.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobV2.cs index db3f9d669dc8..159f13c2ac8e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobV2.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMJobV2.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,38 +24,58 @@ public AzureIaaSVMJobV2() /// /// Initializes a new instance of the AzureIaaSVMJobV2 class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Gets or sets the state/actions applicable - /// on this job like cancel/retry. - /// Container name of the entity on which - /// the current job is executing. - /// Time elapsed during the execution of this - /// job. - /// Error details on execution of this - /// job. - /// Specifies whether the backup - /// item is a Classic or an Azure Resource Manager VM. - /// Additional information for this - /// job. - public AzureIaaSVMJobV2(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), IList actionsInfo = default(IList), string containerName = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList errorDetails = default(IList), string virtualMachineVersion = default(string), AzureIaaSVMJobExtendedInfo extendedInfo = default(AzureIaaSVMJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + /// + + /// Container name of the entity on which the current job is executing. + /// + + /// Time elapsed during the execution of this job. + /// + + /// Error details on execution of this job. + /// + + /// Specifies whether the backup item is a Classic or an Azure Resource Manager + /// VM. + /// + + /// Additional information for this job. + /// + public AzureIaaSVMJobV2(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), string containerName = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), string virtualMachineVersion = default(string), AzureIaaSVMJobExtendedInfo extendedInfo = default(AzureIaaSVMJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - ActionsInfo = actionsInfo; - ContainerName = containerName; - Duration = duration; - ErrorDetails = errorDetails; - VirtualMachineVersion = virtualMachineVersion; - ExtendedInfo = extendedInfo; + this.ActionsInfo = actionsInfo; + this.ContainerName = containerName; + this.Duration = duration; + this.ErrorDetails = errorDetails; + this.VirtualMachineVersion = virtualMachineVersion; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -72,44 +84,44 @@ public AzureIaaSVMJobV2() /// partial void CustomInit(); + /// - /// Gets or sets the state/actions applicable on this job like + /// Gets or sets gets or sets the state/actions applicable on this job like /// cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// - /// Gets or sets container name of the entity on which the current job - /// is executing. + /// Gets or sets container name of the entity on which the current job is + /// executing. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets time elapsed during the execution of this job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// /// Gets or sets error details on execution of this job. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// - /// Gets or sets specifies whether the backup item is a Classic or an - /// Azure Resource Manager VM. + /// Gets or sets specifies whether the backup item is a Classic or an Azure + /// Resource Manager VM. /// - [JsonProperty(PropertyName = "virtualMachineVersion")] - public string VirtualMachineVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineVersion")] + public string VirtualMachineVersion {get; set; } /// /// Gets or sets additional information for this job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureIaaSVMJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureIaaSVMJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItem.cs index fff9295153fb..fd1fac4094a4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,86 +24,120 @@ public AzureIaaSVMProtectedItem() /// /// Initializes a new instance of the AzureIaaSVMProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the VM represented by - /// this backup item. - /// Fully qualified ARM ID of the - /// virtual machine represented by this item. - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the VM represented by this backup item. + /// + + /// Fully qualified ARM ID of the virtual machine represented by this item. + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' + /// Health status of protected item. - /// Possible values include: 'Passed', 'ActionRequired', - /// 'ActionSuggested', 'Invalid' - /// Health details on this backup - /// item. - /// Health details of different KPIs - /// Last backup operation - /// status. - /// Timestamp of the last backup operation - /// on this backup item. - /// Data ID of the protected - /// item. - /// Additional information for this backup - /// item. - public AzureIaaSVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) + /// Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + /// 'Invalid' + + /// Health details on this backup item. + /// + + /// Health details of different KPIs + /// + + /// Last backup operation status. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Data ID of the protected item. + /// + + /// Additional information for this backup item. + /// + + /// Extended Properties for Azure IaasVM Backup. + /// + public AzureIaaSVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), System.Collections.Generic.IList healthDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) { - FriendlyName = friendlyName; - VirtualMachineId = virtualMachineId; - ProtectionStatus = protectionStatus; - ProtectionState = protectionState; - HealthStatus = healthStatus; - HealthDetails = healthDetails; - KpisHealths = kpisHealths; - LastBackupStatus = lastBackupStatus; - LastBackupTime = lastBackupTime; - ProtectedItemDataId = protectedItemDataId; - ExtendedInfo = extendedInfo; - ExtendedProperties = extendedProperties; + this.FriendlyName = friendlyName; + this.VirtualMachineId = virtualMachineId; + this.ProtectionStatus = protectionStatus; + this.ProtectionState = protectionState; + this.HealthStatus = healthStatus; + this.HealthDetails = healthDetails; + this.KpisHealths = kpisHealths; + this.LastBackupStatus = lastBackupStatus; + this.LastBackupTime = lastBackupTime; + this.ProtectedItemDataId = protectedItemDataId; + this.ExtendedInfo = extendedInfo; + this.ExtendedProperties = extendedProperties; CustomInit(); } @@ -120,80 +146,78 @@ public AzureIaaSVMProtectedItem() /// partial void CustomInit(); + /// /// Gets friendly name of the VM represented by this backup item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; private set; } /// - /// Gets fully qualified ARM ID of the virtual machine represented by - /// this item. + /// Gets fully qualified ARM ID of the virtual machine represented by this + /// item. /// - [JsonProperty(PropertyName = "virtualMachineId")] - public string VirtualMachineId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineId")] + public string VirtualMachineId {get; private set; } /// /// Gets or sets backup status of this backup item. /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; set; } /// - /// Gets or sets backup state of this backup item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' + /// Gets or sets backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// - /// Gets health status of protected item. Possible values include: - /// 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + /// Gets health status of protected item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' /// - [JsonProperty(PropertyName = "healthStatus")] - public string HealthStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthStatus")] + public string HealthStatus {get; private set; } /// /// Gets or sets health details on this backup item. /// - [JsonProperty(PropertyName = "healthDetails")] - public IList HealthDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthDetails")] + public System.Collections.Generic.IList HealthDetails {get; set; } /// /// Gets or sets health details of different KPIs /// - [JsonProperty(PropertyName = "kpisHealths")] - public IDictionary KpisHealths { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kpisHealths")] + public System.Collections.Generic.IDictionary KpisHealths {get; set; } /// /// Gets or sets last backup operation status. /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// /// Gets timestamp of the last backup operation on this backup item. /// - [JsonProperty(PropertyName = "lastBackupTime")] - public System.DateTime? LastBackupTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupTime")] + public System.DateTime? LastBackupTime {get; private set; } /// /// Gets data ID of the protected item. /// - [JsonProperty(PropertyName = "protectedItemDataId")] - public string ProtectedItemDataId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemDataId")] + public string ProtectedItemDataId {get; private set; } /// /// Gets or sets additional information for this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureIaaSVMProtectedItemExtendedInfo ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureIaaSVMProtectedItemExtendedInfo ExtendedInfo {get; set; } /// + /// Gets or sets extended Properties for Azure IaasVM Backup. /// - [JsonProperty(PropertyName = "extendedProperties")] - public ExtendedProperties ExtendedProperties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedProperties")] + public ExtendedProperties ExtendedProperties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs index 5b84a47ed1fe..a7d9e190dfcb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureIaaSVMProtectedItemExtendedInfo { /// - /// Initializes a new instance of the - /// AzureIaaSVMProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureIaaSVMProtectedItemExtendedInfo class. /// public AzureIaaSVMProtectedItemExtendedInfo() { @@ -28,29 +21,35 @@ public AzureIaaSVMProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the - /// AzureIaaSVMProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureIaaSVMProtectedItemExtendedInfo class. /// - /// The oldest backup copy available - /// for this backup item across all tiers. - /// The oldest backup copy - /// available for this backup item in vault tier - /// The oldest backup copy - /// available for this backup item in archive tier - /// The latest backup copy - /// available for this backup item in archive tier - /// Number of backup copies available - /// for this backup item. - /// Specifies if backup policy - /// associated with the backup item is inconsistent. + + /// The oldest backup copy available for this backup item across all tiers. + /// + + /// The oldest backup copy available for this backup item in vault tier + /// + + /// The oldest backup copy available for this backup item in archive tier + /// + + /// The latest backup copy available for this backup item in archive tier + /// + + /// Number of backup copies available for this backup item. + /// + + /// Specifies if backup policy associated with the backup item is inconsistent. + /// public AzureIaaSVMProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), System.DateTime? oldestRecoveryPointInVault = default(System.DateTime?), System.DateTime? oldestRecoveryPointInArchive = default(System.DateTime?), System.DateTime? newestRecoveryPointInArchive = default(System.DateTime?), int? recoveryPointCount = default(int?), bool? policyInconsistent = default(bool?)) + { - OldestRecoveryPoint = oldestRecoveryPoint; - OldestRecoveryPointInVault = oldestRecoveryPointInVault; - OldestRecoveryPointInArchive = oldestRecoveryPointInArchive; - NewestRecoveryPointInArchive = newestRecoveryPointInArchive; - RecoveryPointCount = recoveryPointCount; - PolicyInconsistent = policyInconsistent; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.OldestRecoveryPointInVault = oldestRecoveryPointInVault; + this.OldestRecoveryPointInArchive = oldestRecoveryPointInArchive; + this.NewestRecoveryPointInArchive = newestRecoveryPointInArchive; + this.RecoveryPointCount = recoveryPointCount; + this.PolicyInconsistent = policyInconsistent; CustomInit(); } @@ -59,47 +58,46 @@ public AzureIaaSVMProtectedItemExtendedInfo() /// partial void CustomInit(); + /// - /// Gets or sets the oldest backup copy available for this backup item - /// across all tiers. + /// Gets or sets the oldest backup copy available for this backup item across + /// all tiers. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets the oldest backup copy available for this backup item - /// in vault tier + /// Gets or sets the oldest backup copy available for this backup item in vault + /// tier /// - [JsonProperty(PropertyName = "oldestRecoveryPointInVault")] - public System.DateTime? OldestRecoveryPointInVault { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPointInVault")] + public System.DateTime? OldestRecoveryPointInVault {get; set; } /// - /// Gets or sets the oldest backup copy available for this backup item - /// in archive tier + /// Gets or sets the oldest backup copy available for this backup item in + /// archive tier /// - [JsonProperty(PropertyName = "oldestRecoveryPointInArchive")] - public System.DateTime? OldestRecoveryPointInArchive { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPointInArchive")] + public System.DateTime? OldestRecoveryPointInArchive {get; set; } /// - /// Gets or sets the latest backup copy available for this backup item - /// in archive tier + /// Gets or sets the latest backup copy available for this backup item in + /// archive tier /// - [JsonProperty(PropertyName = "newestRecoveryPointInArchive")] - public System.DateTime? NewestRecoveryPointInArchive { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "newestRecoveryPointInArchive")] + public System.DateTime? NewestRecoveryPointInArchive {get; set; } /// - /// Gets or sets number of backup copies available for this backup - /// item. + /// Gets or sets number of backup copies available for this backup item. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } /// - /// Gets or sets specifies if backup policy associated with the backup - /// item is inconsistent. + /// Gets or sets specifies if backup policy associated with the backup item is + /// inconsistent. /// - [JsonProperty(PropertyName = "policyInconsistent")] - public bool? PolicyInconsistent { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "policyInconsistent")] + public bool? PolicyInconsistent {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectionPolicy.cs index d273af29ec0f..f729a6a80b6e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureIaaSVMProtectionPolicy.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureIaaSVMProtectionPolicy : ProtectionPolicy { /// - /// Initializes a new instance of the AzureIaaSVMProtectionPolicy - /// class. + /// Initializes a new instance of the AzureIaaSVMProtectionPolicy class. /// public AzureIaaSVMProtectionPolicy() { @@ -31,38 +22,49 @@ public AzureIaaSVMProtectionPolicy() } /// - /// Initializes a new instance of the AzureIaaSVMProtectionPolicy - /// class. + /// Initializes a new instance of the AzureIaaSVMProtectionPolicy class. /// - /// Number of items associated with - /// this policy. - /// ResourceGuard - /// Operation Requests - /// Backup schedule specified as part of - /// backup policy. - /// Retention policy with the details on - /// backup copy retention ranges. - /// Tiering policy to automatically move - /// RPs to another tier + + /// Number of items associated with this policy. + /// + + /// ResourceGuard Operation Requests + /// + + /// + /// + + /// Backup schedule specified as part of backup policy. + /// + + /// Retention policy with the details on backup copy retention ranges. + /// + + /// Tiering policy to automatically move RPs to another tier /// Key is Target Tier, defined in RecoveryPointTierType enum. - /// Tiering policy specifies the criteria to move RP to the target - /// tier. - /// Instant RP retention - /// policy range in days - /// TimeZone optional input as string. For - /// example: TimeZone = "Pacific Standard Time". - /// Possible values include: 'Invalid', 'V1', - /// 'V2' - public AzureIaaSVMProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), InstantRPAdditionalDetails instantRPDetails = default(InstantRPAdditionalDetails), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), IDictionary tieringPolicy = default(IDictionary), int? instantRpRetentionRangeInDays = default(int?), string timeZone = default(string), string policyType = default(string)) - : base(protectedItemsCount, resourceGuardOperationRequests) + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + + /// Instant RP retention policy range in days + /// + + /// TimeZone optional input as string. For example: TimeZone = "Pacific + /// Standard Time". + /// + + /// + /// Possible values include: 'Invalid', 'V1', 'V2' + public AzureIaaSVMProtectionPolicy(int? protectedItemsCount = default(int?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), InstantRPAdditionalDetails instantRpDetails = default(InstantRPAdditionalDetails), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), System.Collections.Generic.IDictionary tieringPolicy = default(System.Collections.Generic.IDictionary), int? instantRpRetentionRangeInDays = default(int?), string timeZone = default(string), string policyType = default(string)) + + : base(protectedItemsCount, resourceGuardOperationRequests) { - InstantRPDetails = instantRPDetails; - SchedulePolicy = schedulePolicy; - RetentionPolicy = retentionPolicy; - TieringPolicy = tieringPolicy; - InstantRpRetentionRangeInDays = instantRpRetentionRangeInDays; - TimeZone = timeZone; - PolicyType = policyType; + this.InstantRpDetails = instantRpDetails; + this.SchedulePolicy = schedulePolicy; + this.RetentionPolicy = retentionPolicy; + this.TieringPolicy = tieringPolicy; + this.InstantRpRetentionRangeInDays = instantRpRetentionRangeInDays; + this.TimeZone = timeZone; + this.PolicyType = policyType; CustomInit(); } @@ -71,52 +73,51 @@ public AzureIaaSVMProtectionPolicy() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "instantRPDetails")] - public InstantRPAdditionalDetails InstantRPDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "instantRPDetails")] + public InstantRPAdditionalDetails InstantRpDetails {get; set; } /// /// Gets or sets backup schedule specified as part of backup policy. /// - [JsonProperty(PropertyName = "schedulePolicy")] - public SchedulePolicy SchedulePolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "schedulePolicy")] + public SchedulePolicy SchedulePolicy {get; set; } /// - /// Gets or sets retention policy with the details on backup copy - /// retention ranges. + /// Gets or sets retention policy with the details on backup copy retention + /// ranges. /// - [JsonProperty(PropertyName = "retentionPolicy")] - public RetentionPolicy RetentionPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionPolicy")] + public RetentionPolicy RetentionPolicy {get; set; } /// - /// Gets or sets tiering policy to automatically move RPs to another - /// tier + /// Gets or sets tiering policy to automatically move RPs to another tier /// Key is Target Tier, defined in RecoveryPointTierType enum. - /// Tiering policy specifies the criteria to move RP to the target - /// tier. + /// Tiering policy specifies the criteria to move RP to the target tier. /// - [JsonProperty(PropertyName = "tieringPolicy")] - public IDictionary TieringPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tieringPolicy")] + public System.Collections.Generic.IDictionary TieringPolicy {get; set; } /// /// Gets or sets instant RP retention policy range in days /// - [JsonProperty(PropertyName = "instantRpRetentionRangeInDays")] - public int? InstantRpRetentionRangeInDays { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "instantRpRetentionRangeInDays")] + public int? InstantRpRetentionRangeInDays {get; set; } /// - /// Gets or sets timeZone optional input as string. For example: - /// TimeZone = "Pacific Standard Time". + /// Gets or sets timeZone optional input as string. For example: TimeZone = + /// "Pacific Standard Time". /// - [JsonProperty(PropertyName = "timeZone")] - public string TimeZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "timeZone")] + public string TimeZone {get; set; } /// - /// Gets or sets possible values include: 'Invalid', 'V1', 'V2' + /// Gets or sets Possible values include: 'Invalid', 'V1', 'V2' /// - [JsonProperty(PropertyName = "policyType")] - public string PolicyType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "policyType")] + public string PolicyType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureRecoveryServiceVaultProtectionIntent.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureRecoveryServiceVaultProtectionIntent.cs index a6a3d241fe79..edc4be35fcbf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureRecoveryServiceVaultProtectionIntent.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureRecoveryServiceVaultProtectionIntent.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureRecoveryServiceVaultProtectionIntent : ProtectionIntent { /// - /// Initializes a new instance of the - /// AzureRecoveryServiceVaultProtectionIntent class. + /// Initializes a new instance of the AzureRecoveryServiceVaultProtectionIntent class. /// public AzureRecoveryServiceVaultProtectionIntent() { @@ -29,24 +22,30 @@ public AzureRecoveryServiceVaultProtectionIntent() } /// - /// Initializes a new instance of the - /// AzureRecoveryServiceVaultProtectionIntent class. + /// Initializes a new instance of the AzureRecoveryServiceVaultProtectionIntent class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// ARM ID of the resource to be backed - /// up. - /// ID of the item which is getting protected, In - /// case of Azure Vm , it is ProtectedItemId - /// ID of the backup policy with which this item - /// is backed up. + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the item which is getting protected, In case of Azure Vm , it is + /// ProtectedItemId + /// + + /// ID of the backup policy with which this item is backed up. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' public AzureRecoveryServiceVaultProtectionIntent(string backupManagementType = default(string), string sourceResourceId = default(string), string itemId = default(string), string policyId = default(string), string protectionState = default(string)) - : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) + + : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) { CustomInit(); } @@ -57,4 +56,4 @@ public AzureRecoveryServiceVaultProtectionIntent() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureResourceProtectionIntent.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureResourceProtectionIntent.cs index 393be97dec3c..41c24ed56c29 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureResourceProtectionIntent.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureResourceProtectionIntent.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureResourceProtectionIntent : ProtectionIntent { /// - /// Initializes a new instance of the AzureResourceProtectionIntent - /// class. + /// Initializes a new instance of the AzureResourceProtectionIntent class. /// public AzureResourceProtectionIntent() { @@ -29,28 +22,35 @@ public AzureResourceProtectionIntent() } /// - /// Initializes a new instance of the AzureResourceProtectionIntent - /// class. + /// Initializes a new instance of the AzureResourceProtectionIntent class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// ARM ID of the resource to be backed - /// up. - /// ID of the item which is getting protected, In - /// case of Azure Vm , it is ProtectedItemId - /// ID of the backup policy with which this item - /// is backed up. + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the item which is getting protected, In case of Azure Vm , it is + /// ProtectedItemId + /// + + /// ID of the backup policy with which this item is backed up. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Friendly name of the VM represented by - /// this backup item. + + /// Friendly name of the VM represented by this backup item. + /// public AzureResourceProtectionIntent(string backupManagementType = default(string), string sourceResourceId = default(string), string itemId = default(string), string policyId = default(string), string protectionState = default(string), string friendlyName = default(string)) - : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) + + : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) { - FriendlyName = friendlyName; + this.FriendlyName = friendlyName; CustomInit(); } @@ -59,12 +59,11 @@ public AzureResourceProtectionIntent() /// partial void CustomInit(); + /// - /// Gets or sets friendly name of the VM represented by this backup - /// item. + /// Gets or sets friendly name of the VM represented by this backup item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSQLAGWorkloadContainerProtectionContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSQLAGWorkloadContainerProtectionContainer.cs index e3657272c67f..37ab23004345 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSQLAGWorkloadContainerProtectionContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSQLAGWorkloadContainerProtectionContainer.cs @@ -1,64 +1,67 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// /// Container for SQL workloads under SQL Availability Group. /// [Newtonsoft.Json.JsonObject("SQLAGWorkLoadContainer")] - public partial class AzureSQLAGWorkloadContainerProtectionContainer : AzureWorkloadContainer + public partial class AzureSqlagWorkloadContainerProtectionContainer : AzureWorkloadContainer { /// - /// Initializes a new instance of the - /// AzureSQLAGWorkloadContainerProtectionContainer class. + /// Initializes a new instance of the AzureSqlagWorkloadContainerProtectionContainer class. /// - public AzureSQLAGWorkloadContainerProtectionContainer() + public AzureSqlagWorkloadContainerProtectionContainer() { CustomInit(); } /// - /// Initializes a new instance of the - /// AzureSQLAGWorkloadContainerProtectionContainer class. + /// Initializes a new instance of the AzureSqlagWorkloadContainerProtectionContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// ARM ID of the virtual machine - /// represented by this Azure Workload Container - /// Time stamp when this container was - /// updated. - /// Additional details of a workload - /// container. - /// Workload type for which registration was - /// sent. Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Re-Do Operation. Possible values - /// include: 'Invalid', 'Register', 'Reregister' - public AzureSQLAGWorkloadContainerProtectionContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), string sourceResourceId = default(string), System.DateTime? lastUpdatedTime = default(System.DateTime?), AzureWorkloadContainerExtendedInfo extendedInfo = default(AzureWorkloadContainerExtendedInfo), string workloadType = default(string), string operationType = default(string)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, sourceResourceId, lastUpdatedTime, extendedInfo, workloadType, operationType) + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// ARM ID of the virtual machine represented by this Azure Workload Container + /// + + /// Time stamp when this container was updated. + /// + + /// Additional details of a workload container. + /// + + /// Workload type for which registration was sent. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Re-Do Operation + /// Possible values include: 'Invalid', 'Register', 'Reregister' + public AzureSqlagWorkloadContainerProtectionContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), string sourceResourceId = default(string), System.DateTime? lastUpdatedTime = default(System.DateTime?), AzureWorkloadContainerExtendedInfo extendedInfo = default(AzureWorkloadContainerExtendedInfo), string workloadType = default(string), string operationType = default(string)) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, sourceResourceId, lastUpdatedTime, extendedInfo, workloadType, operationType) { CustomInit(); } @@ -69,4 +72,4 @@ public AzureSQLAGWorkloadContainerProtectionContainer() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlContainer.cs index 58c1f89fc213..f11e8eb65c40 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,19 +24,26 @@ public AzureSqlContainer() /// /// Initializes a new instance of the AzureSqlContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// public AzureSqlContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) { CustomInit(); } @@ -53,4 +54,4 @@ public AzureSqlContainer() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectedItem.cs index d12289e3ea70..8fc351e9fade 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,62 +24,84 @@ public AzureSqlProtectedItem() /// /// Initializes a new instance of the AzureSqlProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Internal ID of a backup item. - /// Used by Azure SQL Backup engine to contact Recovery - /// Services. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Internal ID of a backup item. Used by Azure SQL Backup engine to contact + /// Recovery Services. + /// + /// Backup state of the backed up item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' - /// Additional information for this backup - /// item. - public AzureSqlProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string protectedItemDataId = default(string), string protectionState = default(string), AzureSqlProtectedItemExtendedInfo extendedInfo = default(AzureSqlProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) + + /// Additional information for this backup item. + /// + public AzureSqlProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string protectedItemDataId = default(string), string protectionState = default(string), AzureSqlProtectedItemExtendedInfo extendedInfo = default(AzureSqlProtectedItemExtendedInfo)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) { - ProtectedItemDataId = protectedItemDataId; - ProtectionState = protectionState; - ExtendedInfo = extendedInfo; + this.ProtectedItemDataId = protectedItemDataId; + this.ProtectionState = protectionState; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -96,26 +110,24 @@ public AzureSqlProtectedItem() /// partial void CustomInit(); + /// - /// Gets or sets internal ID of a backup item. Used by Azure SQL Backup - /// engine to contact Recovery Services. + /// Gets or sets internal ID of a backup item. Used by Azure SQL Backup engine + /// to contact Recovery Services. /// - [JsonProperty(PropertyName = "protectedItemDataId")] - public string ProtectedItemDataId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemDataId")] + public string ProtectedItemDataId {get; set; } /// - /// Gets or sets backup state of the backed up item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' + /// Gets or sets backup state of the backed up item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// /// Gets or sets additional information for this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureSqlProtectedItemExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureSqlProtectedItemExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectedItemExtendedInfo.cs index 9587537c4cba..c145b93f6ec5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureSqlProtectedItemExtendedInfo { /// - /// Initializes a new instance of the AzureSqlProtectedItemExtendedInfo - /// class. + /// Initializes a new instance of the AzureSqlProtectedItemExtendedInfo class. /// public AzureSqlProtectedItemExtendedInfo() { @@ -28,20 +21,23 @@ public AzureSqlProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the AzureSqlProtectedItemExtendedInfo - /// class. + /// Initializes a new instance of the AzureSqlProtectedItemExtendedInfo class. /// - /// The oldest backup copy available - /// for this item in the service. - /// Number of available backup copies - /// associated with this backup item. - /// State of the backup policy associated - /// with this backup item. + + /// The oldest backup copy available for this item in the service. + /// + + /// Number of available backup copies associated with this backup item. + /// + + /// State of the backup policy associated with this backup item. + /// public AzureSqlProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), string policyState = default(string)) + { - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; - PolicyState = policyState; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; + this.PolicyState = policyState; CustomInit(); } @@ -50,26 +46,24 @@ public AzureSqlProtectedItemExtendedInfo() /// partial void CustomInit(); - /// - /// Gets or sets the oldest backup copy available for this item in the - /// service. - /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } /// - /// Gets or sets number of available backup copies associated with this - /// backup item. + /// Gets or sets the oldest backup copy available for this item in the service. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets state of the backup policy associated with this backup + /// Gets or sets number of available backup copies associated with this backup /// item. /// - [JsonProperty(PropertyName = "policyState")] - public string PolicyState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } + /// + /// Gets or sets state of the backup policy associated with this backup item. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "policyState")] + public string PolicyState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectionPolicy.cs index b9dfee77255b..20aa9ad2a491 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureSqlProtectionPolicy.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,15 +24,20 @@ public AzureSqlProtectionPolicy() /// /// Initializes a new instance of the AzureSqlProtectionPolicy class. /// - /// Number of items associated with - /// this policy. - /// ResourceGuard - /// Operation Requests - /// Retention policy details. - public AzureSqlProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), RetentionPolicy retentionPolicy = default(RetentionPolicy)) - : base(protectedItemsCount, resourceGuardOperationRequests) + + /// Number of items associated with this policy. + /// + + /// ResourceGuard Operation Requests + /// + + /// Retention policy details. + /// + public AzureSqlProtectionPolicy(int? protectedItemsCount = default(int?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), RetentionPolicy retentionPolicy = default(RetentionPolicy)) + + : base(protectedItemsCount, resourceGuardOperationRequests) { - RetentionPolicy = retentionPolicy; + this.RetentionPolicy = retentionPolicy; CustomInit(); } @@ -49,11 +46,11 @@ public AzureSqlProtectionPolicy() /// partial void CustomInit(); + /// /// Gets or sets retention policy details. /// - [JsonProperty(PropertyName = "retentionPolicy")] - public RetentionPolicy RetentionPolicy { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionPolicy")] + public RetentionPolicy RetentionPolicy {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageContainer.cs index 94caacbc496f..bda81c5b95da 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,35 +24,47 @@ public AzureStorageContainer() /// /// Initializes a new instance of the AzureStorageContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// Fully qualified ARM url. - /// Storage account - /// version. - /// Resource group name of Recovery - /// Services Vault. - /// Number of items backed up in this - /// container. - /// Whether storage account - /// lock is to be acquired for this container or not. Possible values - /// include: 'Acquire', 'NotAcquire' + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// Fully qualified ARM url. + /// + + /// Storage account version. + /// + + /// Resource group name of Recovery Services Vault. + /// + + /// Number of items backed up in this container. + /// + + /// Whether storage account lock is to be acquired for this container or not. + /// Possible values include: 'Acquire', 'NotAcquire' public AzureStorageContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), string sourceResourceId = default(string), string storageAccountVersion = default(string), string resourceGroup = default(string), long? protectedItemCount = default(long?), string acquireStorageAccountLock = default(string)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) { - SourceResourceId = sourceResourceId; - StorageAccountVersion = storageAccountVersion; - ResourceGroup = resourceGroup; - ProtectedItemCount = protectedItemCount; - AcquireStorageAccountLock = acquireStorageAccountLock; + this.SourceResourceId = sourceResourceId; + this.StorageAccountVersion = storageAccountVersion; + this.ResourceGroup = resourceGroup; + this.ProtectedItemCount = protectedItemCount; + this.AcquireStorageAccountLock = acquireStorageAccountLock; CustomInit(); } @@ -67,37 +73,36 @@ public AzureStorageContainer() /// partial void CustomInit(); + /// /// Gets or sets fully qualified ARM url. /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// /// Gets or sets storage account version. /// - [JsonProperty(PropertyName = "storageAccountVersion")] - public string StorageAccountVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountVersion")] + public string StorageAccountVersion {get; set; } /// /// Gets or sets resource group name of Recovery Services Vault. /// - [JsonProperty(PropertyName = "resourceGroup")] - public string ResourceGroup { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGroup")] + public string ResourceGroup {get; set; } /// /// Gets or sets number of items backed up in this container. /// - [JsonProperty(PropertyName = "protectedItemCount")] - public long? ProtectedItemCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemCount")] + public long? ProtectedItemCount {get; set; } /// - /// Gets or sets whether storage account lock is to be acquired for - /// this container or not. Possible values include: 'Acquire', - /// 'NotAcquire' + /// Gets or sets whether storage account lock is to be acquired for this + /// container or not. Possible values include: 'Acquire', 'NotAcquire' /// - [JsonProperty(PropertyName = "acquireStorageAccountLock")] - public string AcquireStorageAccountLock { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "acquireStorageAccountLock")] + public string AcquireStorageAccountLock {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageErrorInfo.cs index cb66af545314..dd10e784ddf9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public AzureStorageErrorInfo() /// /// Initializes a new instance of the AzureStorageErrorInfo class. /// - /// Error code. - /// Localized error string. - /// List of localized recommendations for - /// above error code. - public AzureStorageErrorInfo(int? errorCode = default(int?), string errorString = default(string), IList recommendations = default(IList)) + + /// Error code. + /// + + /// Localized error string. + /// + + /// List of localized recommendations for above error code. + /// + public AzureStorageErrorInfo(int? errorCode = default(int?), string errorString = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - ErrorCode = errorCode; - ErrorString = errorString; - Recommendations = recommendations; + this.ErrorCode = errorCode; + this.ErrorString = errorString; + this.Recommendations = recommendations; CustomInit(); } @@ -48,24 +46,23 @@ public AzureStorageErrorInfo() /// partial void CustomInit(); + /// /// Gets or sets error code. /// - [JsonProperty(PropertyName = "errorCode")] - public int? ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode {get; set; } /// /// Gets or sets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; set; } /// - /// Gets or sets list of localized recommendations for above error - /// code. + /// Gets or sets list of localized recommendations for above error code. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJob.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJob.cs index 815c5398c2de..b9e2273c25b6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,42 +24,62 @@ public AzureStorageJob() /// /// Initializes a new instance of the AzureStorageJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Time elapsed during the execution of this - /// job. - /// Gets or sets the state/actions applicable - /// on this job like cancel/retry. - /// Error details on execution of this - /// job. - /// Specifies friendly name of the - /// storage account. - /// Specifies whether the Storage - /// account is a Classic or an Azure Resource Manager Storage - /// account. - /// Additional information about the - /// job. - /// Indicated that whether the job is - /// adhoc(true) or scheduled(false) - public AzureStorageJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), IList errorDetails = default(IList), string storageAccountName = default(string), string storageAccountVersion = default(string), AzureStorageJobExtendedInfo extendedInfo = default(AzureStorageJobExtendedInfo), bool? isUserTriggered = default(bool?)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Time elapsed during the execution of this job. + /// + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + /// + + /// Error details on execution of this job. + /// + + /// Specifies friendly name of the storage account. + /// + + /// Specifies whether the Storage account is a Classic or an Azure Resource + /// Manager Storage account. + /// + + /// Additional information about the job. + /// + + /// Indicated that whether the job is adhoc(true) or scheduled(false) + /// + public AzureStorageJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), string storageAccountName = default(string), string storageAccountVersion = default(string), AzureStorageJobExtendedInfo extendedInfo = default(AzureStorageJobExtendedInfo), bool? isUserTriggered = default(bool?)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - Duration = duration; - ActionsInfo = actionsInfo; - ErrorDetails = errorDetails; - StorageAccountName = storageAccountName; - StorageAccountVersion = storageAccountVersion; - ExtendedInfo = extendedInfo; - IsUserTriggered = isUserTriggered; + this.Duration = duration; + this.ActionsInfo = actionsInfo; + this.ErrorDetails = errorDetails; + this.StorageAccountName = storageAccountName; + this.StorageAccountVersion = storageAccountVersion; + this.ExtendedInfo = extendedInfo; + this.IsUserTriggered = isUserTriggered; CustomInit(); } @@ -76,50 +88,50 @@ public AzureStorageJob() /// partial void CustomInit(); + /// /// Gets or sets time elapsed during the execution of this job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets the state/actions applicable on this job like + /// Gets or sets gets or sets the state/actions applicable on this job like /// cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets error details on execution of this job. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// /// Gets or sets specifies friendly name of the storage account. /// - [JsonProperty(PropertyName = "storageAccountName")] - public string StorageAccountName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountName")] + public string StorageAccountName {get; set; } /// - /// Gets or sets specifies whether the Storage account is a Classic or - /// an Azure Resource Manager Storage account. + /// Gets or sets specifies whether the Storage account is a Classic or an Azure + /// Resource Manager Storage account. /// - [JsonProperty(PropertyName = "storageAccountVersion")] - public string StorageAccountVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountVersion")] + public string StorageAccountVersion {get; set; } /// /// Gets or sets additional information about the job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureStorageJobExtendedInfo ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureStorageJobExtendedInfo ExtendedInfo {get; set; } /// /// Gets or sets indicated that whether the job is adhoc(true) or /// scheduled(false) /// - [JsonProperty(PropertyName = "isUserTriggered")] - public bool? IsUserTriggered { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isUserTriggered")] + public bool? IsUserTriggered {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJobExtendedInfo.cs index 7208ac165acd..ada5da999a95 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureStorageJobExtendedInfo { /// - /// Initializes a new instance of the AzureStorageJobExtendedInfo - /// class. + /// Initializes a new instance of the AzureStorageJobExtendedInfo class. /// public AzureStorageJobExtendedInfo() { @@ -30,18 +21,23 @@ public AzureStorageJobExtendedInfo() } /// - /// Initializes a new instance of the AzureStorageJobExtendedInfo - /// class. + /// Initializes a new instance of the AzureStorageJobExtendedInfo class. /// - /// List of tasks for this job - /// Job properties. - /// Non localized error message on - /// job execution. - public AzureStorageJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), string dynamicErrorMessage = default(string)) + + /// List of tasks for this job + /// + + /// Job properties. + /// + + /// Non localized error message on job execution. + /// + public AzureStorageJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -50,23 +46,23 @@ public AzureStorageJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks for this job /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets non localized error message on job execution. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJobTaskDetails.cs index 4362fdd5974a..41475c738ce2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public AzureStorageJobTaskDetails() /// /// Initializes a new instance of the AzureStorageJobTaskDetails class. /// - /// The task display name. - /// The status. + + /// The task display name. + /// + + /// The status. + /// public AzureStorageJobTaskDetails(string taskId = default(string), string status = default(string)) + { - TaskId = taskId; - Status = status; + this.TaskId = taskId; + this.Status = status; CustomInit(); } @@ -43,17 +42,17 @@ public AzureStorageJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageProtectableContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageProtectableContainer.cs index f728c8327b63..81d6030f385d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageProtectableContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureStorageProtectableContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureStorageProtectableContainer : ProtectableContainer { /// - /// Initializes a new instance of the AzureStorageProtectableContainer - /// class. + /// Initializes a new instance of the AzureStorageProtectableContainer class. /// public AzureStorageProtectableContainer() { @@ -29,20 +22,25 @@ public AzureStorageProtectableContainer() } /// - /// Initializes a new instance of the AzureStorageProtectableContainer - /// class. + /// Initializes a new instance of the AzureStorageProtectableContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of health of the - /// container. - /// Fabric Id of the container such as ARM - /// Id. + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of health of the container. + /// + + /// Fabric Id of the container such as ARM Id. + /// public AzureStorageProtectableContainer(string friendlyName = default(string), string backupManagementType = default(string), string healthStatus = default(string), string containerId = default(string)) - : base(friendlyName, backupManagementType, healthStatus, containerId) + + : base(friendlyName, backupManagementType, healthStatus, containerId) { CustomInit(); } @@ -53,4 +51,4 @@ public AzureStorageProtectableContainer() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMAppContainerProtectableContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMAppContainerProtectableContainer.cs index b1d83818ece0..af5e6f8b7ac5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMAppContainerProtectableContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMAppContainerProtectableContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVMAppContainerProtectableContainer : ProtectableContainer { /// - /// Initializes a new instance of the - /// AzureVMAppContainerProtectableContainer class. + /// Initializes a new instance of the AzureVMAppContainerProtectableContainer class. /// public AzureVMAppContainerProtectableContainer() { @@ -29,20 +22,25 @@ public AzureVMAppContainerProtectableContainer() } /// - /// Initializes a new instance of the - /// AzureVMAppContainerProtectableContainer class. + /// Initializes a new instance of the AzureVMAppContainerProtectableContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of health of the - /// container. - /// Fabric Id of the container such as ARM - /// Id. + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of health of the container. + /// + + /// Fabric Id of the container such as ARM Id. + /// public AzureVMAppContainerProtectableContainer(string friendlyName = default(string), string backupManagementType = default(string), string healthStatus = default(string), string containerId = default(string)) - : base(friendlyName, backupManagementType, healthStatus, containerId) + + : base(friendlyName, backupManagementType, healthStatus, containerId) { CustomInit(); } @@ -53,4 +51,4 @@ public AzureVMAppContainerProtectableContainer() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMAppContainerProtectionContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMAppContainerProtectionContainer.cs index f832b9c6e721..563e0ca9d796 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMAppContainerProtectionContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMAppContainerProtectionContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVMAppContainerProtectionContainer : AzureWorkloadContainer { /// - /// Initializes a new instance of the - /// AzureVMAppContainerProtectionContainer class. + /// Initializes a new instance of the AzureVMAppContainerProtectionContainer class. /// public AzureVMAppContainerProtectionContainer() { @@ -29,36 +22,46 @@ public AzureVMAppContainerProtectionContainer() } /// - /// Initializes a new instance of the - /// AzureVMAppContainerProtectionContainer class. + /// Initializes a new instance of the AzureVMAppContainerProtectionContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// ARM ID of the virtual machine - /// represented by this Azure Workload Container - /// Time stamp when this container was - /// updated. - /// Additional details of a workload - /// container. - /// Workload type for which registration was - /// sent. Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Re-Do Operation. Possible values - /// include: 'Invalid', 'Register', 'Reregister' + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// ARM ID of the virtual machine represented by this Azure Workload Container + /// + + /// Time stamp when this container was updated. + /// + + /// Additional details of a workload container. + /// + + /// Workload type for which registration was sent. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Re-Do Operation + /// Possible values include: 'Invalid', 'Register', 'Reregister' public AzureVMAppContainerProtectionContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), string sourceResourceId = default(string), System.DateTime? lastUpdatedTime = default(System.DateTime?), AzureWorkloadContainerExtendedInfo extendedInfo = default(AzureWorkloadContainerExtendedInfo), string workloadType = default(string), string operationType = default(string)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, sourceResourceId, lastUpdatedTime, extendedInfo, workloadType, operationType) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType, sourceResourceId, lastUpdatedTime, extendedInfo, workloadType, operationType) { CustomInit(); } @@ -69,4 +72,4 @@ public AzureVMAppContainerProtectionContainer() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMResourceFeatureSupportRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMResourceFeatureSupportRequest.cs index 368377745350..5ca090afb157 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMResourceFeatureSupportRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMResourceFeatureSupportRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVMResourceFeatureSupportRequest : FeatureSupportRequest { /// - /// Initializes a new instance of the - /// AzureVMResourceFeatureSupportRequest class. + /// Initializes a new instance of the AzureVMResourceFeatureSupportRequest class. /// public AzureVMResourceFeatureSupportRequest() { @@ -29,17 +22,19 @@ public AzureVMResourceFeatureSupportRequest() } /// - /// Initializes a new instance of the - /// AzureVMResourceFeatureSupportRequest class. + /// Initializes a new instance of the AzureVMResourceFeatureSupportRequest class. /// - /// Size of the resource: VM size(A/D series etc) - /// in case of IaasVM - /// SKUs (Premium/Managed etc) in case of - /// IaasVM + + /// Size of the resource: VM size(A/D series etc) in case of IaasVM + /// + + /// SKUs (Premium/Managed etc) in case of IaasVM + /// public AzureVMResourceFeatureSupportRequest(string vmSize = default(string), string vmSku = default(string)) + { - VmSize = vmSize; - VmSku = vmSku; + this.VMSize = vmSize; + this.VMSku = vmSku; CustomInit(); } @@ -48,18 +43,18 @@ public AzureVMResourceFeatureSupportRequest() /// partial void CustomInit(); + /// - /// Gets or sets size of the resource: VM size(A/D series etc) in case - /// of IaasVM + /// Gets or sets size of the resource: VM size(A/D series etc) in case of + /// IaasVM /// - [JsonProperty(PropertyName = "vmSize")] - public string VmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmSize")] + public string VMSize {get; set; } /// /// Gets or sets sKUs (Premium/Managed etc) in case of IaasVM /// - [JsonProperty(PropertyName = "vmSku")] - public string VmSku { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vmSku")] + public string VMSku {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMResourceFeatureSupportResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMResourceFeatureSupportResponse.cs index a41ec93d4ceb..34c92139e886 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMResourceFeatureSupportResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVMResourceFeatureSupportResponse.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVMResourceFeatureSupportResponse { /// - /// Initializes a new instance of the - /// AzureVMResourceFeatureSupportResponse class. + /// Initializes a new instance of the AzureVMResourceFeatureSupportResponse class. /// public AzureVMResourceFeatureSupportResponse() { @@ -28,15 +21,16 @@ public AzureVMResourceFeatureSupportResponse() } /// - /// Initializes a new instance of the - /// AzureVMResourceFeatureSupportResponse class. + /// Initializes a new instance of the AzureVMResourceFeatureSupportResponse class. /// - /// Support status of feature. Possible - /// values include: 'Invalid', 'Supported', 'DefaultOFF', 'DefaultON', + + /// Support status of feature + /// Possible values include: 'Invalid', 'Supported', 'DefaultOFF', 'DefaultON', /// 'NotSupported' public AzureVMResourceFeatureSupportResponse(string supportStatus = default(string)) + { - SupportStatus = supportStatus; + this.SupportStatus = supportStatus; CustomInit(); } @@ -45,12 +39,11 @@ public AzureVMResourceFeatureSupportResponse() /// partial void CustomInit(); + /// - /// Gets or sets support status of feature. Possible values include: - /// 'Invalid', 'Supported', 'DefaultOFF', 'DefaultON', 'NotSupported' + /// Gets or sets support status of feature Possible values include: 'Invalid', 'Supported', 'DefaultOFF', 'DefaultON', 'NotSupported' /// - [JsonProperty(PropertyName = "supportStatus")] - public string SupportStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "supportStatus")] + public string SupportStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadItem.cs index 2a57dd1722ab..ffd480186680 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,32 +24,43 @@ public AzureVmWorkloadItem() /// /// Initializes a new instance of the AzureVmWorkloadItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Host/Cluster Name for instance or - /// AG - /// Indicates if workload item is - /// auto-protectable - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected + + /// Name for instance or AG + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if workload item is auto-protectable + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// public AzureVmWorkloadItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), int? subinquireditemcount = default(int?), int? subWorkloadItemCount = default(int?)) - : base(backupManagementType, workloadType, friendlyName, protectionState) + + : base(backupManagementType, workloadType, friendlyName, protectionState) { - ParentName = parentName; - ServerName = serverName; - IsAutoProtectable = isAutoProtectable; - Subinquireditemcount = subinquireditemcount; - SubWorkloadItemCount = subWorkloadItemCount; + this.ParentName = parentName; + this.ServerName = serverName; + this.IsAutoProtectable = isAutoProtectable; + this.Subinquireditemcount = subinquireditemcount; + this.SubWorkloadItemCount = subWorkloadItemCount; CustomInit(); } @@ -64,36 +69,35 @@ public AzureVmWorkloadItem() /// partial void CustomInit(); + /// /// Gets or sets name for instance or AG /// - [JsonProperty(PropertyName = "parentName")] - public string ParentName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentName")] + public string ParentName {get; set; } /// /// Gets or sets host/Cluster Name for instance or AG /// - [JsonProperty(PropertyName = "serverName")] - public string ServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serverName")] + public string ServerName {get; set; } /// /// Gets or sets indicates if workload item is auto-protectable /// - [JsonProperty(PropertyName = "isAutoProtectable")] - public bool? IsAutoProtectable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isAutoProtectable")] + public bool? IsAutoProtectable {get; set; } /// - /// Gets or sets for instance or AG, indicates number of DB's present + /// Gets or sets for instance or AG, indicates number of DB's present /// - [JsonProperty(PropertyName = "subinquireditemcount")] - public int? Subinquireditemcount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subinquireditemcount")] + public int? Subinquireditemcount {get; set; } /// - /// Gets or sets for instance or AG, indicates number of DB's to be - /// protected + /// Gets or sets for instance or AG, indicates number of DB's to be protected /// - [JsonProperty(PropertyName = "subWorkloadItemCount")] - public int? SubWorkloadItemCount { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "subWorkloadItemCount")] + public int? SubWorkloadItemCount {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectableItem.cs index d6596f3f047d..4bc45ac4bfd7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectableItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadProtectableItem : WorkloadProtectableItem { /// - /// Initializes a new instance of the AzureVmWorkloadProtectableItem - /// class. + /// Initializes a new instance of the AzureVmWorkloadProtectableItem class. /// public AzureVmWorkloadProtectableItem() { @@ -29,46 +22,60 @@ public AzureVmWorkloadProtectableItem() } /// - /// Initializes a new instance of the AzureVmWorkloadProtectableItem - /// class. + /// Initializes a new instance of the AzureVmWorkloadProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Parent Unique Name is added to - /// provide the service formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. - /// Host/Cluster Name for instance or - /// AG - /// Indicates if protectable item is - /// auto-protectable - /// Indicates if protectable item is - /// auto-protected - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Pre-backup validation for - /// protectable objects + + /// Name for instance or AG + /// + + /// Parent Unique Name is added to provide the service formatted URI Name of + /// the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if protectable item is auto-protectable + /// + + /// Indicates if protectable item is auto-protected + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Pre-backup validation for protectable objects + /// public AzureVmWorkloadProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string parentUniqueName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), bool? isAutoProtected = default(bool?), int? subinquireditemcount = default(int?), int? subprotectableitemcount = default(int?), PreBackupValidation prebackupvalidation = default(PreBackupValidation)) - : base(backupManagementType, workloadType, friendlyName, protectionState) + + : base(backupManagementType, workloadType, friendlyName, protectionState) { - ParentName = parentName; - ParentUniqueName = parentUniqueName; - ServerName = serverName; - IsAutoProtectable = isAutoProtectable; - IsAutoProtected = isAutoProtected; - Subinquireditemcount = subinquireditemcount; - Subprotectableitemcount = subprotectableitemcount; - Prebackupvalidation = prebackupvalidation; + this.ParentName = parentName; + this.ParentUniqueName = parentUniqueName; + this.ServerName = serverName; + this.IsAutoProtectable = isAutoProtectable; + this.IsAutoProtected = isAutoProtected; + this.Subinquireditemcount = subinquireditemcount; + this.Subprotectableitemcount = subprotectableitemcount; + this.Prebackupvalidation = prebackupvalidation; CustomInit(); } @@ -77,57 +84,56 @@ public AzureVmWorkloadProtectableItem() /// partial void CustomInit(); + /// /// Gets or sets name for instance or AG /// - [JsonProperty(PropertyName = "parentName")] - public string ParentName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentName")] + public string ParentName {get; set; } /// - /// Gets or sets parent Unique Name is added to provide the service - /// formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. + /// Gets or sets parent Unique Name is added to provide the service formatted + /// URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. /// - [JsonProperty(PropertyName = "parentUniqueName")] - public string ParentUniqueName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentUniqueName")] + public string ParentUniqueName {get; set; } /// /// Gets or sets host/Cluster Name for instance or AG /// - [JsonProperty(PropertyName = "serverName")] - public string ServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serverName")] + public string ServerName {get; set; } /// /// Gets or sets indicates if protectable item is auto-protectable /// - [JsonProperty(PropertyName = "isAutoProtectable")] - public bool? IsAutoProtectable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isAutoProtectable")] + public bool? IsAutoProtectable {get; set; } /// /// Gets or sets indicates if protectable item is auto-protected /// - [JsonProperty(PropertyName = "isAutoProtected")] - public bool? IsAutoProtected { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isAutoProtected")] + public bool? IsAutoProtected {get; set; } /// - /// Gets or sets for instance or AG, indicates number of DB's present + /// Gets or sets for instance or AG, indicates number of DB's present /// - [JsonProperty(PropertyName = "subinquireditemcount")] - public int? Subinquireditemcount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subinquireditemcount")] + public int? Subinquireditemcount {get; set; } /// - /// Gets or sets for instance or AG, indicates number of DB's to be - /// protected + /// Gets or sets for instance or AG, indicates number of DB's to be protected /// - [JsonProperty(PropertyName = "subprotectableitemcount")] - public int? Subprotectableitemcount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subprotectableitemcount")] + public int? Subprotectableitemcount {get; set; } /// /// Gets or sets pre-backup validation for protectable objects /// - [JsonProperty(PropertyName = "prebackupvalidation")] - public PreBackupValidation Prebackupvalidation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "prebackupvalidation")] + public PreBackupValidation Prebackupvalidation {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItem.cs index 6fc4d724aee3..efbc92a5db75 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadProtectedItem : ProtectedItem { /// - /// Initializes a new instance of the AzureVmWorkloadProtectedItem - /// class. + /// Initializes a new instance of the AzureVmWorkloadProtectedItem class. /// public AzureVmWorkloadProtectedItem() { @@ -31,96 +22,128 @@ public AzureVmWorkloadProtectedItem() } /// - /// Initializes a new instance of the AzureVmWorkloadProtectedItem - /// class. + /// Initializes a new instance of the AzureVmWorkloadProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the DB represented by - /// this backup item. - /// Host/Cluster Name for instance or - /// AG - /// Parent name of the DB such as Instance or - /// Availability Group. - /// Parent type of protected item, example: - /// for a DB, standalone server or distributed - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the DB represented by this backup item. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Parent name of the DB such as Instance or Availability Group. + /// + + /// Parent type of protected item, example: for a DB, standalone server or + /// distributed + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. Possible values include: - /// 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' - /// Timestamp of the last backup operation - /// on this backup item. - /// Error details in last - /// backup - /// Data ID of the protected - /// item. - /// Health status of the backup - /// item, evaluated based on last heartbeat received. Possible values - /// include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Error details in last backup + /// + + /// Data ID of the protected item. + /// + + /// Health status of the backup item, evaluated based on last heartbeat + /// received + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', /// 'IRPending' - /// Additional information for this backup - /// item. - /// Health details of different KPIs - public AzureVmWorkloadProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) + + /// Additional information for this backup item. + /// + + /// Health details of different KPIs + /// + public AzureVmWorkloadProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) { - FriendlyName = friendlyName; - ServerName = serverName; - ParentName = parentName; - ParentType = parentType; - ProtectionStatus = protectionStatus; - ProtectionState = protectionState; - LastBackupStatus = lastBackupStatus; - LastBackupTime = lastBackupTime; - LastBackupErrorDetail = lastBackupErrorDetail; - ProtectedItemDataSourceId = protectedItemDataSourceId; - ProtectedItemHealthStatus = protectedItemHealthStatus; - ExtendedInfo = extendedInfo; - KpisHealths = kpisHealths; + this.FriendlyName = friendlyName; + this.ServerName = serverName; + this.ParentName = parentName; + this.ParentType = parentType; + this.ProtectionStatus = protectionStatus; + this.ProtectionState = protectionState; + this.LastBackupStatus = lastBackupStatus; + this.LastBackupTime = lastBackupTime; + this.LastBackupErrorDetail = lastBackupErrorDetail; + this.ProtectedItemDataSourceId = protectedItemDataSourceId; + this.ProtectedItemHealthStatus = protectedItemHealthStatus; + this.ExtendedInfo = extendedInfo; + this.KpisHealths = kpisHealths; CustomInit(); } @@ -129,92 +152,86 @@ public AzureVmWorkloadProtectedItem() /// partial void CustomInit(); + /// /// Gets friendly name of the DB represented by this backup item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; private set; } /// /// Gets or sets host/Cluster Name for instance or AG /// - [JsonProperty(PropertyName = "serverName")] - public string ServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serverName")] + public string ServerName {get; set; } /// - /// Gets or sets parent name of the DB such as Instance or Availability - /// Group. + /// Gets or sets parent name of the DB such as Instance or Availability Group. /// - [JsonProperty(PropertyName = "parentName")] - public string ParentName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentName")] + public string ParentName {get; set; } /// - /// Gets or sets parent type of protected item, example: for a DB, - /// standalone server or distributed + /// Gets or sets parent type of protected item, example: for a DB, standalone + /// server or distributed /// - [JsonProperty(PropertyName = "parentType")] - public string ParentType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentType")] + public string ParentType {get; set; } /// /// Gets backup status of this backup item. /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; private set; } /// - /// Gets or sets backup state of this backup item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' + /// Gets or sets backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// - /// Gets or sets last backup operation status. Possible values: - /// Healthy, Unhealthy. Possible values include: 'Invalid', 'Healthy', - /// 'Unhealthy', 'IRPending' + /// Gets or sets last backup operation status. Possible values: Healthy, + /// Unhealthy. Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// - /// Gets or sets timestamp of the last backup operation on this backup - /// item. + /// Gets or sets timestamp of the last backup operation on this backup item. /// - [JsonProperty(PropertyName = "lastBackupTime")] - public System.DateTime? LastBackupTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupTime")] + public System.DateTime? LastBackupTime {get; set; } /// /// Gets or sets error details in last backup /// - [JsonProperty(PropertyName = "lastBackupErrorDetail")] - public ErrorDetail LastBackupErrorDetail { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupErrorDetail")] + public ErrorDetail LastBackupErrorDetail {get; set; } /// /// Gets or sets data ID of the protected item. /// - [JsonProperty(PropertyName = "protectedItemDataSourceId")] - public string ProtectedItemDataSourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemDataSourceId")] + public string ProtectedItemDataSourceId {get; set; } /// - /// Gets or sets health status of the backup item, evaluated based on - /// last heartbeat received. Possible values include: 'Invalid', - /// 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' + /// Gets or sets health status of the backup item, evaluated based on last + /// heartbeat received Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', 'IRPending' /// - [JsonProperty(PropertyName = "protectedItemHealthStatus")] - public string ProtectedItemHealthStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemHealthStatus")] + public string ProtectedItemHealthStatus {get; set; } /// /// Gets or sets additional information for this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureVmWorkloadProtectedItemExtendedInfo ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureVmWorkloadProtectedItemExtendedInfo ExtendedInfo {get; set; } /// /// Gets or sets health details of different KPIs /// - [JsonProperty(PropertyName = "kpisHealths")] - public IDictionary KpisHealths { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "kpisHealths")] + public System.Collections.Generic.IDictionary KpisHealths {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs index 9d462a9e732b..667672a3597e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadProtectedItemExtendedInfo { /// - /// Initializes a new instance of the - /// AzureVmWorkloadProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureVmWorkloadProtectedItemExtendedInfo class. /// public AzureVmWorkloadProtectedItemExtendedInfo() { @@ -28,32 +21,41 @@ public AzureVmWorkloadProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadProtectedItemExtendedInfo class. + /// Initializes a new instance of the AzureVmWorkloadProtectedItemExtendedInfo class. /// - /// The oldest backup copy available - /// for this backup item across all tiers. - /// The oldest backup copy - /// available for this backup item in vault tier - /// The oldest backup copy - /// available for this backup item in archive tier - /// The latest backup copy - /// available for this backup item in archive tier - /// Number of backup copies available - /// for this backup item. - /// Indicates consistency of policy object - /// and policy applied to this backup item. - /// Indicates consistency of policy object - /// and policy applied to this backup item. + + /// The oldest backup copy available for this backup item across all tiers. + /// + + /// The oldest backup copy available for this backup item in vault tier + /// + + /// The oldest backup copy available for this backup item in archive tier + /// + + /// The latest backup copy available for this backup item in archive tier + /// + + /// Number of backup copies available for this backup item. + /// + + /// Indicates consistency of policy object and policy applied to this backup + /// item. + /// + + /// Indicates consistency of policy object and policy applied to this backup + /// item. + /// public AzureVmWorkloadProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), System.DateTime? oldestRecoveryPointInVault = default(System.DateTime?), System.DateTime? oldestRecoveryPointInArchive = default(System.DateTime?), System.DateTime? newestRecoveryPointInArchive = default(System.DateTime?), int? recoveryPointCount = default(int?), string policyState = default(string), string recoveryModel = default(string)) + { - OldestRecoveryPoint = oldestRecoveryPoint; - OldestRecoveryPointInVault = oldestRecoveryPointInVault; - OldestRecoveryPointInArchive = oldestRecoveryPointInArchive; - NewestRecoveryPointInArchive = newestRecoveryPointInArchive; - RecoveryPointCount = recoveryPointCount; - PolicyState = policyState; - RecoveryModel = recoveryModel; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.OldestRecoveryPointInVault = oldestRecoveryPointInVault; + this.OldestRecoveryPointInArchive = oldestRecoveryPointInArchive; + this.NewestRecoveryPointInArchive = newestRecoveryPointInArchive; + this.RecoveryPointCount = recoveryPointCount; + this.PolicyState = policyState; + this.RecoveryModel = recoveryModel; CustomInit(); } @@ -62,54 +64,53 @@ public AzureVmWorkloadProtectedItemExtendedInfo() /// partial void CustomInit(); + /// - /// Gets or sets the oldest backup copy available for this backup item - /// across all tiers. + /// Gets or sets the oldest backup copy available for this backup item across + /// all tiers. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets the oldest backup copy available for this backup item - /// in vault tier + /// Gets or sets the oldest backup copy available for this backup item in vault + /// tier /// - [JsonProperty(PropertyName = "oldestRecoveryPointInVault")] - public System.DateTime? OldestRecoveryPointInVault { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPointInVault")] + public System.DateTime? OldestRecoveryPointInVault {get; set; } /// - /// Gets or sets the oldest backup copy available for this backup item - /// in archive tier + /// Gets or sets the oldest backup copy available for this backup item in + /// archive tier /// - [JsonProperty(PropertyName = "oldestRecoveryPointInArchive")] - public System.DateTime? OldestRecoveryPointInArchive { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPointInArchive")] + public System.DateTime? OldestRecoveryPointInArchive {get; set; } /// - /// Gets or sets the latest backup copy available for this backup item - /// in archive tier + /// Gets or sets the latest backup copy available for this backup item in + /// archive tier /// - [JsonProperty(PropertyName = "newestRecoveryPointInArchive")] - public System.DateTime? NewestRecoveryPointInArchive { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "newestRecoveryPointInArchive")] + public System.DateTime? NewestRecoveryPointInArchive {get; set; } /// - /// Gets or sets number of backup copies available for this backup - /// item. + /// Gets or sets number of backup copies available for this backup item. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } /// - /// Gets or sets indicates consistency of policy object and policy - /// applied to this backup item. + /// Gets or sets indicates consistency of policy object and policy applied to + /// this backup item. /// - [JsonProperty(PropertyName = "policyState")] - public string PolicyState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyState")] + public string PolicyState {get; set; } /// - /// Gets or sets indicates consistency of policy object and policy - /// applied to this backup item. + /// Gets or sets indicates consistency of policy object and policy applied to + /// this backup item. /// - [JsonProperty(PropertyName = "recoveryModel")] - public string RecoveryModel { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryModel")] + public string RecoveryModel {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectionPolicy.cs index 494e75d2de42..385fa6424079 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadProtectionPolicy.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadProtectionPolicy : ProtectionPolicy { /// - /// Initializes a new instance of the AzureVmWorkloadProtectionPolicy - /// class. + /// Initializes a new instance of the AzureVmWorkloadProtectionPolicy class. /// public AzureVmWorkloadProtectionPolicy() { @@ -31,32 +22,37 @@ public AzureVmWorkloadProtectionPolicy() } /// - /// Initializes a new instance of the AzureVmWorkloadProtectionPolicy - /// class. + /// Initializes a new instance of the AzureVmWorkloadProtectionPolicy class. /// - /// Number of items associated with - /// this policy. - /// ResourceGuard - /// Operation Requests - /// Type of workload for the backup - /// management. Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Common settings for the backup - /// management - /// List of sub-protection policies - /// which includes schedule and retention - /// Fix the policy - /// inconsistency - public AzureVmWorkloadProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), string workLoadType = default(string), Settings settings = default(Settings), IList subProtectionPolicy = default(IList), bool? makePolicyConsistent = default(bool?)) - : base(protectedItemsCount, resourceGuardOperationRequests) + + /// Number of items associated with this policy. + /// + + /// ResourceGuard Operation Requests + /// + + /// Type of workload for the backup management + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Common settings for the backup management + /// + + /// List of sub-protection policies which includes schedule and retention + /// + + /// Fix the policy inconsistency + /// + public AzureVmWorkloadProtectionPolicy(int? protectedItemsCount = default(int?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string workLoadType = default(string), Settings settings = default(Settings), System.Collections.Generic.IList subProtectionPolicy = default(System.Collections.Generic.IList), bool? makePolicyConsistent = default(bool?)) + + : base(protectedItemsCount, resourceGuardOperationRequests) { - WorkLoadType = workLoadType; - Settings = settings; - SubProtectionPolicy = subProtectionPolicy; - MakePolicyConsistent = makePolicyConsistent; + this.WorkLoadType = workLoadType; + this.Settings = settings; + this.SubProtectionPolicy = subProtectionPolicy; + this.MakePolicyConsistent = makePolicyConsistent; CustomInit(); } @@ -65,34 +61,30 @@ public AzureVmWorkloadProtectionPolicy() /// partial void CustomInit(); + /// - /// Gets or sets type of workload for the backup management. Possible - /// values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', - /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', - /// 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets or sets type of workload for the backup management Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workLoadType")] - public string WorkLoadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workLoadType")] + public string WorkLoadType {get; set; } /// /// Gets or sets common settings for the backup management /// - [JsonProperty(PropertyName = "settings")] - public Settings Settings { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "settings")] + public Settings Settings {get; set; } /// - /// Gets or sets list of sub-protection policies which includes - /// schedule and retention + /// Gets or sets list of sub-protection policies which includes schedule and + /// retention /// - [JsonProperty(PropertyName = "subProtectionPolicy")] - public IList SubProtectionPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subProtectionPolicy")] + public System.Collections.Generic.IList SubProtectionPolicy {get; set; } /// /// Gets or sets fix the policy inconsistency /// - [JsonProperty(PropertyName = "makePolicyConsistent")] - public bool? MakePolicyConsistent { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "makePolicyConsistent")] + public bool? MakePolicyConsistent {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs index 83a65b03fc5d..b42b5c8fe718 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs @@ -1,30 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Azure VM workload-specific protected item representing SAP ASE - /// Database. + /// Azure VM workload-specific protected item representing SAP ASE Database. /// [Newtonsoft.Json.JsonObject("AzureVmWorkloadSAPAseDatabase")] public partial class AzureVmWorkloadSAPAseDatabaseProtectedItem : AzureVmWorkloadProtectedItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseDatabaseProtectedItem class. /// public AzureVmWorkloadSAPAseDatabaseProtectedItem() { @@ -32,82 +22,114 @@ public AzureVmWorkloadSAPAseDatabaseProtectedItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseDatabaseProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the DB represented by - /// this backup item. - /// Host/Cluster Name for instance or - /// AG - /// Parent name of the DB such as Instance or - /// Availability Group. - /// Parent type of protected item, example: - /// for a DB, standalone server or distributed - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the DB represented by this backup item. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Parent name of the DB such as Instance or Availability Group. + /// + + /// Parent type of protected item, example: for a DB, standalone server or + /// distributed + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. Possible values include: - /// 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' - /// Timestamp of the last backup operation - /// on this backup item. - /// Error details in last - /// backup - /// Data ID of the protected - /// item. - /// Health status of the backup - /// item, evaluated based on last heartbeat received. Possible values - /// include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Error details in last backup + /// + + /// Data ID of the protected item. + /// + + /// Health status of the backup item, evaluated based on last heartbeat + /// received + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', /// 'IRPending' - /// Additional information for this backup - /// item. - /// Health details of different KPIs - public AzureVmWorkloadSAPAseDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + + /// Additional information for this backup item. + /// + + /// Health details of different KPIs + /// + public AzureVmWorkloadSAPAseDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } @@ -118,4 +140,4 @@ public AzureVmWorkloadSAPAseDatabaseProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseWorkloadItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseWorkloadItem.cs index 1a35ce0e7214..40212c0d1713 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseWorkloadItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseDatabaseWorkloadItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadSAPAseDatabaseWorkloadItem : AzureVmWorkloadItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseDatabaseWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseDatabaseWorkloadItem class. /// public AzureVmWorkloadSAPAseDatabaseWorkloadItem() { @@ -29,29 +22,39 @@ public AzureVmWorkloadSAPAseDatabaseWorkloadItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseDatabaseWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseDatabaseWorkloadItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Host/Cluster Name for instance or - /// AG - /// Indicates if workload item is - /// auto-protectable - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected + + /// Name for instance or AG + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if workload item is auto-protectable + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// public AzureVmWorkloadSAPAseDatabaseWorkloadItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), int? subinquireditemcount = default(int?), int? subWorkloadItemCount = default(int?)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) { CustomInit(); } @@ -62,4 +65,4 @@ public AzureVmWorkloadSAPAseDatabaseWorkloadItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseSystemProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseSystemProtectableItem.cs index 1d5dad84d85a..4b2062eee8db 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseSystemProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseSystemProtectableItem.cs @@ -1,28 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Azure VM workload-specific protectable item representing SAP ASE - /// System. + /// Azure VM workload-specific protectable item representing SAP ASE System. /// [Newtonsoft.Json.JsonObject("SAPAseSystem")] public partial class AzureVmWorkloadSAPAseSystemProtectableItem : AzureVmWorkloadProtectableItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseSystemProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseSystemProtectableItem class. /// public AzureVmWorkloadSAPAseSystemProtectableItem() { @@ -30,37 +22,51 @@ public AzureVmWorkloadSAPAseSystemProtectableItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseSystemProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseSystemProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Parent Unique Name is added to - /// provide the service formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. - /// Host/Cluster Name for instance or - /// AG - /// Indicates if protectable item is - /// auto-protectable - /// Indicates if protectable item is - /// auto-protected - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Pre-backup validation for - /// protectable objects + + /// Name for instance or AG + /// + + /// Parent Unique Name is added to provide the service formatted URI Name of + /// the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if protectable item is auto-protectable + /// + + /// Indicates if protectable item is auto-protected + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Pre-backup validation for protectable objects + /// public AzureVmWorkloadSAPAseSystemProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string parentUniqueName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), bool? isAutoProtected = default(bool?), int? subinquireditemcount = default(int?), int? subprotectableitemcount = default(int?), PreBackupValidation prebackupvalidation = default(PreBackupValidation)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) { CustomInit(); } @@ -71,4 +77,4 @@ public AzureVmWorkloadSAPAseSystemProtectableItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseSystemWorkloadItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseSystemWorkloadItem.cs index 10c729fb6b59..22917427ad29 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseSystemWorkloadItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPAseSystemWorkloadItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadSAPAseSystemWorkloadItem : AzureVmWorkloadItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseSystemWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseSystemWorkloadItem class. /// public AzureVmWorkloadSAPAseSystemWorkloadItem() { @@ -29,29 +22,39 @@ public AzureVmWorkloadSAPAseSystemWorkloadItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPAseSystemWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPAseSystemWorkloadItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Host/Cluster Name for instance or - /// AG - /// Indicates if workload item is - /// auto-protectable - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected + + /// Name for instance or AG + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if workload item is auto-protectable + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// public AzureVmWorkloadSAPAseSystemWorkloadItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), int? subinquireditemcount = default(int?), int? subWorkloadItemCount = default(int?)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) { CustomInit(); } @@ -62,4 +65,4 @@ public AzureVmWorkloadSAPAseSystemWorkloadItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDBInstance.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDBInstance.cs index c47ea6435a93..059c896e8fd7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDBInstance.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDBInstance.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadSAPHanaDBInstance : AzureVmWorkloadProtectableItem { /// - /// Initializes a new instance of the AzureVmWorkloadSAPHanaDBInstance - /// class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDBInstance class. /// public AzureVmWorkloadSAPHanaDBInstance() { @@ -30,37 +23,51 @@ public AzureVmWorkloadSAPHanaDBInstance() } /// - /// Initializes a new instance of the AzureVmWorkloadSAPHanaDBInstance - /// class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDBInstance class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Parent Unique Name is added to - /// provide the service formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. - /// Host/Cluster Name for instance or - /// AG - /// Indicates if protectable item is - /// auto-protectable - /// Indicates if protectable item is - /// auto-protected - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Pre-backup validation for - /// protectable objects + + /// Name for instance or AG + /// + + /// Parent Unique Name is added to provide the service formatted URI Name of + /// the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if protectable item is auto-protectable + /// + + /// Indicates if protectable item is auto-protected + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Pre-backup validation for protectable objects + /// public AzureVmWorkloadSAPHanaDBInstance(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string parentUniqueName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), bool? isAutoProtected = default(bool?), int? subinquireditemcount = default(int?), int? subprotectableitemcount = default(int?), PreBackupValidation prebackupvalidation = default(PreBackupValidation)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) { CustomInit(); } @@ -71,4 +78,4 @@ public AzureVmWorkloadSAPHanaDBInstance() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDBInstanceProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDBInstanceProtectedItem.cs index ea793fa9a997..fa3774f61366 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDBInstanceProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDBInstanceProtectedItem.cs @@ -1,30 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Azure VM workload-specific protected item representing SAP HANA - /// DBInstance. + /// Azure VM workload-specific protected item representing SAP HANA DBInstance. /// [Newtonsoft.Json.JsonObject("AzureVmWorkloadSAPHanaDBInstance")] public partial class AzureVmWorkloadSAPHanaDBInstanceProtectedItem : AzureVmWorkloadProtectedItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDBInstanceProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDBInstanceProtectedItem class. /// public AzureVmWorkloadSAPHanaDBInstanceProtectedItem() { @@ -32,82 +22,114 @@ public AzureVmWorkloadSAPHanaDBInstanceProtectedItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDBInstanceProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDBInstanceProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the DB represented by - /// this backup item. - /// Host/Cluster Name for instance or - /// AG - /// Parent name of the DB such as Instance or - /// Availability Group. - /// Parent type of protected item, example: - /// for a DB, standalone server or distributed - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the DB represented by this backup item. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Parent name of the DB such as Instance or Availability Group. + /// + + /// Parent type of protected item, example: for a DB, standalone server or + /// distributed + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. Possible values include: - /// 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' - /// Timestamp of the last backup operation - /// on this backup item. - /// Error details in last - /// backup - /// Data ID of the protected - /// item. - /// Health status of the backup - /// item, evaluated based on last heartbeat received. Possible values - /// include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Error details in last backup + /// + + /// Data ID of the protected item. + /// + + /// Health status of the backup item, evaluated based on last heartbeat + /// received + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', /// 'IRPending' - /// Additional information for this backup - /// item. - /// Health details of different KPIs - public AzureVmWorkloadSAPHanaDBInstanceProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + + /// Additional information for this backup item. + /// + + /// Health details of different KPIs + /// + public AzureVmWorkloadSAPHanaDBInstanceProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } @@ -118,4 +140,4 @@ public AzureVmWorkloadSAPHanaDBInstanceProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectableItem.cs index 4db64314b71f..aba39541b229 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectableItem.cs @@ -1,28 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Azure VM workload-specific protectable item representing SAP HANA - /// Database. + /// Azure VM workload-specific protectable item representing SAP HANA Database. /// [Newtonsoft.Json.JsonObject("SAPHanaDatabase")] public partial class AzureVmWorkloadSAPHanaDatabaseProtectableItem : AzureVmWorkloadProtectableItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDatabaseProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDatabaseProtectableItem class. /// public AzureVmWorkloadSAPHanaDatabaseProtectableItem() { @@ -30,37 +22,51 @@ public AzureVmWorkloadSAPHanaDatabaseProtectableItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDatabaseProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDatabaseProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Parent Unique Name is added to - /// provide the service formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. - /// Host/Cluster Name for instance or - /// AG - /// Indicates if protectable item is - /// auto-protectable - /// Indicates if protectable item is - /// auto-protected - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Pre-backup validation for - /// protectable objects + + /// Name for instance or AG + /// + + /// Parent Unique Name is added to provide the service formatted URI Name of + /// the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if protectable item is auto-protectable + /// + + /// Indicates if protectable item is auto-protected + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Pre-backup validation for protectable objects + /// public AzureVmWorkloadSAPHanaDatabaseProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string parentUniqueName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), bool? isAutoProtected = default(bool?), int? subinquireditemcount = default(int?), int? subprotectableitemcount = default(int?), PreBackupValidation prebackupvalidation = default(PreBackupValidation)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) { CustomInit(); } @@ -71,4 +77,4 @@ public AzureVmWorkloadSAPHanaDatabaseProtectableItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs index ae01941a89e4..41acd7378a7b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs @@ -1,30 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Azure VM workload-specific protected item representing SAP HANA - /// Database. + /// Azure VM workload-specific protected item representing SAP HANA Database. /// [Newtonsoft.Json.JsonObject("AzureVmWorkloadSAPHanaDatabase")] public partial class AzureVmWorkloadSAPHanaDatabaseProtectedItem : AzureVmWorkloadProtectedItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDatabaseProtectedItem class. /// public AzureVmWorkloadSAPHanaDatabaseProtectedItem() { @@ -32,82 +22,114 @@ public AzureVmWorkloadSAPHanaDatabaseProtectedItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDatabaseProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the DB represented by - /// this backup item. - /// Host/Cluster Name for instance or - /// AG - /// Parent name of the DB such as Instance or - /// Availability Group. - /// Parent type of protected item, example: - /// for a DB, standalone server or distributed - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the DB represented by this backup item. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Parent name of the DB such as Instance or Availability Group. + /// + + /// Parent type of protected item, example: for a DB, standalone server or + /// distributed + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. Possible values include: - /// 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' - /// Timestamp of the last backup operation - /// on this backup item. - /// Error details in last - /// backup - /// Data ID of the protected - /// item. - /// Health status of the backup - /// item, evaluated based on last heartbeat received. Possible values - /// include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Error details in last backup + /// + + /// Data ID of the protected item. + /// + + /// Health status of the backup item, evaluated based on last heartbeat + /// received + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', /// 'IRPending' - /// Additional information for this backup - /// item. - /// Health details of different KPIs - public AzureVmWorkloadSAPHanaDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + + /// Additional information for this backup item. + /// + + /// Health details of different KPIs + /// + public AzureVmWorkloadSAPHanaDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } @@ -118,4 +140,4 @@ public AzureVmWorkloadSAPHanaDatabaseProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseWorkloadItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseWorkloadItem.cs index 3ec5e6ccd24b..07fe27a97d23 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseWorkloadItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaDatabaseWorkloadItem.cs @@ -1,28 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Azure VM workload-specific workload item representing SAP HANA - /// Database. + /// Azure VM workload-specific workload item representing SAP HANA Database. /// [Newtonsoft.Json.JsonObject("SAPHanaDatabase")] public partial class AzureVmWorkloadSAPHanaDatabaseWorkloadItem : AzureVmWorkloadItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDatabaseWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDatabaseWorkloadItem class. /// public AzureVmWorkloadSAPHanaDatabaseWorkloadItem() { @@ -30,29 +22,39 @@ public AzureVmWorkloadSAPHanaDatabaseWorkloadItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaDatabaseWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaDatabaseWorkloadItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Host/Cluster Name for instance or - /// AG - /// Indicates if workload item is - /// auto-protectable - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected + + /// Name for instance or AG + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if workload item is auto-protectable + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// public AzureVmWorkloadSAPHanaDatabaseWorkloadItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), int? subinquireditemcount = default(int?), int? subWorkloadItemCount = default(int?)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) { CustomInit(); } @@ -63,4 +65,4 @@ public AzureVmWorkloadSAPHanaDatabaseWorkloadItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaHSR.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaHSR.cs index 31ca60fa9a83..68a8f1c565c0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaHSR.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaHSR.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -31,34 +25,49 @@ public AzureVmWorkloadSAPHanaHSR() /// /// Initializes a new instance of the AzureVmWorkloadSAPHanaHSR class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Parent Unique Name is added to - /// provide the service formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. - /// Host/Cluster Name for instance or - /// AG - /// Indicates if protectable item is - /// auto-protectable - /// Indicates if protectable item is - /// auto-protected - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Pre-backup validation for - /// protectable objects + + /// Name for instance or AG + /// + + /// Parent Unique Name is added to provide the service formatted URI Name of + /// the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if protectable item is auto-protectable + /// + + /// Indicates if protectable item is auto-protected + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Pre-backup validation for protectable objects + /// public AzureVmWorkloadSAPHanaHSR(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string parentUniqueName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), bool? isAutoProtected = default(bool?), int? subinquireditemcount = default(int?), int? subprotectableitemcount = default(int?), PreBackupValidation prebackupvalidation = default(PreBackupValidation)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) { CustomInit(); } @@ -69,4 +78,4 @@ public AzureVmWorkloadSAPHanaHSR() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaSystemProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaSystemProtectableItem.cs index 6af272475203..817f60eaf447 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaSystemProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaSystemProtectableItem.cs @@ -1,28 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Azure VM workload-specific protectable item representing SAP HANA - /// System. + /// Azure VM workload-specific protectable item representing SAP HANA System. /// [Newtonsoft.Json.JsonObject("SAPHanaSystem")] public partial class AzureVmWorkloadSAPHanaSystemProtectableItem : AzureVmWorkloadProtectableItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaSystemProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaSystemProtectableItem class. /// public AzureVmWorkloadSAPHanaSystemProtectableItem() { @@ -30,37 +22,51 @@ public AzureVmWorkloadSAPHanaSystemProtectableItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaSystemProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaSystemProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Parent Unique Name is added to - /// provide the service formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. - /// Host/Cluster Name for instance or - /// AG - /// Indicates if protectable item is - /// auto-protectable - /// Indicates if protectable item is - /// auto-protected - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Pre-backup validation for - /// protectable objects + + /// Name for instance or AG + /// + + /// Parent Unique Name is added to provide the service formatted URI Name of + /// the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if protectable item is auto-protectable + /// + + /// Indicates if protectable item is auto-protected + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Pre-backup validation for protectable objects + /// public AzureVmWorkloadSAPHanaSystemProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string parentUniqueName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), bool? isAutoProtected = default(bool?), int? subinquireditemcount = default(int?), int? subprotectableitemcount = default(int?), PreBackupValidation prebackupvalidation = default(PreBackupValidation)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) { CustomInit(); } @@ -71,4 +77,4 @@ public AzureVmWorkloadSAPHanaSystemProtectableItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaSystemWorkloadItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaSystemWorkloadItem.cs index d99ffcbab270..8b0839cd985e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaSystemWorkloadItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSAPHanaSystemWorkloadItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadSAPHanaSystemWorkloadItem : AzureVmWorkloadItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaSystemWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaSystemWorkloadItem class. /// public AzureVmWorkloadSAPHanaSystemWorkloadItem() { @@ -29,29 +22,39 @@ public AzureVmWorkloadSAPHanaSystemWorkloadItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSAPHanaSystemWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSAPHanaSystemWorkloadItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Host/Cluster Name for instance or - /// AG - /// Indicates if workload item is - /// auto-protectable - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected + + /// Name for instance or AG + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if workload item is auto-protectable + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// public AzureVmWorkloadSAPHanaSystemWorkloadItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), int? subinquireditemcount = default(int?), int? subWorkloadItemCount = default(int?)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) { CustomInit(); } @@ -62,4 +65,4 @@ public AzureVmWorkloadSAPHanaSystemWorkloadItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLAvailabilityGroupProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLAvailabilityGroupProtectableItem.cs index eebf70aa6d7f..67bdf156ab96 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLAvailabilityGroupProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLAvailabilityGroupProtectableItem.cs @@ -1,28 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Azure VM workload-specific protectable item representing SQL - /// Availability Group. + /// Azure VM workload-specific protectable item representing SQL Availability + /// Group. /// [Newtonsoft.Json.JsonObject("SQLAvailabilityGroupContainer")] public partial class AzureVmWorkloadSQLAvailabilityGroupProtectableItem : AzureVmWorkloadProtectableItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLAvailabilityGroupProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLAvailabilityGroupProtectableItem class. /// public AzureVmWorkloadSQLAvailabilityGroupProtectableItem() { @@ -30,37 +23,51 @@ public AzureVmWorkloadSQLAvailabilityGroupProtectableItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLAvailabilityGroupProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLAvailabilityGroupProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Parent Unique Name is added to - /// provide the service formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. - /// Host/Cluster Name for instance or - /// AG - /// Indicates if protectable item is - /// auto-protectable - /// Indicates if protectable item is - /// auto-protected - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Pre-backup validation for - /// protectable objects + + /// Name for instance or AG + /// + + /// Parent Unique Name is added to provide the service formatted URI Name of + /// the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if protectable item is auto-protectable + /// + + /// Indicates if protectable item is auto-protected + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Pre-backup validation for protectable objects + /// public AzureVmWorkloadSQLAvailabilityGroupProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string parentUniqueName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), bool? isAutoProtected = default(bool?), int? subinquireditemcount = default(int?), int? subprotectableitemcount = default(int?), PreBackupValidation prebackupvalidation = default(PreBackupValidation)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) { CustomInit(); } @@ -71,4 +78,4 @@ public AzureVmWorkloadSQLAvailabilityGroupProtectableItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectableItem.cs index 5cefd5de7ca6..001b86b28fac 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectableItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadSQLDatabaseProtectableItem : AzureVmWorkloadProtectableItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLDatabaseProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLDatabaseProtectableItem class. /// public AzureVmWorkloadSQLDatabaseProtectableItem() { @@ -29,37 +22,51 @@ public AzureVmWorkloadSQLDatabaseProtectableItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLDatabaseProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLDatabaseProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Parent Unique Name is added to - /// provide the service formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. - /// Host/Cluster Name for instance or - /// AG - /// Indicates if protectable item is - /// auto-protectable - /// Indicates if protectable item is - /// auto-protected - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Pre-backup validation for - /// protectable objects + + /// Name for instance or AG + /// + + /// Parent Unique Name is added to provide the service formatted URI Name of + /// the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if protectable item is auto-protectable + /// + + /// Indicates if protectable item is auto-protected + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Pre-backup validation for protectable objects + /// public AzureVmWorkloadSQLDatabaseProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string parentUniqueName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), bool? isAutoProtected = default(bool?), int? subinquireditemcount = default(int?), int? subprotectableitemcount = default(int?), PreBackupValidation prebackupvalidation = default(PreBackupValidation)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) { CustomInit(); } @@ -70,4 +77,4 @@ public AzureVmWorkloadSQLDatabaseProtectableItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs index e3114e6e1d7f..a61865f6a607 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadSQLDatabaseProtectedItem : AzureVmWorkloadProtectedItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLDatabaseProtectedItem class. /// public AzureVmWorkloadSQLDatabaseProtectedItem() { @@ -31,82 +22,114 @@ public AzureVmWorkloadSQLDatabaseProtectedItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLDatabaseProtectedItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLDatabaseProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the DB represented by - /// this backup item. - /// Host/Cluster Name for instance or - /// AG - /// Parent name of the DB such as Instance or - /// Availability Group. - /// Parent type of protected item, example: - /// for a DB, standalone server or distributed - /// Backup status of this backup - /// item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the DB represented by this backup item. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Parent name of the DB such as Instance or Availability Group. + /// + + /// Parent type of protected item, example: for a DB, standalone server or + /// distributed + /// + + /// Backup status of this backup item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' - /// Last backup operation status. - /// Possible values: Healthy, Unhealthy. Possible values include: - /// 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' - /// Timestamp of the last backup operation - /// on this backup item. - /// Error details in last - /// backup - /// Data ID of the protected - /// item. - /// Health status of the backup - /// item, evaluated based on last heartbeat received. Possible values - /// include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', + + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'IRPending' + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Error details in last backup + /// + + /// Data ID of the protected item. + /// + + /// Health status of the backup item, evaluated based on last heartbeat + /// received + /// Possible values include: 'Invalid', 'Healthy', 'Unhealthy', 'NotReachable', /// 'IRPending' - /// Additional information for this backup - /// item. - /// Health details of different KPIs - public AzureVmWorkloadSQLDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + + /// Additional information for this backup item. + /// + + /// Health details of different KPIs + /// + public AzureVmWorkloadSQLDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), System.Collections.Generic.IDictionary kpisHealths = default(System.Collections.Generic.IDictionary)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } @@ -117,4 +140,4 @@ public AzureVmWorkloadSQLDatabaseProtectedItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseWorkloadItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseWorkloadItem.cs index 9809ceb4e577..0631dc774ef8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseWorkloadItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLDatabaseWorkloadItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadSQLDatabaseWorkloadItem : AzureVmWorkloadItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLDatabaseWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLDatabaseWorkloadItem class. /// public AzureVmWorkloadSQLDatabaseWorkloadItem() { @@ -29,29 +22,39 @@ public AzureVmWorkloadSQLDatabaseWorkloadItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLDatabaseWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLDatabaseWorkloadItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Host/Cluster Name for instance or - /// AG - /// Indicates if workload item is - /// auto-protectable - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected + + /// Name for instance or AG + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if workload item is auto-protectable + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// public AzureVmWorkloadSQLDatabaseWorkloadItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), int? subinquireditemcount = default(int?), int? subWorkloadItemCount = default(int?)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) { CustomInit(); } @@ -62,4 +65,4 @@ public AzureVmWorkloadSQLDatabaseWorkloadItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLInstanceProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLInstanceProtectableItem.cs index e1b79b3dc948..2f704055b47b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLInstanceProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLInstanceProtectableItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadSQLInstanceProtectableItem : AzureVmWorkloadProtectableItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLInstanceProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLInstanceProtectableItem class. /// public AzureVmWorkloadSQLInstanceProtectableItem() { @@ -29,37 +22,51 @@ public AzureVmWorkloadSQLInstanceProtectableItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLInstanceProtectableItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLInstanceProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Parent Unique Name is added to - /// provide the service formatted URI Name of the Parent - /// Only Applicable for data bases where the parent would be either - /// Instance or a SQL AG. - /// Host/Cluster Name for instance or - /// AG - /// Indicates if protectable item is - /// auto-protectable - /// Indicates if protectable item is - /// auto-protected - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Pre-backup validation for - /// protectable objects + + /// Name for instance or AG + /// + + /// Parent Unique Name is added to provide the service formatted URI Name of + /// the Parent + /// Only Applicable for data bases where the parent would be either Instance or + /// a SQL AG. + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if protectable item is auto-protectable + /// + + /// Indicates if protectable item is auto-protected + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Pre-backup validation for protectable objects + /// public AzureVmWorkloadSQLInstanceProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string parentUniqueName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), bool? isAutoProtected = default(bool?), int? subinquireditemcount = default(int?), int? subprotectableitemcount = default(int?), PreBackupValidation prebackupvalidation = default(PreBackupValidation)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subinquireditemcount, subprotectableitemcount, prebackupvalidation) { CustomInit(); } @@ -70,4 +77,4 @@ public AzureVmWorkloadSQLInstanceProtectableItem() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLInstanceWorkloadItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLInstanceWorkloadItem.cs index 79a189602d0f..65f5cc284e33 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLInstanceWorkloadItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureVmWorkloadSQLInstanceWorkloadItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureVmWorkloadSQLInstanceWorkloadItem : AzureVmWorkloadItem { /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLInstanceWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLInstanceWorkloadItem class. /// public AzureVmWorkloadSQLInstanceWorkloadItem() { @@ -31,33 +22,44 @@ public AzureVmWorkloadSQLInstanceWorkloadItem() } /// - /// Initializes a new instance of the - /// AzureVmWorkloadSQLInstanceWorkloadItem class. + /// Initializes a new instance of the AzureVmWorkloadSQLInstanceWorkloadItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Name for instance or AG - /// Host/Cluster Name for instance or - /// AG - /// Indicates if workload item is - /// auto-protectable - /// For instance or AG, indicates - /// number of DB's present - /// For instance or AG, indicates - /// number of DB's to be protected - /// Data Directory Paths for default - /// directories - public AzureVmWorkloadSQLInstanceWorkloadItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), int? subinquireditemcount = default(int?), int? subWorkloadItemCount = default(int?), IList dataDirectoryPaths = default(IList)) - : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) + + /// Name for instance or AG + /// + + /// Host/Cluster Name for instance or AG + /// + + /// Indicates if workload item is auto-protectable + /// + + /// For instance or AG, indicates number of DB's present + /// + + /// For instance or AG, indicates number of DB's to be protected + /// + + /// Data Directory Paths for default directories + /// + public AzureVmWorkloadSQLInstanceWorkloadItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string parentName = default(string), string serverName = default(string), bool? isAutoProtectable = default(bool?), int? subinquireditemcount = default(int?), int? subWorkloadItemCount = default(int?), System.Collections.Generic.IList dataDirectoryPaths = default(System.Collections.Generic.IList)) + + : base(backupManagementType, workloadType, friendlyName, protectionState, parentName, serverName, isAutoProtectable, subinquireditemcount, subWorkloadItemCount) { - DataDirectoryPaths = dataDirectoryPaths; + this.DataDirectoryPaths = dataDirectoryPaths; CustomInit(); } @@ -66,11 +68,11 @@ public AzureVmWorkloadSQLInstanceWorkloadItem() /// partial void CustomInit(); + /// /// Gets or sets data Directory Paths for default directories /// - [JsonProperty(PropertyName = "dataDirectoryPaths")] - public IList DataDirectoryPaths { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dataDirectoryPaths")] + public System.Collections.Generic.IList DataDirectoryPaths {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadAutoProtectionIntent.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadAutoProtectionIntent.cs index 1295b85771e4..bd697c1d1219 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadAutoProtectionIntent.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadAutoProtectionIntent.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadAutoProtectionIntent : AzureRecoveryServiceVaultProtectionIntent { /// - /// Initializes a new instance of the AzureWorkloadAutoProtectionIntent - /// class. + /// Initializes a new instance of the AzureWorkloadAutoProtectionIntent class. /// public AzureWorkloadAutoProtectionIntent() { @@ -29,24 +22,30 @@ public AzureWorkloadAutoProtectionIntent() } /// - /// Initializes a new instance of the AzureWorkloadAutoProtectionIntent - /// class. + /// Initializes a new instance of the AzureWorkloadAutoProtectionIntent class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// ARM ID of the resource to be backed - /// up. - /// ID of the item which is getting protected, In - /// case of Azure Vm , it is ProtectedItemId - /// ID of the backup policy with which this item - /// is backed up. + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the item which is getting protected, In case of Azure Vm , it is + /// ProtectedItemId + /// + + /// ID of the backup policy with which this item is backed up. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' public AzureWorkloadAutoProtectionIntent(string backupManagementType = default(string), string sourceResourceId = default(string), string itemId = default(string), string policyId = default(string), string protectionState = default(string)) - : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) + + : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) { CustomInit(); } @@ -57,4 +56,4 @@ public AzureWorkloadAutoProtectionIntent() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadBackupRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadBackupRequest.cs index 674ecd7b5366..fda1793f95e3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadBackupRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadBackupRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,19 +24,22 @@ public AzureWorkloadBackupRequest() /// /// Initializes a new instance of the AzureWorkloadBackupRequest class. /// - /// Type of backup, viz. Full, Differential, - /// Log or CopyOnlyFull. Possible values include: 'Invalid', 'Full', - /// 'Differential', 'Log', 'CopyOnlyFull', 'Incremental', - /// 'SnapshotFull', 'SnapshotCopyOnlyFull' - /// Bool for Compression - /// setting - /// Backup copy will expire - /// after the time specified (UTC). - public AzureWorkloadBackupRequest(string backupType = default(string), bool? enableCompression = default(bool?), System.DateTime? recoveryPointExpiryTimeInUTC = default(System.DateTime?)) + + /// Type of backup, viz. Full, Differential, Log or CopyOnlyFull + /// Possible values include: 'Invalid', 'Full', 'Differential', 'Log', + /// 'CopyOnlyFull', 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + + /// Bool for Compression setting + /// + + /// Backup copy will expire after the time specified (UTC). + /// + public AzureWorkloadBackupRequest(string backupType = default(string), bool? enableCompression = default(bool?), System.DateTime? recoveryPointExpiryTimeInUtc = default(System.DateTime?)) + { - BackupType = backupType; - EnableCompression = enableCompression; - RecoveryPointExpiryTimeInUTC = recoveryPointExpiryTimeInUTC; + this.BackupType = backupType; + this.EnableCompression = enableCompression; + this.RecoveryPointExpiryTimeInUtc = recoveryPointExpiryTimeInUtc; CustomInit(); } @@ -51,27 +48,23 @@ public AzureWorkloadBackupRequest() /// partial void CustomInit(); + /// - /// Gets or sets type of backup, viz. Full, Differential, Log or - /// CopyOnlyFull. Possible values include: 'Invalid', 'Full', - /// 'Differential', 'Log', 'CopyOnlyFull', 'Incremental', - /// 'SnapshotFull', 'SnapshotCopyOnlyFull' + /// Gets or sets type of backup, viz. Full, Differential, Log or CopyOnlyFull Possible values include: 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull', 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' /// - [JsonProperty(PropertyName = "backupType")] - public string BackupType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupType")] + public string BackupType {get; set; } /// /// Gets or sets bool for Compression setting /// - [JsonProperty(PropertyName = "enableCompression")] - public bool? EnableCompression { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableCompression")] + public bool? EnableCompression {get; set; } /// - /// Gets or sets backup copy will expire after the time specified - /// (UTC). + /// Gets or sets backup copy will expire after the time specified (UTC). /// - [JsonProperty(PropertyName = "recoveryPointExpiryTimeInUTC")] - public System.DateTime? RecoveryPointExpiryTimeInUTC { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointExpiryTimeInUTC")] + public System.DateTime? RecoveryPointExpiryTimeInUtc {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainer.cs index b62b453757d0..3f267412d255 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -31,39 +25,50 @@ public AzureWorkloadContainer() /// /// Initializes a new instance of the AzureWorkloadContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// ARM ID of the virtual machine - /// represented by this Azure Workload Container - /// Time stamp when this container was - /// updated. - /// Additional details of a workload - /// container. - /// Workload type for which registration was - /// sent. Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Re-Do Operation. Possible values - /// include: 'Invalid', 'Register', 'Reregister' + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// ARM ID of the virtual machine represented by this Azure Workload Container + /// + + /// Time stamp when this container was updated. + /// + + /// Additional details of a workload container. + /// + + /// Workload type for which registration was sent. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Re-Do Operation + /// Possible values include: 'Invalid', 'Register', 'Reregister' public AzureWorkloadContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), string sourceResourceId = default(string), System.DateTime? lastUpdatedTime = default(System.DateTime?), AzureWorkloadContainerExtendedInfo extendedInfo = default(AzureWorkloadContainerExtendedInfo), string workloadType = default(string), string operationType = default(string)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) { - SourceResourceId = sourceResourceId; - LastUpdatedTime = lastUpdatedTime; - ExtendedInfo = extendedInfo; - WorkloadType = workloadType; - OperationType = operationType; + this.SourceResourceId = sourceResourceId; + this.LastUpdatedTime = lastUpdatedTime; + this.ExtendedInfo = extendedInfo; + this.WorkloadType = workloadType; + this.OperationType = operationType; CustomInit(); } @@ -72,42 +77,36 @@ public AzureWorkloadContainer() /// partial void CustomInit(); + /// - /// Gets or sets ARM ID of the virtual machine represented by this - /// Azure Workload Container + /// Gets or sets aRM ID of the virtual machine represented by this Azure + /// Workload Container /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// /// Gets or sets time stamp when this container was updated. /// - [JsonProperty(PropertyName = "lastUpdatedTime")] - public System.DateTime? LastUpdatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUpdatedTime")] + public System.DateTime? LastUpdatedTime {get; set; } /// /// Gets or sets additional details of a workload container. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureWorkloadContainerExtendedInfo ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureWorkloadContainerExtendedInfo ExtendedInfo {get; set; } /// - /// Gets or sets workload type for which registration was sent. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' + /// Gets or sets workload type for which registration was sent. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// - /// Gets or sets re-Do Operation. Possible values include: 'Invalid', - /// 'Register', 'Reregister' + /// Gets or sets re-Do Operation Possible values include: 'Invalid', 'Register', 'Reregister' /// - [JsonProperty(PropertyName = "operationType")] - public string OperationType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "operationType")] + public string OperationType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainerAutoProtectionIntent.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainerAutoProtectionIntent.cs index bac6ebcf15fe..ed6c1c310cf2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainerAutoProtectionIntent.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainerAutoProtectionIntent.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadContainerAutoProtectionIntent : ProtectionIntent { /// - /// Initializes a new instance of the - /// AzureWorkloadContainerAutoProtectionIntent class. + /// Initializes a new instance of the AzureWorkloadContainerAutoProtectionIntent class. /// public AzureWorkloadContainerAutoProtectionIntent() { @@ -29,24 +22,30 @@ public AzureWorkloadContainerAutoProtectionIntent() } /// - /// Initializes a new instance of the - /// AzureWorkloadContainerAutoProtectionIntent class. + /// Initializes a new instance of the AzureWorkloadContainerAutoProtectionIntent class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// ARM ID of the resource to be backed - /// up. - /// ID of the item which is getting protected, In - /// case of Azure Vm , it is ProtectedItemId - /// ID of the backup policy with which this item - /// is backed up. + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the item which is getting protected, In case of Azure Vm , it is + /// ProtectedItemId + /// + + /// ID of the backup policy with which this item is backed up. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' public AzureWorkloadContainerAutoProtectionIntent(string backupManagementType = default(string), string sourceResourceId = default(string), string itemId = default(string), string policyId = default(string), string protectionState = default(string)) - : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) + + : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) { CustomInit(); } @@ -57,4 +56,4 @@ public AzureWorkloadContainerAutoProtectionIntent() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainerExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainerExtendedInfo.cs index 257ce42f4771..0c0b29425827 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainerExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadContainerExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadContainerExtendedInfo { /// - /// Initializes a new instance of the - /// AzureWorkloadContainerExtendedInfo class. + /// Initializes a new instance of the AzureWorkloadContainerExtendedInfo class. /// public AzureWorkloadContainerExtendedInfo() { @@ -30,19 +21,24 @@ public AzureWorkloadContainerExtendedInfo() } /// - /// Initializes a new instance of the - /// AzureWorkloadContainerExtendedInfo class. + /// Initializes a new instance of the AzureWorkloadContainerExtendedInfo class. /// - /// Host Os Name in case of Stand Alone - /// and Cluster Name in case of distributed container. - /// Inquiry Status for the container. - /// List of the nodes in case of distributed - /// container. - public AzureWorkloadContainerExtendedInfo(string hostServerName = default(string), InquiryInfo inquiryInfo = default(InquiryInfo), IList nodesList = default(IList)) + + /// Host Os Name in case of Stand Alone and Cluster Name in case of distributed + /// container. + /// + + /// Inquiry Status for the container. + /// + + /// List of the nodes in case of distributed container. + /// + public AzureWorkloadContainerExtendedInfo(string hostServerName = default(string), InquiryInfo inquiryInfo = default(InquiryInfo), System.Collections.Generic.IList nodesList = default(System.Collections.Generic.IList)) + { - HostServerName = hostServerName; - InquiryInfo = inquiryInfo; - NodesList = nodesList; + this.HostServerName = hostServerName; + this.InquiryInfo = inquiryInfo; + this.NodesList = nodesList; CustomInit(); } @@ -51,24 +47,24 @@ public AzureWorkloadContainerExtendedInfo() /// partial void CustomInit(); + /// - /// Gets or sets host Os Name in case of Stand Alone and Cluster Name - /// in case of distributed container. + /// Gets or sets host Os Name in case of Stand Alone and Cluster Name in case + /// of distributed container. /// - [JsonProperty(PropertyName = "hostServerName")] - public string HostServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hostServerName")] + public string HostServerName {get; set; } /// /// Gets or sets inquiry Status for the container. /// - [JsonProperty(PropertyName = "inquiryInfo")] - public InquiryInfo InquiryInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "inquiryInfo")] + public InquiryInfo InquiryInfo {get; set; } /// /// Gets or sets list of the nodes in case of distributed container. /// - [JsonProperty(PropertyName = "nodesList")] - public IList NodesList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "nodesList")] + public System.Collections.Generic.IList NodesList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadErrorInfo.cs index 30e68a51975e..76d3966757b2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,21 +23,29 @@ public AzureWorkloadErrorInfo() /// /// Initializes a new instance of the AzureWorkloadErrorInfo class. /// - /// Error code. - /// Localized error string. - /// Title: Typically, the entity that the - /// error pertains to. - /// List of localized recommendations for - /// above error code. - /// Additional details for above error - /// code. - public AzureWorkloadErrorInfo(int? errorCode = default(int?), string errorString = default(string), string errorTitle = default(string), IList recommendations = default(IList), string additionalDetails = default(string)) + + /// Error code. + /// + + /// Localized error string. + /// + + /// Title: Typically, the entity that the error pertains to. + /// + + /// List of localized recommendations for above error code. + /// + + /// Additional details for above error code. + /// + public AzureWorkloadErrorInfo(int? errorCode = default(int?), string errorString = default(string), string errorTitle = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList), string additionalDetails = default(string)) + { - ErrorCode = errorCode; - ErrorString = errorString; - ErrorTitle = errorTitle; - Recommendations = recommendations; - AdditionalDetails = additionalDetails; + this.ErrorCode = errorCode; + this.ErrorString = errorString; + this.ErrorTitle = errorTitle; + this.Recommendations = recommendations; + this.AdditionalDetails = additionalDetails; CustomInit(); } @@ -54,37 +54,35 @@ public AzureWorkloadErrorInfo() /// partial void CustomInit(); + /// /// Gets or sets error code. /// - [JsonProperty(PropertyName = "errorCode")] - public int? ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode {get; set; } /// /// Gets or sets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; set; } /// - /// Gets or sets title: Typically, the entity that the error pertains - /// to. + /// Gets or sets title: Typically, the entity that the error pertains to. /// - [JsonProperty(PropertyName = "errorTitle")] - public string ErrorTitle { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorTitle")] + public string ErrorTitle {get; set; } /// - /// Gets or sets list of localized recommendations for above error - /// code. + /// Gets or sets list of localized recommendations for above error code. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; set; } /// /// Gets or sets additional details for above error code. /// - [JsonProperty(PropertyName = "additionalDetails")] - public string AdditionalDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalDetails")] + public string AdditionalDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJob.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJob.cs index c516c964587c..484ae8c6611e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,34 +24,53 @@ public AzureWorkloadJob() /// /// Initializes a new instance of the AzureWorkloadJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Workload type of the job - /// Time elapsed during the execution of this - /// job. - /// Gets or sets the state/actions applicable - /// on this job like cancel/retry. - /// Error details on execution of this - /// job. - /// Additional information about the - /// job. - public AzureWorkloadJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), string workloadType = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), IList errorDetails = default(IList), AzureWorkloadJobExtendedInfo extendedInfo = default(AzureWorkloadJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Workload type of the job + /// + + /// Time elapsed during the execution of this job. + /// + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + /// + + /// Error details on execution of this job. + /// + + /// Additional information about the job. + /// + public AzureWorkloadJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), string workloadType = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), AzureWorkloadJobExtendedInfo extendedInfo = default(AzureWorkloadJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - WorkloadType = workloadType; - Duration = duration; - ActionsInfo = actionsInfo; - ErrorDetails = errorDetails; - ExtendedInfo = extendedInfo; + this.WorkloadType = workloadType; + this.Duration = duration; + this.ActionsInfo = actionsInfo; + this.ErrorDetails = errorDetails; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -68,36 +79,36 @@ public AzureWorkloadJob() /// partial void CustomInit(); + /// /// Gets or sets workload type of the job /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// /// Gets or sets time elapsed during the execution of this job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets the state/actions applicable on this job like + /// Gets or sets gets or sets the state/actions applicable on this job like /// cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets error details on execution of this job. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// /// Gets or sets additional information about the job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureWorkloadJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureWorkloadJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJobExtendedInfo.cs index 593d0f099ae0..83e4cc5580f6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadJobExtendedInfo { /// - /// Initializes a new instance of the AzureWorkloadJobExtendedInfo - /// class. + /// Initializes a new instance of the AzureWorkloadJobExtendedInfo class. /// public AzureWorkloadJobExtendedInfo() { @@ -30,18 +21,23 @@ public AzureWorkloadJobExtendedInfo() } /// - /// Initializes a new instance of the AzureWorkloadJobExtendedInfo - /// class. + /// Initializes a new instance of the AzureWorkloadJobExtendedInfo class. /// - /// List of tasks for this job - /// Job properties. - /// Non localized error message on - /// job execution. - public AzureWorkloadJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), string dynamicErrorMessage = default(string)) + + /// List of tasks for this job + /// + + /// Job properties. + /// + + /// Non localized error message on job execution. + /// + public AzureWorkloadJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -50,23 +46,23 @@ public AzureWorkloadJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks for this job /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets non localized error message on job execution. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJobTaskDetails.cs index e636734d4cc8..fddbac35a0a5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadJobTaskDetails { /// - /// Initializes a new instance of the AzureWorkloadJobTaskDetails - /// class. + /// Initializes a new instance of the AzureWorkloadJobTaskDetails class. /// public AzureWorkloadJobTaskDetails() { @@ -28,15 +21,19 @@ public AzureWorkloadJobTaskDetails() } /// - /// Initializes a new instance of the AzureWorkloadJobTaskDetails - /// class. + /// Initializes a new instance of the AzureWorkloadJobTaskDetails class. /// - /// The task display name. - /// The status. + + /// The task display name. + /// + + /// The status. + /// public AzureWorkloadJobTaskDetails(string taskId = default(string), string status = default(string)) + { - TaskId = taskId; - Status = status; + this.TaskId = taskId; + this.Status = status; CustomInit(); } @@ -45,17 +42,17 @@ public AzureWorkloadJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs index 260d96c63e32..d17167b6e989 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadPointInTimeRecoveryPoint : AzureWorkloadRecoveryPoint { /// - /// Initializes a new instance of the - /// AzureWorkloadPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadPointInTimeRecoveryPoint class. /// public AzureWorkloadPointInTimeRecoveryPoint() { @@ -31,25 +22,32 @@ public AzureWorkloadPointInTimeRecoveryPoint() } /// - /// Initializes a new instance of the - /// AzureWorkloadPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadPointInTimeRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental', - /// 'SnapshotFull', 'SnapshotCopyOnlyFull' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// Properties of Recovery - /// Point - /// List of log ranges - public AzureWorkloadPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties), IList timeRanges = default(IList)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties) + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// Properties of Recovery Point + /// + + /// List of log ranges + /// + public AzureWorkloadPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties), System.Collections.Generic.IList timeRanges = default(System.Collections.Generic.IList)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties) { - TimeRanges = timeRanges; + this.TimeRanges = timeRanges; CustomInit(); } @@ -58,11 +56,11 @@ public AzureWorkloadPointInTimeRecoveryPoint() /// partial void CustomInit(); + /// /// Gets or sets list of log ranges /// - [JsonProperty(PropertyName = "timeRanges")] - public IList TimeRanges { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "timeRanges")] + public System.Collections.Generic.IList TimeRanges {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRestoreRequest.cs index 7c70648978f0..6e4d93ed31f5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadPointInTimeRestoreRequest.cs @@ -1,30 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// AzureWorkload SAP Hana -specific restore. Specifically for - /// PointInTime/Log restore + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log + /// restore /// [Newtonsoft.Json.JsonObject("AzureWorkloadPointInTimeRestoreRequest")] public partial class AzureWorkloadPointInTimeRestoreRequest : AzureWorkloadRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadPointInTimeRestoreRequest class. /// public AzureWorkloadPointInTimeRestoreRequest() { @@ -32,28 +23,39 @@ public AzureWorkloadPointInTimeRestoreRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadPointInTimeRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// PointInTime value - public AzureWorkloadPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// PointInTime value + /// + public AzureWorkloadPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) { - PointInTime = pointInTime; + this.PointInTime = pointInTime; CustomInit(); } @@ -62,11 +64,11 @@ public AzureWorkloadPointInTimeRestoreRequest() /// partial void CustomInit(); + /// /// Gets or sets pointInTime value /// - [JsonProperty(PropertyName = "pointInTime")] - public System.DateTime? PointInTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "pointInTime")] + public System.DateTime? PointInTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadRecoveryPoint.cs index 8616b1cc194d..1c1c977a68ed 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -33,24 +25,30 @@ public AzureWorkloadRecoveryPoint() /// /// Initializes a new instance of the AzureWorkloadRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental', - /// 'SnapshotFull', 'SnapshotCopyOnlyFull' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// Properties of Recovery - /// Point - public AzureWorkloadRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties)) + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// Properties of Recovery Point + /// + public AzureWorkloadRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties)) + { - RecoveryPointTimeInUTC = recoveryPointTimeInUTC; - Type = type; - RecoveryPointTierDetails = recoveryPointTierDetails; - RecoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; - RecoveryPointProperties = recoveryPointProperties; + this.RecoveryPointTimeInUtc = recoveryPointTimeInUtc; + this.Type = type; + this.RecoveryPointTierDetails = recoveryPointTierDetails; + this.RecoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; + this.RecoveryPointProperties = recoveryPointProperties; CustomInit(); } @@ -59,37 +57,35 @@ public AzureWorkloadRecoveryPoint() /// partial void CustomInit(); + /// - /// Gets or sets UTC time at which recovery point was created + /// Gets or sets uTC time at which recovery point was created /// - [JsonProperty(PropertyName = "recoveryPointTimeInUTC")] - public System.DateTime? RecoveryPointTimeInUTC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTimeInUTC")] + public System.DateTime? RecoveryPointTimeInUtc {get; set; } /// - /// Gets or sets type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental', - /// 'SnapshotFull', 'SnapshotCopyOnlyFull' + /// Gets or sets type of restore point Possible values include: 'Invalid', 'Full', 'Log', 'Differential', 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Gets or sets recovery point tier information. /// - [JsonProperty(PropertyName = "recoveryPointTierDetails")] - public IList RecoveryPointTierDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTierDetails")] + public System.Collections.Generic.IList RecoveryPointTierDetails {get; set; } /// /// Gets or sets eligibility of RP to be moved to another tier /// - [JsonProperty(PropertyName = "recoveryPointMoveReadinessInfo")] - public IDictionary RecoveryPointMoveReadinessInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointMoveReadinessInfo")] + public System.Collections.Generic.IDictionary RecoveryPointMoveReadinessInfo {get; set; } /// /// Gets or sets properties of Recovery Point /// - [JsonProperty(PropertyName = "recoveryPointProperties")] - public RecoveryPointProperties RecoveryPointProperties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointProperties")] + public RecoveryPointProperties RecoveryPointProperties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadRestoreRequest.cs index 5d3dafa5b665..76c6204d84f1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadRestoreRequest : RestoreRequest { /// - /// Initializes a new instance of the AzureWorkloadRestoreRequest - /// class. + /// Initializes a new instance of the AzureWorkloadRestoreRequest class. /// public AzureWorkloadRestoreRequest() { @@ -31,31 +22,40 @@ public AzureWorkloadRestoreRequest() } /// - /// Initializes a new instance of the AzureWorkloadRestoreRequest - /// class. + /// Initializes a new instance of the AzureWorkloadRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - public AzureWorkloadRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string)) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + public AzureWorkloadRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string)) + { - RecoveryType = recoveryType; - SourceResourceId = sourceResourceId; - PropertyBag = propertyBag; - TargetInfo = targetInfo; - RecoveryMode = recoveryMode; - TargetVirtualMachineId = targetVirtualMachineId; + this.RecoveryType = recoveryType; + this.SourceResourceId = sourceResourceId; + this.PropertyBag = propertyBag; + this.TargetInfo = targetInfo; + this.RecoveryMode = recoveryMode; + this.TargetVirtualMachineId = targetVirtualMachineId; CustomInit(); } @@ -64,48 +64,45 @@ public AzureWorkloadRestoreRequest() /// partial void CustomInit(); + /// - /// Gets or sets type of this recovery. Possible values include: - /// 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', - /// 'Offline' + /// Gets or sets type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', 'Offline' /// - [JsonProperty(PropertyName = "recoveryType")] - public string RecoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryType")] + public string RecoveryType {get; set; } /// - /// Gets or sets fully qualified ARM ID of the VM on which workload - /// that was running is being recovered. + /// Gets or sets fully qualified ARM ID of the VM on which workload that was + /// running is being recovered. /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// /// Gets or sets workload specific property bag. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets details of target database /// - [JsonProperty(PropertyName = "targetInfo")] - public TargetRestoreInfo TargetInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetInfo")] + public TargetRestoreInfo TargetInfo {get; set; } /// - /// Gets or sets defines whether the current recovery mode is file - /// restore or database restore. Possible values include: 'Invalid', - /// 'FileRecovery', 'WorkloadRecovery' + /// Gets or sets defines whether the current recovery mode is file restore or + /// database restore Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' /// - [JsonProperty(PropertyName = "recoveryMode")] - public string RecoveryMode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryMode")] + public string RecoveryMode {get; set; } /// /// Gets or sets this is the complete ARM Id of the target VM /// For e.g. /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} /// - [JsonProperty(PropertyName = "targetVirtualMachineId")] - public string TargetVirtualMachineId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVirtualMachineId")] + public string TargetVirtualMachineId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs index 6e31b1d5d078..ba12398eb9d9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSAPHanaPointInTimeRecoveryPoint : AzureWorkloadPointInTimeRecoveryPoint { /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRecoveryPoint class. /// public AzureWorkloadSAPHanaPointInTimeRecoveryPoint() { @@ -31,23 +22,30 @@ public AzureWorkloadSAPHanaPointInTimeRecoveryPoint() } /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental', - /// 'SnapshotFull', 'SnapshotCopyOnlyFull' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// Properties of Recovery - /// Point - /// List of log ranges - public AzureWorkloadSAPHanaPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties), IList timeRanges = default(IList)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties, timeRanges) + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// Properties of Recovery Point + /// + + /// List of log ranges + /// + public AzureWorkloadSAPHanaPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties), System.Collections.Generic.IList timeRanges = default(System.Collections.Generic.IList)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties, timeRanges) { CustomInit(); } @@ -58,4 +56,4 @@ public AzureWorkloadSAPHanaPointInTimeRecoveryPoint() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreRequest.cs index 54f76ff4535f..16fb5a84c1c9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreRequest.cs @@ -1,30 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// AzureWorkload SAP Hana -specific restore. Specifically for - /// PointInTime/Log restore + /// AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log + /// restore /// [Newtonsoft.Json.JsonObject("AzureWorkloadSAPHanaPointInTimeRestoreRequest")] public partial class AzureWorkloadSAPHanaPointInTimeRestoreRequest : AzureWorkloadSAPHanaRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRestoreRequest class. /// public AzureWorkloadSAPHanaPointInTimeRestoreRequest() { @@ -32,28 +23,39 @@ public AzureWorkloadSAPHanaPointInTimeRestoreRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// PointInTime value - public AzureWorkloadSAPHanaPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// PointInTime value + /// + public AzureWorkloadSAPHanaPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) { - PointInTime = pointInTime; + this.PointInTime = pointInTime; CustomInit(); } @@ -62,11 +64,11 @@ public AzureWorkloadSAPHanaPointInTimeRestoreRequest() /// partial void CustomInit(); + /// /// Gets or sets pointInTime value /// - [JsonProperty(PropertyName = "pointInTime")] - public System.DateTime? PointInTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "pointInTime")] + public System.DateTime? PointInTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.cs index b8ab8cdd9da0..3b66589da571 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest : AzureWorkloadSAPHanaPointInTimeRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest class. /// public AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() { @@ -32,30 +23,42 @@ public AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// PointInTime value - /// RP Rehydration - /// Info - public AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, pointInTime) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// PointInTime value + /// + + /// RP Rehydration Info + /// + public AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), System.DateTime? pointInTime = default(System.DateTime?), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, pointInTime) { - RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + this.RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; CustomInit(); } @@ -64,11 +67,11 @@ public AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() /// partial void CustomInit(); + /// - /// Gets or sets RP Rehydration Info + /// Gets or sets rP Rehydration Info /// - [JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] - public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs index 8428abf92bbd..5bf75b94d802 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSAPHanaRecoveryPoint : AzureWorkloadRecoveryPoint { /// - /// Initializes a new instance of the AzureWorkloadSAPHanaRecoveryPoint - /// class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRecoveryPoint class. /// public AzureWorkloadSAPHanaRecoveryPoint() { @@ -32,22 +23,27 @@ public AzureWorkloadSAPHanaRecoveryPoint() } /// - /// Initializes a new instance of the AzureWorkloadSAPHanaRecoveryPoint - /// class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental', - /// 'SnapshotFull', 'SnapshotCopyOnlyFull' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// Properties of Recovery - /// Point - public AzureWorkloadSAPHanaRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties) + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// Properties of Recovery Point + /// + public AzureWorkloadSAPHanaRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties) { CustomInit(); } @@ -58,4 +54,4 @@ public AzureWorkloadSAPHanaRecoveryPoint() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreRequest.cs index c42f45311008..2c944117d459 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSAPHanaRestoreRequest : AzureWorkloadRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRestoreRequest class. /// public AzureWorkloadSAPHanaRestoreRequest() { @@ -31,25 +22,34 @@ public AzureWorkloadSAPHanaRestoreRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - public AzureWorkloadSAPHanaRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + public AzureWorkloadSAPHanaRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) { CustomInit(); } @@ -60,4 +60,4 @@ public AzureWorkloadSAPHanaRestoreRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreWithRehydrateRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreWithRehydrateRequest.cs index ded46b0d105f..e2db7303b054 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreWithRehydrateRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSAPHanaRestoreWithRehydrateRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSAPHanaRestoreWithRehydrateRequest : AzureWorkloadSAPHanaRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaRestoreWithRehydrateRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRestoreWithRehydrateRequest class. /// public AzureWorkloadSAPHanaRestoreWithRehydrateRequest() { @@ -32,29 +23,39 @@ public AzureWorkloadSAPHanaRestoreWithRehydrateRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSAPHanaRestoreWithRehydrateRequest class. + /// Initializes a new instance of the AzureWorkloadSAPHanaRestoreWithRehydrateRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// RP Rehydration - /// Info - public AzureWorkloadSAPHanaRestoreWithRehydrateRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// RP Rehydration Info + /// + public AzureWorkloadSAPHanaRestoreWithRehydrateRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) { - RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + this.RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; CustomInit(); } @@ -63,11 +64,11 @@ public AzureWorkloadSAPHanaRestoreWithRehydrateRequest() /// partial void CustomInit(); + /// - /// Gets or sets RP Rehydration Info + /// Gets or sets rP Rehydration Info /// - [JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] - public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLAutoProtectionIntent.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLAutoProtectionIntent.cs index ea8bc7943f4e..33c9e5610311 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLAutoProtectionIntent.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLAutoProtectionIntent.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSQLAutoProtectionIntent : AzureWorkloadAutoProtectionIntent { /// - /// Initializes a new instance of the - /// AzureWorkloadSQLAutoProtectionIntent class. + /// Initializes a new instance of the AzureWorkloadSQLAutoProtectionIntent class. /// public AzureWorkloadSQLAutoProtectionIntent() { @@ -29,30 +22,37 @@ public AzureWorkloadSQLAutoProtectionIntent() } /// - /// Initializes a new instance of the - /// AzureWorkloadSQLAutoProtectionIntent class. + /// Initializes a new instance of the AzureWorkloadSQLAutoProtectionIntent class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// ARM ID of the resource to be backed - /// up. - /// ID of the item which is getting protected, In - /// case of Azure Vm , it is ProtectedItemId - /// ID of the backup policy with which this item - /// is backed up. + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the item which is getting protected, In case of Azure Vm , it is + /// ProtectedItemId + /// + + /// ID of the backup policy with which this item is backed up. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Workload item type of the item for - /// which intent is to be set. Possible values include: 'Invalid', - /// 'SQLInstance', 'SQLDataBase', 'SAPHanaSystem', 'SAPHanaDatabase', - /// 'SAPAseSystem', 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Workload item type of the item for which intent is to be set + /// Possible values include: 'Invalid', 'SQLInstance', 'SQLDataBase', + /// 'SAPHanaSystem', 'SAPHanaDatabase', 'SAPAseSystem', 'SAPAseDatabase', + /// 'SAPHanaDBInstance' public AzureWorkloadSQLAutoProtectionIntent(string backupManagementType = default(string), string sourceResourceId = default(string), string itemId = default(string), string policyId = default(string), string protectionState = default(string), string workloadItemType = default(string)) - : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) + + : base(backupManagementType, sourceResourceId, itemId, policyId, protectionState) { - WorkloadItemType = workloadItemType; + this.WorkloadItemType = workloadItemType; CustomInit(); } @@ -61,14 +61,11 @@ public AzureWorkloadSQLAutoProtectionIntent() /// partial void CustomInit(); + /// - /// Gets or sets workload item type of the item for which intent is to - /// be set. Possible values include: 'Invalid', 'SQLInstance', - /// 'SQLDataBase', 'SAPHanaSystem', 'SAPHanaDatabase', 'SAPAseSystem', - /// 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets or sets workload item type of the item for which intent is to be set Possible values include: 'Invalid', 'SQLInstance', 'SQLDataBase', 'SAPHanaSystem', 'SAPHanaDatabase', 'SAPAseSystem', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workloadItemType")] - public string WorkloadItemType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadItemType")] + public string WorkloadItemType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs index 17720613052d..4961cd66f09f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSQLPointInTimeRecoveryPoint : AzureWorkloadSQLRecoveryPoint { /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRecoveryPoint class. /// public AzureWorkloadSQLPointInTimeRecoveryPoint() { @@ -31,30 +22,39 @@ public AzureWorkloadSQLPointInTimeRecoveryPoint() } /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRecoveryPoint class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental', - /// 'SnapshotFull', 'SnapshotCopyOnlyFull' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// Properties of Recovery - /// Point - /// Extended Info that provides data - /// directory details. Will be populated in two cases: + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// Properties of Recovery Point + /// + + /// Extended Info that provides data directory details. Will be populated in + /// two cases: /// When a specific recovery point is accessed using GetRecoveryPoint - /// Or when ListRecoveryPoints is called for Log RP only with - /// ExtendedInfo query filter - /// List of log ranges - public AzureWorkloadSQLPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties), AzureWorkloadSQLRecoveryPointExtendedInfo extendedInfo = default(AzureWorkloadSQLRecoveryPointExtendedInfo), IList timeRanges = default(IList)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties, extendedInfo) + /// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + /// query filter + /// + + /// List of log ranges + /// + public AzureWorkloadSQLPointInTimeRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties), AzureWorkloadSQLRecoveryPointExtendedInfo extendedInfo = default(AzureWorkloadSQLRecoveryPointExtendedInfo), System.Collections.Generic.IList timeRanges = default(System.Collections.Generic.IList)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties, extendedInfo) { - TimeRanges = timeRanges; + this.TimeRanges = timeRanges; CustomInit(); } @@ -63,11 +63,11 @@ public AzureWorkloadSQLPointInTimeRecoveryPoint() /// partial void CustomInit(); + /// /// Gets or sets list of log ranges /// - [JsonProperty(PropertyName = "timeRanges")] - public IList TimeRanges { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "timeRanges")] + public System.Collections.Generic.IList TimeRanges {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreRequest.cs index 37f86b7aa17a..b6f69048d139 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSQLPointInTimeRestoreRequest : AzureWorkloadSQLRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRestoreRequest class. /// public AzureWorkloadSQLPointInTimeRestoreRequest() { @@ -32,35 +23,50 @@ public AzureWorkloadSQLPointInTimeRestoreRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRestoreRequest class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// Default option set - /// to true. If this is set to false, alternate data directory must be - /// provided - /// SQL specific property where user can - /// chose to set no-recovery when restore operation is tried - /// Data directory - /// details - /// PointInTime value - public AzureWorkloadSQLPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), IList alternateDirectoryPaths = default(IList), System.DateTime? pointInTime = default(System.DateTime?)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// Default option set to true. If this is set to false, alternate data + /// directory must be provided + /// + + /// SQL specific property where user can chose to set no-recovery when restore + /// operation is tried + /// + + /// Data directory details + /// + + /// PointInTime value + /// + public AzureWorkloadSQLPointInTimeRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), System.Collections.Generic.IList alternateDirectoryPaths = default(System.Collections.Generic.IList), System.DateTime? pointInTime = default(System.DateTime?)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) { - PointInTime = pointInTime; + this.PointInTime = pointInTime; CustomInit(); } @@ -69,11 +75,11 @@ public AzureWorkloadSQLPointInTimeRestoreRequest() /// partial void CustomInit(); + /// /// Gets or sets pointInTime value /// - [JsonProperty(PropertyName = "pointInTime")] - public System.DateTime? PointInTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "pointInTime")] + public System.DateTime? PointInTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.cs index ec5377d74509..2216474b5cae 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.cs @@ -1,30 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// AzureWorkload SQL-specific restore with integrated rehydration of - /// recovery point. + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery + /// point. /// [Newtonsoft.Json.JsonObject("AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest")] public partial class AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest : AzureWorkloadSQLPointInTimeRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest class. /// public AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() { @@ -32,37 +23,53 @@ public AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest class. + /// Initializes a new instance of the AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// Default option set - /// to true. If this is set to false, alternate data directory must be - /// provided - /// SQL specific property where user can - /// chose to set no-recovery when restore operation is tried - /// Data directory - /// details - /// PointInTime value - /// RP Rehydration - /// Info - public AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), IList alternateDirectoryPaths = default(IList), System.DateTime? pointInTime = default(System.DateTime?), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths, pointInTime) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// Default option set to true. If this is set to false, alternate data + /// directory must be provided + /// + + /// SQL specific property where user can chose to set no-recovery when restore + /// operation is tried + /// + + /// Data directory details + /// + + /// PointInTime value + /// + + /// RP Rehydration Info + /// + public AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), System.Collections.Generic.IList alternateDirectoryPaths = default(System.Collections.Generic.IList), System.DateTime? pointInTime = default(System.DateTime?), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths, pointInTime) { - RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + this.RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; CustomInit(); } @@ -71,11 +78,11 @@ public AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() /// partial void CustomInit(); + /// - /// Gets or sets RP Rehydration Info + /// Gets or sets rP Rehydration Info /// - [JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] - public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs index 39948dbbfce9..9408df4b5aca 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSQLRecoveryPoint : AzureWorkloadRecoveryPoint { /// - /// Initializes a new instance of the AzureWorkloadSQLRecoveryPoint - /// class. + /// Initializes a new instance of the AzureWorkloadSQLRecoveryPoint class. /// public AzureWorkloadSQLRecoveryPoint() { @@ -32,29 +23,36 @@ public AzureWorkloadSQLRecoveryPoint() } /// - /// Initializes a new instance of the AzureWorkloadSQLRecoveryPoint - /// class. + /// Initializes a new instance of the AzureWorkloadSQLRecoveryPoint class. /// - /// UTC time at which recovery - /// point was created - /// Type of restore point. Possible values include: - /// 'Invalid', 'Full', 'Log', 'Differential', 'Incremental', - /// 'SnapshotFull', 'SnapshotCopyOnlyFull' - /// Recovery point tier - /// information. - /// Eligibility of RP to - /// be moved to another tier - /// Properties of Recovery - /// Point - /// Extended Info that provides data - /// directory details. Will be populated in two cases: + + /// UTC time at which recovery point was created + /// + + /// Type of restore point + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', + /// 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + + /// Recovery point tier information. + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// Properties of Recovery Point + /// + + /// Extended Info that provides data directory details. Will be populated in + /// two cases: /// When a specific recovery point is accessed using GetRecoveryPoint - /// Or when ListRecoveryPoints is called for Log RP only with - /// ExtendedInfo query filter - public AzureWorkloadSQLRecoveryPoint(System.DateTime? recoveryPointTimeInUTC = default(System.DateTime?), string type = default(string), IList recoveryPointTierDetails = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties), AzureWorkloadSQLRecoveryPointExtendedInfo extendedInfo = default(AzureWorkloadSQLRecoveryPointExtendedInfo)) - : base(recoveryPointTimeInUTC, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties) + /// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + /// query filter + /// + public AzureWorkloadSQLRecoveryPoint(System.DateTime? recoveryPointTimeInUtc = default(System.DateTime?), string type = default(string), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties), AzureWorkloadSQLRecoveryPointExtendedInfo extendedInfo = default(AzureWorkloadSQLRecoveryPointExtendedInfo)) + + : base(recoveryPointTimeInUtc, type, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties) { - ExtendedInfo = extendedInfo; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -63,15 +61,15 @@ public AzureWorkloadSQLRecoveryPoint() /// partial void CustomInit(); + /// - /// Gets or sets extended Info that provides data directory details. - /// Will be populated in two cases: + /// Gets or sets extended Info that provides data directory details. Will be + /// populated in two cases: /// When a specific recovery point is accessed using GetRecoveryPoint - /// Or when ListRecoveryPoints is called for Log RP only with - /// ExtendedInfo query filter + /// Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo + /// query filter /// - [JsonProperty(PropertyName = "extendedInfo")] - public AzureWorkloadSQLRecoveryPointExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public AzureWorkloadSQLRecoveryPointExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPointExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPointExtendedInfo.cs index 8dd6ac0c0f2c..846911ef2c70 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPointExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRecoveryPointExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSQLRecoveryPointExtendedInfo { /// - /// Initializes a new instance of the - /// AzureWorkloadSQLRecoveryPointExtendedInfo class. + /// Initializes a new instance of the AzureWorkloadSQLRecoveryPointExtendedInfo class. /// public AzureWorkloadSQLRecoveryPointExtendedInfo() { @@ -30,17 +21,19 @@ public AzureWorkloadSQLRecoveryPointExtendedInfo() } /// - /// Initializes a new instance of the - /// AzureWorkloadSQLRecoveryPointExtendedInfo class. + /// Initializes a new instance of the AzureWorkloadSQLRecoveryPointExtendedInfo class. /// - /// UTC time at which data - /// directory info was captured - /// List of data directory paths - /// during restore operation. - public AzureWorkloadSQLRecoveryPointExtendedInfo(System.DateTime? dataDirectoryTimeInUTC = default(System.DateTime?), IList dataDirectoryPaths = default(IList)) + + /// UTC time at which data directory info was captured + /// + + /// List of data directory paths during restore operation. + /// + public AzureWorkloadSQLRecoveryPointExtendedInfo(System.DateTime? dataDirectoryTimeInUtc = default(System.DateTime?), System.Collections.Generic.IList dataDirectoryPaths = default(System.Collections.Generic.IList)) + { - DataDirectoryTimeInUTC = dataDirectoryTimeInUTC; - DataDirectoryPaths = dataDirectoryPaths; + this.DataDirectoryTimeInUtc = dataDirectoryTimeInUtc; + this.DataDirectoryPaths = dataDirectoryPaths; CustomInit(); } @@ -49,17 +42,17 @@ public AzureWorkloadSQLRecoveryPointExtendedInfo() /// partial void CustomInit(); + /// - /// Gets or sets UTC time at which data directory info was captured + /// Gets or sets uTC time at which data directory info was captured /// - [JsonProperty(PropertyName = "dataDirectoryTimeInUTC")] - public System.DateTime? DataDirectoryTimeInUTC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataDirectoryTimeInUTC")] + public System.DateTime? DataDirectoryTimeInUtc {get; set; } /// /// Gets or sets list of data directory paths during restore operation. /// - [JsonProperty(PropertyName = "dataDirectoryPaths")] - public IList DataDirectoryPaths { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dataDirectoryPaths")] + public System.Collections.Generic.IList DataDirectoryPaths {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreRequest.cs index bde26d82991c..5ca48f106042 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class AzureWorkloadSQLRestoreRequest : AzureWorkloadRestoreRequest { /// - /// Initializes a new instance of the AzureWorkloadSQLRestoreRequest - /// class. + /// Initializes a new instance of the AzureWorkloadSQLRestoreRequest class. /// public AzureWorkloadSQLRestoreRequest() { @@ -31,36 +22,49 @@ public AzureWorkloadSQLRestoreRequest() } /// - /// Initializes a new instance of the AzureWorkloadSQLRestoreRequest - /// class. + /// Initializes a new instance of the AzureWorkloadSQLRestoreRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// Default option set - /// to true. If this is set to false, alternate data directory must be - /// provided - /// SQL specific property where user can - /// chose to set no-recovery when restore operation is tried - /// Data directory - /// details - public AzureWorkloadSQLRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), IList alternateDirectoryPaths = default(IList)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// Default option set to true. If this is set to false, alternate data + /// directory must be provided + /// + + /// SQL specific property where user can chose to set no-recovery when restore + /// operation is tried + /// + + /// Data directory details + /// + public AzureWorkloadSQLRestoreRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), System.Collections.Generic.IList alternateDirectoryPaths = default(System.Collections.Generic.IList)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId) { - ShouldUseAlternateTargetLocation = shouldUseAlternateTargetLocation; - IsNonRecoverable = isNonRecoverable; - AlternateDirectoryPaths = alternateDirectoryPaths; + this.ShouldUseAlternateTargetLocation = shouldUseAlternateTargetLocation; + this.IsNonRecoverable = isNonRecoverable; + this.AlternateDirectoryPaths = alternateDirectoryPaths; CustomInit(); } @@ -69,25 +73,25 @@ public AzureWorkloadSQLRestoreRequest() /// partial void CustomInit(); + /// - /// Gets or sets default option set to true. If this is set to false, - /// alternate data directory must be provided + /// Gets or sets default option set to true. If this is set to false, alternate + /// data directory must be provided /// - [JsonProperty(PropertyName = "shouldUseAlternateTargetLocation")] - public bool? ShouldUseAlternateTargetLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "shouldUseAlternateTargetLocation")] + public bool? ShouldUseAlternateTargetLocation {get; set; } /// - /// Gets or sets SQL specific property where user can chose to set - /// no-recovery when restore operation is tried + /// Gets or sets sQL specific property where user can chose to set no-recovery + /// when restore operation is tried /// - [JsonProperty(PropertyName = "isNonRecoverable")] - public bool? IsNonRecoverable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isNonRecoverable")] + public bool? IsNonRecoverable {get; set; } /// /// Gets or sets data directory details /// - [JsonProperty(PropertyName = "alternateDirectoryPaths")] - public IList AlternateDirectoryPaths { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "alternateDirectoryPaths")] + public System.Collections.Generic.IList AlternateDirectoryPaths {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreWithRehydrateRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreWithRehydrateRequest.cs index b104665680ee..85b8221efa10 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreWithRehydrateRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/AzureWorkloadSQLRestoreWithRehydrateRequest.cs @@ -1,30 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// AzureWorkload SQL-specific restore with integrated rehydration of - /// recovery point + /// AzureWorkload SQL-specific restore with integrated rehydration of recovery + /// point /// [Newtonsoft.Json.JsonObject("AzureWorkloadSQLRestoreWithRehydrateRequest")] public partial class AzureWorkloadSQLRestoreWithRehydrateRequest : AzureWorkloadSQLRestoreRequest { /// - /// Initializes a new instance of the - /// AzureWorkloadSQLRestoreWithRehydrateRequest class. + /// Initializes a new instance of the AzureWorkloadSQLRestoreWithRehydrateRequest class. /// public AzureWorkloadSQLRestoreWithRehydrateRequest() { @@ -32,36 +23,50 @@ public AzureWorkloadSQLRestoreWithRehydrateRequest() } /// - /// Initializes a new instance of the - /// AzureWorkloadSQLRestoreWithRehydrateRequest class. + /// Initializes a new instance of the AzureWorkloadSQLRestoreWithRehydrateRequest class. /// - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM on - /// which workload that was running is being recovered. - /// Workload specific property bag. - /// Details of target database - /// Defines whether the current recovery - /// mode is file restore or database restore. Possible values include: - /// 'Invalid', 'FileRecovery', 'WorkloadRecovery' - /// This is the complete ARM Id of - /// the target VM + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM on which workload that was running is + /// being recovered. + /// + + /// Workload specific property bag. + /// + + /// Details of target database + /// + + /// Defines whether the current recovery mode is file restore or database + /// restore + /// Possible values include: 'Invalid', 'FileRecovery', 'WorkloadRecovery' + + /// This is the complete ARM Id of the target VM /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// Default option set - /// to true. If this is set to false, alternate data directory must be - /// provided - /// SQL specific property where user can - /// chose to set no-recovery when restore operation is tried - /// Data directory - /// details - /// RP Rehydration - /// Info - public AzureWorkloadSQLRestoreWithRehydrateRequest(string recoveryType = default(string), string sourceResourceId = default(string), IDictionary propertyBag = default(IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), IList alternateDirectoryPaths = default(IList), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) - : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// Default option set to true. If this is set to false, alternate data + /// directory must be provided + /// + + /// SQL specific property where user can chose to set no-recovery when restore + /// operation is tried + /// + + /// Data directory details + /// + + /// RP Rehydration Info + /// + public AzureWorkloadSQLRestoreWithRehydrateRequest(string recoveryType = default(string), string sourceResourceId = default(string), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), TargetRestoreInfo targetInfo = default(TargetRestoreInfo), string recoveryMode = default(string), string targetVirtualMachineId = default(string), bool? shouldUseAlternateTargetLocation = default(bool?), bool? isNonRecoverable = default(bool?), System.Collections.Generic.IList alternateDirectoryPaths = default(System.Collections.Generic.IList), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) + + : base(recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) { - RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + this.RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; CustomInit(); } @@ -70,11 +75,11 @@ public AzureWorkloadSQLRestoreWithRehydrateRequest() /// partial void CustomInit(); + /// - /// Gets or sets RP Rehydration Info + /// Gets or sets rP Rehydration Info /// - [JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] - public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BEKDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BEKDetails.cs index 36de291c0131..71e8d970e37d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BEKDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BEKDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,21 @@ public BEKDetails() /// /// Initializes a new instance of the BEKDetails class. /// - /// Secret is BEK. - /// ID of the Key Vault where this Secret - /// is stored. - /// BEK data. + + /// Secret is BEK. + /// + + /// ID of the Key Vault where this Secret is stored. + /// + + /// BEK data. + /// public BEKDetails(string secretUrl = default(string), string secretVaultId = default(string), string secretData = default(string)) + { - SecretUrl = secretUrl; - SecretVaultId = secretVaultId; - SecretData = secretData; + this.SecretUrl = secretUrl; + this.SecretVaultId = secretVaultId; + this.SecretData = secretData; CustomInit(); } @@ -46,23 +46,23 @@ public BEKDetails() /// partial void CustomInit(); + /// /// Gets or sets secret is BEK. /// - [JsonProperty(PropertyName = "secretUrl")] - public string SecretUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secretUrl")] + public string SecretUrl {get; set; } /// - /// Gets or sets ID of the Key Vault where this Secret is stored. + /// Gets or sets iD of the Key Vault where this Secret is stored. /// - [JsonProperty(PropertyName = "secretVaultId")] - public string SecretVaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secretVaultId")] + public string SecretVaultId {get; set; } /// - /// Gets or sets BEK data. + /// Gets or sets bEK data. /// - [JsonProperty(PropertyName = "secretData")] - public string SecretData { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "secretData")] + public string SecretData {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupEngineQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupEngineQueryObject.cs index cd87e6e2b35c..2410f7ac2173 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupEngineQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupEngineQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public BMSBackupEngineQueryObject() /// /// Initializes a new instance of the BMSBackupEngineQueryObject class. /// - /// attribute to add extended info + + /// attribute to add extended info + /// public BMSBackupEngineQueryObject(string expand = default(string)) + { - Expand = expand; + this.Expand = expand; CustomInit(); } @@ -41,11 +38,11 @@ public BMSBackupEngineQueryObject() /// partial void CustomInit(); + /// /// Gets or sets attribute to add extended info /// - [JsonProperty(PropertyName = "expand")] - public string Expand { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "expand")] + public string Expand {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupEnginesQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupEnginesQueryObject.cs index 8264489459f3..13a485d1b015 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupEnginesQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupEnginesQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class BMSBackupEnginesQueryObject { /// - /// Initializes a new instance of the BMSBackupEnginesQueryObject - /// class. + /// Initializes a new instance of the BMSBackupEnginesQueryObject class. /// public BMSBackupEnginesQueryObject() { @@ -28,21 +21,25 @@ public BMSBackupEnginesQueryObject() } /// - /// Initializes a new instance of the BMSBackupEnginesQueryObject - /// class. + /// Initializes a new instance of the BMSBackupEnginesQueryObject class. /// - /// Backup management type for the - /// backup engine. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Friendly name of the backup - /// engine. - /// Attribute to add extended info. + + /// Backup management type for the backup engine. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Friendly name of the backup engine. + /// + + /// Attribute to add extended info. + /// public BMSBackupEnginesQueryObject(string backupManagementType = default(string), string friendlyName = default(string), string expand = default(string)) + { - BackupManagementType = backupManagementType; - FriendlyName = friendlyName; - Expand = expand; + this.BackupManagementType = backupManagementType; + this.FriendlyName = friendlyName; + this.Expand = expand; CustomInit(); } @@ -51,26 +48,23 @@ public BMSBackupEnginesQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type for the backup engine. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// /// Gets or sets friendly name of the backup engine. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets attribute to add extended info. /// - [JsonProperty(PropertyName = "expand")] - public string Expand { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "expand")] + public string Expand {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupSummariesQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupSummariesQueryObject.cs index e50edf55310d..1cc207ca7016 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupSummariesQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSBackupSummariesQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class BMSBackupSummariesQueryObject { /// - /// Initializes a new instance of the BMSBackupSummariesQueryObject - /// class. + /// Initializes a new instance of the BMSBackupSummariesQueryObject class. /// public BMSBackupSummariesQueryObject() { @@ -28,16 +21,16 @@ public BMSBackupSummariesQueryObject() } /// - /// Initializes a new instance of the BMSBackupSummariesQueryObject - /// class. + /// Initializes a new instance of the BMSBackupSummariesQueryObject class. /// + /// Backup management type for this container. - /// Possible values include: 'Invalid', - /// 'BackupProtectedItemCountSummary', + /// Possible values include: 'Invalid', 'BackupProtectedItemCountSummary', /// 'BackupProtectionContainerCountSummary' public BMSBackupSummariesQueryObject(string type = default(string)) + { - Type = type; + this.Type = type; CustomInit(); } @@ -46,13 +39,11 @@ public BMSBackupSummariesQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type for this container. Possible - /// values include: 'Invalid', 'BackupProtectedItemCountSummary', - /// 'BackupProtectionContainerCountSummary' + /// Gets or sets backup management type for this container. Possible values include: 'Invalid', 'BackupProtectedItemCountSummary', 'BackupProtectionContainerCountSummary' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSContainerQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSContainerQueryObject.cs index b425ac197530..7c8f07a06396 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSContainerQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSContainerQueryObject.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,30 +23,39 @@ public BMSContainerQueryObject() /// /// Initializes a new instance of the BMSContainerQueryObject class. /// - /// Backup management type for this - /// container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Type of container for filter. Possible - /// values include: 'Invalid', 'Unknown', 'IaasVMContainer', - /// 'IaasVMServiceContainer', 'DPMContainer', - /// 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - /// 'AzureSqlContainer', 'Windows', 'VCenter', 'VMAppContainer', - /// 'SQLAGWorkLoadContainer', 'StorageContainer', 'GenericContainer', - /// 'HanaHSRContainer' - /// Backup engine name - /// Fabric name for filter - /// Status of registration of this container with - /// the Recovery Services Vault. - /// Friendly name of this container. + + /// Backup management type for this container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Type of container for filter + /// Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', + /// 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', + /// 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + /// 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', + /// 'GenericContainer', 'HanaHSRContainer' + + /// Backup engine name + /// + + /// Fabric name for filter + /// + + /// Status of registration of this container with the Recovery Services Vault. + /// + + /// Friendly name of this container. + /// public BMSContainerQueryObject(string backupManagementType, string containerType = default(string), string backupEngineName = default(string), string fabricName = default(string), string status = default(string), string friendlyName = default(string)) + { - BackupManagementType = backupManagementType; - ContainerType = containerType; - BackupEngineName = backupEngineName; - FabricName = fabricName; - Status = status; - FriendlyName = friendlyName; + this.BackupManagementType = backupManagementType; + this.ContainerType = containerType; + this.BackupEngineName = backupEngineName; + this.FabricName = fabricName; + this.Status = status; + this.FriendlyName = friendlyName; CustomInit(); } @@ -62,63 +64,61 @@ public BMSContainerQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type for this container. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type for this container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets type of container for filter. Possible values include: - /// 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', - /// 'DPMContainer', 'AzureBackupServerContainer', 'MABContainer', - /// 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', - /// 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', - /// 'GenericContainer', 'HanaHSRContainer' + /// Gets or sets type of container for filter Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', 'GenericContainer', 'HanaHSRContainer' /// - [JsonProperty(PropertyName = "containerType")] - public string ContainerType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerType")] + public string ContainerType {get; set; } /// /// Gets or sets backup engine name /// - [JsonProperty(PropertyName = "backupEngineName")] - public string BackupEngineName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupEngineName")] + public string BackupEngineName {get; set; } /// /// Gets or sets fabric name for filter /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// - /// Gets or sets status of registration of this container with the - /// Recovery Services Vault. + /// Gets or sets status of registration of this container with the Recovery + /// Services Vault. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets friendly name of this container. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (BackupManagementType == null) + if (this.BackupManagementType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "BackupManagementType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "BackupManagementType"); } + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSContainersInquiryQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSContainersInquiryQueryObject.cs index 7ce7dd4fae49..ffb8369d6d58 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSContainersInquiryQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSContainersInquiryQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class BMSContainersInquiryQueryObject { /// - /// Initializes a new instance of the BMSContainersInquiryQueryObject - /// class. + /// Initializes a new instance of the BMSContainersInquiryQueryObject class. /// public BMSContainersInquiryQueryObject() { @@ -28,23 +21,24 @@ public BMSContainersInquiryQueryObject() } /// - /// Initializes a new instance of the BMSContainersInquiryQueryObject - /// class. + /// Initializes a new instance of the BMSContainersInquiryQueryObject class. /// - /// Backup management type for this - /// container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' + + /// Backup management type for this container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Workload type for this container. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' public BMSContainersInquiryQueryObject(string backupManagementType = default(string), string workloadType = default(string)) + { - BackupManagementType = backupManagementType; - WorkloadType = workloadType; + this.BackupManagementType = backupManagementType; + this.WorkloadType = workloadType; CustomInit(); } @@ -53,24 +47,17 @@ public BMSContainersInquiryQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type for this container. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type for this container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets workload type for this container. Possible values - /// include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', - /// 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets or sets workload type for this container. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSPOQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSPOQueryObject.cs index 37e9152fb658..3a720f092f13 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSPOQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSPOQueryObject.cs @@ -1,54 +1,56 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// /// Filters to list items that can be backed up. /// - public partial class BMSPOQueryObject + public partial class BmspoQueryObject { /// - /// Initializes a new instance of the BMSPOQueryObject class. + /// Initializes a new instance of the BmspoQueryObject class. /// - public BMSPOQueryObject() + public BmspoQueryObject() { CustomInit(); } /// - /// Initializes a new instance of the BMSPOQueryObject class. + /// Initializes a new instance of the BmspoQueryObject class. /// - /// Backup management type. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + + /// Backup management type. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', /// 'DefaultBackup' - /// Workload type. Possible values include: - /// 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - /// 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' - /// Full name of the container whose - /// Protectable Objects should be returned. - /// Backup status query parameter. - /// Friendly name. - public BMSPOQueryObject(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string status = default(string), string friendlyName = default(string)) + + /// Workload type + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Full name of the container whose Protectable Objects should be returned. + /// + + /// Backup status query parameter. + /// + + /// Friendly name. + /// + public BmspoQueryObject(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string status = default(string), string friendlyName = default(string)) + { - BackupManagementType = backupManagementType; - WorkloadType = workloadType; - ContainerName = containerName; - Status = status; - FriendlyName = friendlyName; + this.BackupManagementType = backupManagementType; + this.WorkloadType = workloadType; + this.ContainerName = containerName; + this.Status = status; + this.FriendlyName = friendlyName; CustomInit(); } @@ -57,42 +59,36 @@ public BMSPOQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type. Possible values include: - /// 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', - /// 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + /// Gets or sets backup management type. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets workload type. Possible values include: 'Invalid', - /// 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - /// 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets or sets workload type Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// - /// Gets or sets full name of the container whose Protectable Objects - /// should be returned. + /// Gets or sets full name of the container whose Protectable Objects should be + /// returned. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets backup status query parameter. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets friendly name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSRPQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSRPQueryObject.cs index 6d0cc2c17958..de71cd208f30 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSRPQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSRPQueryObject.cs @@ -1,53 +1,54 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// /// Filters to list backup copies. /// - public partial class BMSRPQueryObject + public partial class BmsrpQueryObject { /// - /// Initializes a new instance of the BMSRPQueryObject class. + /// Initializes a new instance of the BmsrpQueryObject class. /// - public BMSRPQueryObject() + public BmsrpQueryObject() { CustomInit(); } /// - /// Initializes a new instance of the BMSRPQueryObject class. + /// Initializes a new instance of the BmsrpQueryObject class. /// - /// Backup copies created after this - /// time. - /// Backup copies created before this - /// time. - /// RestorePoint type. Possible - /// values include: 'Invalid', 'Full', 'Log', 'Differential', + + /// Backup copies created after this time. + /// + + /// Backup copies created before this time. + /// + + /// RestorePoint type + /// Possible values include: 'Invalid', 'Full', 'Log', 'Differential', /// 'FullAndDifferential', 'All', 'Incremental', 'SnapshotFull', /// 'SnapshotCopyOnlyFull' - /// In Get Recovery Point, it tells whether - /// extended information about recovery point is asked. - /// Whether the RP can be moved to - /// another tier - public BMSRPQueryObject(System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), string restorePointQueryType = default(string), bool? extendedInfo = default(bool?), bool? moveReadyRPOnly = default(bool?)) + + /// In Get Recovery Point, it tells whether extended information about recovery + /// point is asked. + /// + + /// Whether the RP can be moved to another tier + /// + public BmsrpQueryObject(System.DateTime? startDate = default(System.DateTime?), System.DateTime? endDate = default(System.DateTime?), string restorePointQueryType = default(string), bool? extendedInfo = default(bool?), bool? moveReadyRpOnly = default(bool?)) + { - StartDate = startDate; - EndDate = endDate; - RestorePointQueryType = restorePointQueryType; - ExtendedInfo = extendedInfo; - MoveReadyRPOnly = moveReadyRPOnly; + this.StartDate = startDate; + this.EndDate = endDate; + this.RestorePointQueryType = restorePointQueryType; + this.ExtendedInfo = extendedInfo; + this.MoveReadyRpOnly = moveReadyRpOnly; CustomInit(); } @@ -56,38 +57,36 @@ public BMSRPQueryObject() /// partial void CustomInit(); + /// /// Gets or sets backup copies created after this time. /// - [JsonProperty(PropertyName = "startDate")] - public System.DateTime? StartDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startDate")] + public System.DateTime? StartDate {get; set; } /// /// Gets or sets backup copies created before this time. /// - [JsonProperty(PropertyName = "endDate")] - public System.DateTime? EndDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endDate")] + public System.DateTime? EndDate {get; set; } /// - /// Gets or sets restorePoint type. Possible values include: 'Invalid', - /// 'Full', 'Log', 'Differential', 'FullAndDifferential', 'All', - /// 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + /// Gets or sets restorePoint type Possible values include: 'Invalid', 'Full', 'Log', 'Differential', 'FullAndDifferential', 'All', 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' /// - [JsonProperty(PropertyName = "restorePointQueryType")] - public string RestorePointQueryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restorePointQueryType")] + public string RestorePointQueryType {get; set; } /// - /// Gets or sets in Get Recovery Point, it tells whether extended - /// information about recovery point is asked. + /// Gets or sets in Get Recovery Point, it tells whether extended information + /// about recovery point is asked. /// - [JsonProperty(PropertyName = "extendedInfo")] - public bool? ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public bool? ExtendedInfo {get; set; } /// /// Gets or sets whether the RP can be moved to another tier /// - [JsonProperty(PropertyName = "moveReadyRPOnly")] - public bool? MoveReadyRPOnly { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "moveReadyRPOnly")] + public bool? MoveReadyRpOnly {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSRefreshContainersQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSRefreshContainersQueryObject.cs index bf6b588f264e..45478b5d198a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSRefreshContainersQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSRefreshContainersQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class BMSRefreshContainersQueryObject { /// - /// Initializes a new instance of the BMSRefreshContainersQueryObject - /// class. + /// Initializes a new instance of the BMSRefreshContainersQueryObject class. /// public BMSRefreshContainersQueryObject() { @@ -28,16 +21,17 @@ public BMSRefreshContainersQueryObject() } /// - /// Initializes a new instance of the BMSRefreshContainersQueryObject - /// class. + /// Initializes a new instance of the BMSRefreshContainersQueryObject class. /// - /// Backup management type for this - /// container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' + + /// Backup management type for this container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' public BMSRefreshContainersQueryObject(string backupManagementType = default(string)) + { - BackupManagementType = backupManagementType; + this.BackupManagementType = backupManagementType; CustomInit(); } @@ -46,14 +40,11 @@ public BMSRefreshContainersQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type for this container. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type for this container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSWorkloadItemQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSWorkloadItemQueryObject.cs index 626521d97fde..fe59bf2cc809 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSWorkloadItemQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BMSWorkloadItemQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,28 +23,33 @@ public BMSWorkloadItemQueryObject() /// /// Initializes a new instance of the BMSWorkloadItemQueryObject class. /// - /// Backup management type. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + + /// Backup management type. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', /// 'DefaultBackup' - /// Workload Item type. Possible values - /// include: 'Invalid', 'SQLInstance', 'SQLDataBase', 'SAPHanaSystem', - /// 'SAPHanaDatabase', 'SAPAseSystem', 'SAPAseDatabase', + + /// Workload Item type + /// Possible values include: 'Invalid', 'SQLInstance', 'SQLDataBase', + /// 'SAPHanaSystem', 'SAPHanaDatabase', 'SAPAseSystem', 'SAPAseDatabase', /// 'SAPHanaDBInstance' - /// Workload type. Possible values include: - /// 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - /// 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Workload type + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Backup status query parameter. /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' public BMSWorkloadItemQueryObject(string backupManagementType = default(string), string workloadItemType = default(string), string workloadType = default(string), string protectionStatus = default(string)) + { - BackupManagementType = backupManagementType; - WorkloadItemType = workloadItemType; - WorkloadType = workloadType; - ProtectionStatus = protectionStatus; + this.BackupManagementType = backupManagementType; + this.WorkloadItemType = workloadItemType; + this.WorkloadType = workloadType; + this.ProtectionStatus = protectionStatus; CustomInit(); } @@ -59,40 +58,29 @@ public BMSWorkloadItemQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type. Possible values include: - /// 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', - /// 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + /// Gets or sets backup management type. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets workload Item type. Possible values include: - /// 'Invalid', 'SQLInstance', 'SQLDataBase', 'SAPHanaSystem', - /// 'SAPHanaDatabase', 'SAPAseSystem', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' + /// Gets or sets workload Item type Possible values include: 'Invalid', 'SQLInstance', 'SQLDataBase', 'SAPHanaSystem', 'SAPHanaDatabase', 'SAPAseSystem', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workloadItemType")] - public string WorkloadItemType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadItemType")] + public string WorkloadItemType {get; set; } /// - /// Gets or sets workload type. Possible values include: 'Invalid', - /// 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - /// 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets or sets workload type Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// - /// Gets or sets backup status query parameter. Possible values - /// include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', - /// 'ProtectionFailed' + /// Gets or sets backup status query parameter. Possible values include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', 'ProtectionFailed' /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineBase.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineBase.cs index 1c12589f41a1..3209062d2974 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineBase.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineBase.cs @@ -1,21 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// The base backup engine class. All workload specific backup engines - /// derive from this class. + /// The base backup engine class. All workload specific backup engines derive + /// from this class. /// [Newtonsoft.Json.JsonObject("BackupEngineBase")] public partial class BackupEngineBase @@ -31,44 +25,61 @@ public BackupEngineBase() /// /// Initializes a new instance of the BackupEngineBase class. /// - /// Friendly name of the backup - /// engine. - /// Type of backup management for - /// the backup engine. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// Registration status of the backup - /// engine with the Recovery Services Vault. - /// Status of the backup engine with - /// the Recovery Services Vault. = - /// {Active/Deleting/DeleteFailed} - /// Backup status of the backup - /// engine. - /// Flag indicating if the backup engine be - /// registered, once already registered. - /// ID of the backup engine. - /// Backup engine version - /// Backup agent version - /// To check if backup - /// agent upgrade available - /// To check if backup engine - /// upgrade available - /// Extended info of the - /// backupengine + + /// Friendly name of the backup engine. + /// + + /// Type of backup management for the backup engine. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Registration status of the backup engine with the Recovery Services Vault. + /// + + /// Status of the backup engine with the Recovery Services Vault. = + /// {Active/Deleting/DeleteFailed} + /// + + /// Backup status of the backup engine. + /// + + /// Flag indicating if the backup engine be registered, once already + /// registered. + /// + + /// ID of the backup engine. + /// + + /// Backup engine version + /// + + /// Backup agent version + /// + + /// To check if backup agent upgrade available + /// + + /// To check if backup engine upgrade available + /// + + /// Extended info of the backupengine + /// public BackupEngineBase(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string backupEngineState = default(string), string healthStatus = default(string), bool? canReRegister = default(bool?), string backupEngineId = default(string), string dpmVersion = default(string), string azureBackupAgentVersion = default(string), bool? isAzureBackupAgentUpgradeAvailable = default(bool?), bool? isDpmUpgradeAvailable = default(bool?), BackupEngineExtendedInfo extendedInfo = default(BackupEngineExtendedInfo)) + { - FriendlyName = friendlyName; - BackupManagementType = backupManagementType; - RegistrationStatus = registrationStatus; - BackupEngineState = backupEngineState; - HealthStatus = healthStatus; - CanReRegister = canReRegister; - BackupEngineId = backupEngineId; - DpmVersion = dpmVersion; - AzureBackupAgentVersion = azureBackupAgentVersion; - IsAzureBackupAgentUpgradeAvailable = isAzureBackupAgentUpgradeAvailable; - IsDpmUpgradeAvailable = isDpmUpgradeAvailable; - ExtendedInfo = extendedInfo; + this.FriendlyName = friendlyName; + this.BackupManagementType = backupManagementType; + this.RegistrationStatus = registrationStatus; + this.BackupEngineState = backupEngineState; + this.HealthStatus = healthStatus; + this.CanReRegister = canReRegister; + this.BackupEngineId = backupEngineId; + this.DpmVersion = dpmVersion; + this.AzureBackupAgentVersion = azureBackupAgentVersion; + this.IsAzureBackupAgentUpgradeAvailable = isAzureBackupAgentUpgradeAvailable; + this.IsDpmUpgradeAvailable = isDpmUpgradeAvailable; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -77,83 +88,80 @@ public BackupEngineBase() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the backup engine. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets type of backup management for the backup engine. - /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets type of backup management for the backup engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets registration status of the backup engine with the - /// Recovery Services Vault. + /// Gets or sets registration status of the backup engine with the Recovery + /// Services Vault. /// - [JsonProperty(PropertyName = "registrationStatus")] - public string RegistrationStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "registrationStatus")] + public string RegistrationStatus {get; set; } /// - /// Gets or sets status of the backup engine with the Recovery Services - /// Vault. = {Active/Deleting/DeleteFailed} + /// Gets or sets status of the backup engine with the Recovery Services Vault. + /// = {Active/Deleting/DeleteFailed} /// - [JsonProperty(PropertyName = "backupEngineState")] - public string BackupEngineState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupEngineState")] + public string BackupEngineState {get; set; } /// /// Gets or sets backup status of the backup engine. /// - [JsonProperty(PropertyName = "healthStatus")] - public string HealthStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthStatus")] + public string HealthStatus {get; set; } /// - /// Gets or sets flag indicating if the backup engine be registered, - /// once already registered. + /// Gets or sets flag indicating if the backup engine be registered, once + /// already registered. /// - [JsonProperty(PropertyName = "canReRegister")] - public bool? CanReRegister { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "canReRegister")] + public bool? CanReRegister {get; set; } /// - /// Gets or sets ID of the backup engine. + /// Gets or sets iD of the backup engine. /// - [JsonProperty(PropertyName = "backupEngineId")] - public string BackupEngineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupEngineId")] + public string BackupEngineId {get; set; } /// /// Gets or sets backup engine version /// - [JsonProperty(PropertyName = "dpmVersion")] - public string DpmVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dpmVersion")] + public string DpmVersion {get; set; } /// /// Gets or sets backup agent version /// - [JsonProperty(PropertyName = "azureBackupAgentVersion")] - public string AzureBackupAgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureBackupAgentVersion")] + public string AzureBackupAgentVersion {get; set; } /// /// Gets or sets to check if backup agent upgrade available /// - [JsonProperty(PropertyName = "isAzureBackupAgentUpgradeAvailable")] - public bool? IsAzureBackupAgentUpgradeAvailable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isAzureBackupAgentUpgradeAvailable")] + public bool? IsAzureBackupAgentUpgradeAvailable {get; set; } /// /// Gets or sets to check if backup engine upgrade available /// - [JsonProperty(PropertyName = "isDpmUpgradeAvailable")] - public bool? IsDpmUpgradeAvailable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isDpmUpgradeAvailable")] + public bool? IsDpmUpgradeAvailable {get; set; } /// /// Gets or sets extended info of the backupengine /// - [JsonProperty(PropertyName = "extendedInfo")] - public BackupEngineExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public BackupEngineExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineBaseResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineBaseResource.cs index 48745ffd84bb..779994e335a8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineBaseResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineBaseResource.cs @@ -1,23 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// The base backup engine class. All workload specific backup engines - /// derive from this class. + /// The base backup engine class. All workload specific backup engines derive + /// from this class. /// public partial class BackupEngineBaseResource : Resource { @@ -32,21 +24,33 @@ public BackupEngineBaseResource() /// /// Initializes a new instance of the BackupEngineBaseResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// BackupEngineBaseResource - /// properties - public BackupEngineBaseResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), BackupEngineBase properties = default(BackupEngineBase)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// BackupEngineBaseResource properties + /// + public BackupEngineBaseResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), BackupEngineBase properties = default(BackupEngineBase)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -55,11 +59,11 @@ public BackupEngineBaseResource() /// partial void CustomInit(); + /// /// Gets or sets backupEngineBaseResource properties /// - [JsonProperty(PropertyName = "properties")] - public BackupEngineBase Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public BackupEngineBase Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineExtendedInfo.cs index 122b0a8e816d..f333853ecd68 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,31 +23,41 @@ public BackupEngineExtendedInfo() /// /// Initializes a new instance of the BackupEngineExtendedInfo class. /// - /// Database name of backup engine. - /// Number of protected items in the - /// backup engine. - /// Number of protected servers in - /// the backup engine. - /// Number of disks in the backup - /// engine. - /// Disk space used in the backup - /// engine. - /// Disk space currently available in - /// the backup engine. - /// Last refresh time in the backup - /// engine. - /// Protected instances in the - /// backup engine. + + /// Database name of backup engine. + /// + + /// Number of protected items in the backup engine. + /// + + /// Number of protected servers in the backup engine. + /// + + /// Number of disks in the backup engine. + /// + + /// Disk space used in the backup engine. + /// + + /// Disk space currently available in the backup engine. + /// + + /// Last refresh time in the backup engine. + /// + + /// Protected instances in the backup engine. + /// public BackupEngineExtendedInfo(string databaseName = default(string), int? protectedItemsCount = default(int?), int? protectedServersCount = default(int?), int? diskCount = default(int?), double? usedDiskSpace = default(double?), double? availableDiskSpace = default(double?), System.DateTime? refreshedAt = default(System.DateTime?), int? azureProtectedInstances = default(int?)) + { - DatabaseName = databaseName; - ProtectedItemsCount = protectedItemsCount; - ProtectedServersCount = protectedServersCount; - DiskCount = diskCount; - UsedDiskSpace = usedDiskSpace; - AvailableDiskSpace = availableDiskSpace; - RefreshedAt = refreshedAt; - AzureProtectedInstances = azureProtectedInstances; + this.DatabaseName = databaseName; + this.ProtectedItemsCount = protectedItemsCount; + this.ProtectedServersCount = protectedServersCount; + this.DiskCount = diskCount; + this.UsedDiskSpace = usedDiskSpace; + this.AvailableDiskSpace = availableDiskSpace; + this.RefreshedAt = refreshedAt; + this.AzureProtectedInstances = azureProtectedInstances; CustomInit(); } @@ -62,53 +66,53 @@ public BackupEngineExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets database name of backup engine. /// - [JsonProperty(PropertyName = "databaseName")] - public string DatabaseName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "databaseName")] + public string DatabaseName {get; set; } /// /// Gets or sets number of protected items in the backup engine. /// - [JsonProperty(PropertyName = "protectedItemsCount")] - public int? ProtectedItemsCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemsCount")] + public int? ProtectedItemsCount {get; set; } /// /// Gets or sets number of protected servers in the backup engine. /// - [JsonProperty(PropertyName = "protectedServersCount")] - public int? ProtectedServersCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedServersCount")] + public int? ProtectedServersCount {get; set; } /// /// Gets or sets number of disks in the backup engine. /// - [JsonProperty(PropertyName = "diskCount")] - public int? DiskCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskCount")] + public int? DiskCount {get; set; } /// /// Gets or sets disk space used in the backup engine. /// - [JsonProperty(PropertyName = "usedDiskSpace")] - public double? UsedDiskSpace { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "usedDiskSpace")] + public double? UsedDiskSpace {get; set; } /// /// Gets or sets disk space currently available in the backup engine. /// - [JsonProperty(PropertyName = "availableDiskSpace")] - public double? AvailableDiskSpace { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "availableDiskSpace")] + public double? AvailableDiskSpace {get; set; } /// /// Gets or sets last refresh time in the backup engine. /// - [JsonProperty(PropertyName = "refreshedAt")] - public System.DateTime? RefreshedAt { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "refreshedAt")] + public System.DateTime? RefreshedAt {get; set; } /// /// Gets or sets protected instances in the backup engine. /// - [JsonProperty(PropertyName = "azureProtectedInstances")] - public int? AzureProtectedInstances { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "azureProtectedInstances")] + public int? AzureProtectedInstances {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineType.cs new file mode 100644 index 000000000000..c9318541b1e0 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupEngineType.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models +{ + + /// + /// Defines values for BackupEngineType. + /// + + + public static class BackupEngineType + { + public const string Invalid = "Invalid"; + public const string DpmBackupEngine = "DpmBackupEngine"; + public const string AzureBackupServerEngine = "AzureBackupServerEngine"; + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupItemType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupItemType.cs index 889eac8337da..ad1901c7f686 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupItemType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupItemType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,13 +9,15 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for BackupItemType. /// + + public static class BackupItemType { public const string Invalid = "Invalid"; public const string VM = "VM"; public const string FileFolder = "FileFolder"; public const string AzureSqlDb = "AzureSqlDb"; - public const string SQLDB = "SQLDB"; + public const string Sqldb = "SQLDB"; public const string Exchange = "Exchange"; public const string Sharepoint = "Sharepoint"; public const string VMwareVM = "VMwareVM"; @@ -33,4 +30,4 @@ public static class BackupItemType public const string SAPAseDatabase = "SAPAseDatabase"; public const string SAPHanaDBInstance = "SAPHanaDBInstance"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupManagementType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupManagementType.cs index f430a5d6cc0f..64949cf1d633 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupManagementType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupManagementType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for BackupManagementType. /// + + public static class BackupManagementType { public const string Invalid = "Invalid"; @@ -26,4 +23,4 @@ public static class BackupManagementType public const string AzureWorkload = "AzureWorkload"; public const string DefaultBackup = "DefaultBackup"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupManagementUsage.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupManagementUsage.cs index fc699d5234fa..92c603e2e7e4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupManagementUsage.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupManagementUsage.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,22 +23,34 @@ public BackupManagementUsage() /// /// Initializes a new instance of the BackupManagementUsage class. /// - /// Unit of the usage. Possible values include: - /// 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', - /// 'BytesPerSecond' - /// Quota period of usage. - /// Next reset time of usage. - /// Current value of usage. - /// Limit of usage. - /// Name of usage. + + /// Unit of the usage. + /// Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + /// 'CountPerSecond', 'BytesPerSecond' + + /// Quota period of usage. + /// + + /// Next reset time of usage. + /// + + /// Current value of usage. + /// + + /// Limit of usage. + /// + + /// Name of usage. + /// public BackupManagementUsage(string unit = default(string), string quotaPeriod = default(string), System.DateTime? nextResetTime = default(System.DateTime?), long? currentValue = default(long?), long? limit = default(long?), NameInfo name = default(NameInfo)) + { - Unit = unit; - QuotaPeriod = quotaPeriod; - NextResetTime = nextResetTime; - CurrentValue = currentValue; - Limit = limit; - Name = name; + this.Unit = unit; + this.QuotaPeriod = quotaPeriod; + this.NextResetTime = nextResetTime; + this.CurrentValue = currentValue; + this.Limit = limit; + this.Name = name; CustomInit(); } @@ -53,42 +59,41 @@ public BackupManagementUsage() /// partial void CustomInit(); + /// - /// Gets or sets unit of the usage. Possible values include: 'Count', - /// 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + /// Gets or sets unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' /// - [JsonProperty(PropertyName = "unit")] - public string Unit { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "unit")] + public string Unit {get; set; } /// /// Gets or sets quota period of usage. /// - [JsonProperty(PropertyName = "quotaPeriod")] - public string QuotaPeriod { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "quotaPeriod")] + public string QuotaPeriod {get; set; } /// /// Gets or sets next reset time of usage. /// - [JsonProperty(PropertyName = "nextResetTime")] - public System.DateTime? NextResetTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nextResetTime")] + public System.DateTime? NextResetTime {get; set; } /// /// Gets or sets current value of usage. /// - [JsonProperty(PropertyName = "currentValue")] - public long? CurrentValue { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "currentValue")] + public long? CurrentValue {get; set; } /// /// Gets or sets limit of usage. /// - [JsonProperty(PropertyName = "limit")] - public long? Limit { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "limit")] + public long? Limit {get; set; } /// /// Gets or sets name of usage. /// - [JsonProperty(PropertyName = "name")] - public NameInfo Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public NameInfo Name {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupRequest.cs index 19a65ccf7fe9..737cc735d546 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -35,4 +29,4 @@ public BackupRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupRequestResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupRequestResource.cs index 659bd67cefeb..8574acd449e7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupRequestResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupRequestResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,20 +24,33 @@ public BackupRequestResource() /// /// Initializes a new instance of the BackupRequestResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// BackupRequestResource properties - public BackupRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), BackupRequest properties = default(BackupRequest)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// BackupRequestResource properties + /// + public BackupRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), BackupRequest properties = default(BackupRequest)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -54,11 +59,11 @@ public BackupRequestResource() /// partial void CustomInit(); + /// /// Gets or sets backupRequestResource properties /// - [JsonProperty(PropertyName = "properties")] - public BackupRequest Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public BackupRequest Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceConfig.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceConfig.cs index 4c815a334c3e..2ca47c3f2d70 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceConfig.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceConfig.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,30 +23,36 @@ public BackupResourceConfig() /// /// Initializes a new instance of the BackupResourceConfig class. /// - /// Storage type. Possible values - /// include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + + /// Storage type + /// Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + /// 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' + + /// Storage type. + /// Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', /// 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' - /// Storage type. Possible values include: - /// 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', - /// 'ReadAccessGeoZoneRedundant' - /// Locked or Unlocked. Once a machine - /// is registered against a resource, the storageTypeState is always - /// Locked. Possible values include: 'Invalid', 'Locked', - /// 'Unlocked' - /// Opt in details of Cross Region - /// Restore feature. - /// Vault Dedup state. Possible values - /// include: 'Invalid', 'Enabled', 'Disabled' - /// Vault x-cool state. Possible values - /// include: 'Invalid', 'Enabled', 'Disabled' + + /// Locked or Unlocked. Once a machine is registered against a resource, the + /// storageTypeState is always Locked. + /// Possible values include: 'Invalid', 'Locked', 'Unlocked' + + /// Opt in details of Cross Region Restore feature. + /// + + /// Vault Dedup state + /// Possible values include: 'Invalid', 'Enabled', 'Disabled' + + /// Vault x-cool state + /// Possible values include: 'Invalid', 'Enabled', 'Disabled' public BackupResourceConfig(string storageModelType = default(string), string storageType = default(string), string storageTypeState = default(string), bool? crossRegionRestoreFlag = default(bool?), string dedupState = default(string), string xcoolState = default(string)) + { - StorageModelType = storageModelType; - StorageType = storageType; - StorageTypeState = storageTypeState; - CrossRegionRestoreFlag = crossRegionRestoreFlag; - DedupState = dedupState; - XcoolState = xcoolState; + this.StorageModelType = storageModelType; + this.StorageType = storageType; + this.StorageTypeState = storageTypeState; + this.CrossRegionRestoreFlag = crossRegionRestoreFlag; + this.DedupState = dedupState; + this.XcoolState = xcoolState; CustomInit(); } @@ -61,49 +61,42 @@ public BackupResourceConfig() /// partial void CustomInit(); + /// - /// Gets or sets storage type. Possible values include: 'Invalid', - /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', - /// 'ReadAccessGeoZoneRedundant' + /// Gets or sets storage type Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' /// - [JsonProperty(PropertyName = "storageModelType")] - public string StorageModelType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageModelType")] + public string StorageModelType {get; set; } /// - /// Gets or sets storage type. Possible values include: 'Invalid', - /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', - /// 'ReadAccessGeoZoneRedundant' + /// Gets or sets storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' /// - [JsonProperty(PropertyName = "storageType")] - public string StorageType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "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' + /// 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 = "storageTypeState")] - public string StorageTypeState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageTypeState")] + public string StorageTypeState {get; set; } /// /// Gets or sets opt in details of Cross Region Restore feature. /// - [JsonProperty(PropertyName = "crossRegionRestoreFlag")] - public bool? CrossRegionRestoreFlag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crossRegionRestoreFlag")] + public bool? CrossRegionRestoreFlag {get; set; } /// - /// Gets or sets vault Dedup state. Possible values include: 'Invalid', - /// 'Enabled', 'Disabled' + /// Gets or sets vault Dedup state Possible values include: 'Invalid', 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "dedupState")] - public string DedupState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dedupState")] + public string DedupState {get; set; } /// - /// Gets or sets vault x-cool state. Possible values include: - /// 'Invalid', 'Enabled', 'Disabled' + /// Gets or sets vault x-cool state Possible values include: 'Invalid', 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "xcoolState")] - public string XcoolState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "xcoolState")] + public string XcoolState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceConfigResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceConfigResource.cs index 09e3786c53bc..af93875a892b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceConfigResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceConfigResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class BackupResourceConfigResource : Resource { /// - /// Initializes a new instance of the BackupResourceConfigResource - /// class. + /// Initializes a new instance of the BackupResourceConfigResource class. /// public BackupResourceConfigResource() { @@ -30,24 +21,35 @@ public BackupResourceConfigResource() } /// - /// Initializes a new instance of the BackupResourceConfigResource - /// class. + /// Initializes a new instance of the BackupResourceConfigResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// BackupResourceConfigResource - /// properties - public BackupResourceConfigResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), BackupResourceConfig properties = default(BackupResourceConfig)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// BackupResourceConfigResource properties + /// + public BackupResourceConfigResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), BackupResourceConfig properties = default(BackupResourceConfig)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -56,11 +58,11 @@ public BackupResourceConfigResource() /// partial void CustomInit(); + /// /// Gets or sets backupResourceConfigResource properties /// - [JsonProperty(PropertyName = "properties")] - public BackupResourceConfig Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public BackupResourceConfig Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfig.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfig.cs index 5a5b6ef90031..460a96c5b052 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfig.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfig.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; public partial class BackupResourceEncryptionConfig { /// - /// Initializes a new instance of the BackupResourceEncryptionConfig - /// class. + /// Initializes a new instance of the BackupResourceEncryptionConfig class. /// public BackupResourceEncryptionConfig() { @@ -25,26 +18,33 @@ public BackupResourceEncryptionConfig() } /// - /// Initializes a new instance of the BackupResourceEncryptionConfig - /// class. + /// Initializes a new instance of the BackupResourceEncryptionConfig class. /// - /// Encryption At Rest Type. - /// Possible values include: 'Invalid', 'MicrosoftManaged', - /// 'CustomerManaged' - /// Key Vault Key URI - /// Key Vault Subscription Id - /// Possible values include: 'Invalid', - /// 'NotEnabled', 'PartiallySucceeded', 'PartiallyFailed', 'Failed', - /// 'Succeeded', 'Initialized', 'FirstInitialization' - /// Possible values - /// include: 'Invalid', 'Disabled', 'Enabled' + + /// Encryption At Rest Type + /// Possible values include: 'Invalid', 'MicrosoftManaged', 'CustomerManaged' + + /// Key Vault Key URI + /// + + /// Key Vault Subscription Id + /// + + /// + /// Possible values include: 'Invalid', 'NotEnabled', 'PartiallySucceeded', + /// 'PartiallyFailed', 'Failed', 'Succeeded', 'Initialized', + /// 'FirstInitialization' + + /// + /// Possible values include: 'Invalid', 'Disabled', 'Enabled' public BackupResourceEncryptionConfig(string encryptionAtRestType = default(string), string keyUri = default(string), string subscriptionId = default(string), string lastUpdateStatus = default(string), string infrastructureEncryptionState = default(string)) + { - EncryptionAtRestType = encryptionAtRestType; - KeyUri = keyUri; - SubscriptionId = subscriptionId; - LastUpdateStatus = lastUpdateStatus; - InfrastructureEncryptionState = infrastructureEncryptionState; + this.EncryptionAtRestType = encryptionAtRestType; + this.KeyUri = keyUri; + this.SubscriptionId = subscriptionId; + this.LastUpdateStatus = lastUpdateStatus; + this.InfrastructureEncryptionState = infrastructureEncryptionState; CustomInit(); } @@ -53,39 +53,35 @@ public BackupResourceEncryptionConfig() /// partial void CustomInit(); + /// - /// Gets or sets encryption At Rest Type. Possible values include: - /// 'Invalid', 'MicrosoftManaged', 'CustomerManaged' + /// Gets or sets encryption At Rest Type Possible values include: 'Invalid', 'MicrosoftManaged', 'CustomerManaged' /// - [JsonProperty(PropertyName = "encryptionAtRestType")] - public string EncryptionAtRestType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionAtRestType")] + public string EncryptionAtRestType {get; set; } /// /// Gets or sets key Vault Key URI /// - [JsonProperty(PropertyName = "keyUri")] - public string KeyUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyUri")] + public string KeyUri {get; set; } /// /// Gets or sets key Vault Subscription Id /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId {get; set; } /// - /// Gets or sets possible values include: 'Invalid', 'NotEnabled', - /// 'PartiallySucceeded', 'PartiallyFailed', 'Failed', 'Succeeded', - /// 'Initialized', 'FirstInitialization' + /// Gets or sets Possible values include: 'Invalid', 'NotEnabled', 'PartiallySucceeded', 'PartiallyFailed', 'Failed', 'Succeeded', 'Initialized', 'FirstInitialization' /// - [JsonProperty(PropertyName = "lastUpdateStatus")] - public string LastUpdateStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUpdateStatus")] + public string LastUpdateStatus {get; set; } /// - /// Gets or sets possible values include: 'Invalid', 'Disabled', - /// 'Enabled' + /// Gets or sets Possible values include: 'Invalid', 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "infrastructureEncryptionState")] - public string InfrastructureEncryptionState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "infrastructureEncryptionState")] + public string InfrastructureEncryptionState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigExtended.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigExtended.cs index 6ab7b66214e8..dac44b5cfc4b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigExtended.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigExtended.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; public partial class BackupResourceEncryptionConfigExtended : BackupResourceEncryptionConfig { /// - /// Initializes a new instance of the - /// BackupResourceEncryptionConfigExtended class. + /// Initializes a new instance of the BackupResourceEncryptionConfigExtended class. /// public BackupResourceEncryptionConfigExtended() { @@ -25,28 +18,37 @@ public BackupResourceEncryptionConfigExtended() } /// - /// Initializes a new instance of the - /// BackupResourceEncryptionConfigExtended class. + /// Initializes a new instance of the BackupResourceEncryptionConfigExtended class. /// - /// Encryption At Rest Type. - /// Possible values include: 'Invalid', 'MicrosoftManaged', - /// 'CustomerManaged' - /// Key Vault Key URI - /// Key Vault Subscription Id - /// Possible values include: 'Invalid', - /// 'NotEnabled', 'PartiallySucceeded', 'PartiallyFailed', 'Failed', - /// 'Succeeded', 'Initialized', 'FirstInitialization' - /// Possible values - /// include: 'Invalid', 'Disabled', 'Enabled' - /// User Assigned Identity - /// Id - /// bool to indicate whether to - /// use system Assigned Identity or not + + /// Encryption At Rest Type + /// Possible values include: 'Invalid', 'MicrosoftManaged', 'CustomerManaged' + + /// Key Vault Key URI + /// + + /// Key Vault Subscription Id + /// + + /// + /// Possible values include: 'Invalid', 'NotEnabled', 'PartiallySucceeded', + /// 'PartiallyFailed', 'Failed', 'Succeeded', 'Initialized', + /// 'FirstInitialization' + + /// + /// Possible values include: 'Invalid', 'Disabled', 'Enabled' + + /// User Assigned Identity Id + /// + + /// bool to indicate whether to use system Assigned Identity or not + /// public BackupResourceEncryptionConfigExtended(string encryptionAtRestType = default(string), string keyUri = default(string), string subscriptionId = default(string), string lastUpdateStatus = default(string), string infrastructureEncryptionState = default(string), string userAssignedIdentity = default(string), bool? useSystemAssignedIdentity = default(bool?)) - : base(encryptionAtRestType, keyUri, subscriptionId, lastUpdateStatus, infrastructureEncryptionState) + + : base(encryptionAtRestType, keyUri, subscriptionId, lastUpdateStatus, infrastructureEncryptionState) { - UserAssignedIdentity = userAssignedIdentity; - UseSystemAssignedIdentity = useSystemAssignedIdentity; + this.UserAssignedIdentity = userAssignedIdentity; + this.UseSystemAssignedIdentity = useSystemAssignedIdentity; CustomInit(); } @@ -55,18 +57,18 @@ public BackupResourceEncryptionConfigExtended() /// partial void CustomInit(); + /// /// Gets or sets user Assigned Identity Id /// - [JsonProperty(PropertyName = "userAssignedIdentity")] - public string UserAssignedIdentity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentity")] + public string UserAssignedIdentity {get; set; } /// - /// Gets or sets bool to indicate whether to use system Assigned - /// Identity or not + /// Gets or sets bool to indicate whether to use system Assigned Identity or + /// not /// - [JsonProperty(PropertyName = "useSystemAssignedIdentity")] - public bool? UseSystemAssignedIdentity { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "useSystemAssignedIdentity")] + public bool? UseSystemAssignedIdentity {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigExtendedResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigExtendedResource.cs index 734e94f8a2b0..af3d9a191013 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigExtendedResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigExtendedResource.cs @@ -1,25 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class BackupResourceEncryptionConfigExtendedResource : Resource { /// - /// Initializes a new instance of the - /// BackupResourceEncryptionConfigExtendedResource class. + /// Initializes a new instance of the BackupResourceEncryptionConfigExtendedResource class. /// public BackupResourceEncryptionConfigExtendedResource() { @@ -27,25 +18,35 @@ public BackupResourceEncryptionConfigExtendedResource() } /// - /// Initializes a new instance of the - /// BackupResourceEncryptionConfigExtendedResource class. + /// Initializes a new instance of the BackupResourceEncryptionConfigExtendedResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// BackupResourceEncryptionConfigExtendedResource - /// properties - public BackupResourceEncryptionConfigExtendedResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), BackupResourceEncryptionConfigExtended properties = default(BackupResourceEncryptionConfigExtended)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// BackupResourceEncryptionConfigExtendedResource properties + /// + public BackupResourceEncryptionConfigExtendedResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), BackupResourceEncryptionConfigExtended properties = default(BackupResourceEncryptionConfigExtended)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -54,12 +55,11 @@ public BackupResourceEncryptionConfigExtendedResource() /// partial void CustomInit(); + /// - /// Gets or sets backupResourceEncryptionConfigExtendedResource - /// properties + /// Gets or sets backupResourceEncryptionConfigExtendedResource properties /// - [JsonProperty(PropertyName = "properties")] - public BackupResourceEncryptionConfigExtended Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public BackupResourceEncryptionConfigExtended Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigResource.cs index 01891ae7d091..a18616a1d3cc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceEncryptionConfigResource.cs @@ -1,25 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class BackupResourceEncryptionConfigResource : Resource { /// - /// Initializes a new instance of the - /// BackupResourceEncryptionConfigResource class. + /// Initializes a new instance of the BackupResourceEncryptionConfigResource class. /// public BackupResourceEncryptionConfigResource() { @@ -27,24 +18,35 @@ public BackupResourceEncryptionConfigResource() } /// - /// Initializes a new instance of the - /// BackupResourceEncryptionConfigResource class. + /// Initializes a new instance of the BackupResourceEncryptionConfigResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// BackupResourceEncryptionConfigResource - /// properties - public BackupResourceEncryptionConfigResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), BackupResourceEncryptionConfig properties = default(BackupResourceEncryptionConfig)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// BackupResourceEncryptionConfigResource properties + /// + public BackupResourceEncryptionConfigResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), BackupResourceEncryptionConfig properties = default(BackupResourceEncryptionConfig)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -53,11 +55,11 @@ public BackupResourceEncryptionConfigResource() /// partial void CustomInit(); + /// /// Gets or sets backupResourceEncryptionConfigResource properties /// - [JsonProperty(PropertyName = "properties")] - public BackupResourceEncryptionConfig Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public BackupResourceEncryptionConfig Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceVaultConfig.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceVaultConfig.cs index 5e45d075836f..63ec0bb15061 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceVaultConfig.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceVaultConfig.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,33 +23,40 @@ public BackupResourceVaultConfig() /// /// Initializes a new instance of the BackupResourceVaultConfig class. /// - /// Storage type. Possible values - /// include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + + /// Storage type. + /// Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', + /// 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' + + /// Storage type. + /// Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', /// 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' - /// Storage type. Possible values include: - /// 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', - /// 'ReadAccessGeoZoneRedundant' - /// 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' - /// Soft Delete feature state. + + /// 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' + + /// Soft Delete feature state /// Possible values include: 'Invalid', 'Enabled', 'Disabled' - /// ResourceGuard - /// Operation Requests - /// Is soft delete - /// feature state editable - public BackupResourceVaultConfig(string storageModelType = default(string), string storageType = default(string), string storageTypeState = default(string), string enhancedSecurityState = default(string), string softDeleteFeatureState = default(string), IList resourceGuardOperationRequests = default(IList), bool? isSoftDeleteFeatureStateEditable = default(bool?)) + + /// ResourceGuard Operation Requests + /// + + /// Is soft delete feature state editable + /// + public BackupResourceVaultConfig(string storageModelType = default(string), string storageType = default(string), string storageTypeState = default(string), string enhancedSecurityState = default(string), string softDeleteFeatureState = default(string), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isSoftDeleteFeatureStateEditable = default(bool?)) + { - StorageModelType = storageModelType; - StorageType = storageType; - StorageTypeState = storageTypeState; - EnhancedSecurityState = enhancedSecurityState; - SoftDeleteFeatureState = softDeleteFeatureState; - ResourceGuardOperationRequests = resourceGuardOperationRequests; - IsSoftDeleteFeatureStateEditable = isSoftDeleteFeatureStateEditable; + this.StorageModelType = storageModelType; + this.StorageType = storageType; + this.StorageTypeState = storageTypeState; + this.EnhancedSecurityState = enhancedSecurityState; + this.SoftDeleteFeatureState = softDeleteFeatureState; + this.ResourceGuardOperationRequests = resourceGuardOperationRequests; + this.IsSoftDeleteFeatureStateEditable = isSoftDeleteFeatureStateEditable; CustomInit(); } @@ -66,55 +65,48 @@ public BackupResourceVaultConfig() /// partial void CustomInit(); + /// - /// Gets or sets storage type. Possible values include: 'Invalid', - /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', - /// 'ReadAccessGeoZoneRedundant' + /// Gets or sets storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' /// - [JsonProperty(PropertyName = "storageModelType")] - public string StorageModelType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageModelType")] + public string StorageModelType {get; set; } /// - /// Gets or sets storage type. Possible values include: 'Invalid', - /// 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', - /// 'ReadAccessGeoZoneRedundant' + /// Gets or sets storage type. Possible values include: 'Invalid', 'GeoRedundant', 'LocallyRedundant', 'ZoneRedundant', 'ReadAccessGeoZoneRedundant' /// - [JsonProperty(PropertyName = "storageType")] - public string StorageType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "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' + /// 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 = "storageTypeState")] - public string StorageTypeState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageTypeState")] + public string StorageTypeState {get; set; } /// - /// Gets or sets enabled or Disabled. Possible values include: - /// 'Invalid', 'Enabled', 'Disabled' + /// Gets or sets enabled or Disabled. Possible values include: 'Invalid', 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "enhancedSecurityState")] - public string EnhancedSecurityState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enhancedSecurityState")] + public string EnhancedSecurityState {get; set; } /// - /// Gets or sets soft Delete feature state. Possible values include: - /// 'Invalid', 'Enabled', 'Disabled' + /// Gets or sets soft Delete feature state Possible values include: 'Invalid', 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "softDeleteFeatureState")] - public string SoftDeleteFeatureState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "softDeleteFeatureState")] + public string SoftDeleteFeatureState {get; set; } /// /// Gets or sets resourceGuard Operation Requests /// - [JsonProperty(PropertyName = "resourceGuardOperationRequests")] - public IList ResourceGuardOperationRequests { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public System.Collections.Generic.IList ResourceGuardOperationRequests {get; set; } /// /// Gets or sets is soft delete feature state editable /// - [JsonProperty(PropertyName = "isSoftDeleteFeatureStateEditable")] - public bool? IsSoftDeleteFeatureStateEditable { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isSoftDeleteFeatureStateEditable")] + public bool? IsSoftDeleteFeatureStateEditable {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceVaultConfigResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceVaultConfigResource.cs index 7c93a45855de..49fefb48adc2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceVaultConfigResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupResourceVaultConfigResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class BackupResourceVaultConfigResource : Resource { /// - /// Initializes a new instance of the BackupResourceVaultConfigResource - /// class. + /// Initializes a new instance of the BackupResourceVaultConfigResource class. /// public BackupResourceVaultConfigResource() { @@ -30,24 +21,35 @@ public BackupResourceVaultConfigResource() } /// - /// Initializes a new instance of the BackupResourceVaultConfigResource - /// class. + /// Initializes a new instance of the BackupResourceVaultConfigResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// BackupResourceVaultConfigResource - /// properties - public BackupResourceVaultConfigResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), BackupResourceVaultConfig properties = default(BackupResourceVaultConfig)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// BackupResourceVaultConfigResource properties + /// + public BackupResourceVaultConfigResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), BackupResourceVaultConfig properties = default(BackupResourceVaultConfig)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -56,11 +58,11 @@ public BackupResourceVaultConfigResource() /// partial void CustomInit(); + /// /// Gets or sets backupResourceVaultConfigResource properties /// - [JsonProperty(PropertyName = "properties")] - public BackupResourceVaultConfig Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public BackupResourceVaultConfig Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupStatusRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupStatusRequest.cs index 0b6bbe7d182d..a894a3274492 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupStatusRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupStatusRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,20 +23,24 @@ public BackupStatusRequest() /// /// Initializes a new instance of the BackupStatusRequest class. /// - /// Container Type - VM, SQLPaaS, DPM, - /// AzureFileShare. Possible values include: 'Invalid', 'VM', - /// 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', - /// 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', - /// 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + + /// Container Type - VM, SQLPaaS, DPM, AzureFileShare... + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', /// 'SAPAseDatabase', 'SAPHanaDBInstance' - /// Entire ARM resource id of the - /// resource - /// Protectable Item Logical Name + + /// Entire ARM resource id of the resource + /// + + /// Protectable Item Logical Name + /// public BackupStatusRequest(string resourceType = default(string), string resourceId = default(string), string poLogicalName = default(string)) + { - ResourceType = resourceType; - ResourceId = resourceId; - PoLogicalName = poLogicalName; + this.ResourceType = resourceType; + this.ResourceId = resourceId; + this.PoLogicalName = poLogicalName; CustomInit(); } @@ -51,28 +49,23 @@ public BackupStatusRequest() /// partial void CustomInit(); + /// - /// Gets or sets container Type - VM, SQLPaaS, DPM, AzureFileShare. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' + /// Gets or sets container Type - VM, SQLPaaS, DPM, AzureFileShare... Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "resourceType")] - public string ResourceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceType")] + public string ResourceType {get; set; } /// /// Gets or sets entire ARM resource id of the resource /// - [JsonProperty(PropertyName = "resourceId")] - public string ResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceId")] + public string ResourceId {get; set; } /// /// Gets or sets protectable Item Logical Name /// - [JsonProperty(PropertyName = "poLogicalName")] - public string PoLogicalName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "poLogicalName")] + public string PoLogicalName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupStatusResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupStatusResponse.cs index b1a9bff7a4a3..ac2777ee0fa3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupStatusResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupStatusResponse.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,37 +23,48 @@ public BackupStatusResponse() /// /// Initializes a new instance of the BackupStatusResponse class. /// - /// Specifies whether the container is - /// registered or not. Possible values include: 'Invalid', - /// 'NotProtected', 'Protecting', 'Protected', - /// 'ProtectionFailed' - /// Specifies the arm resource id of the - /// vault - /// Specifies the fabric name - Azure or AD. + + /// Specifies whether the container is registered or not + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', + /// 'Protected', 'ProtectionFailed' + + /// Specifies the arm resource id of the vault + /// + + /// Specifies the fabric name - Azure or AD /// Possible values include: 'Invalid', 'Azure' - /// Specifies the product specific - /// container name. E.g. - /// iaasvmcontainer;iaasvmcontainer;csname;vmname. - /// Specifies the product specific ds - /// name. E.g. vm;iaasvmcontainer;csname;vmname. - /// ErrorCode in case of intent failed - /// ErrorMessage in case of intent - /// failed. - /// Specifies the policy name which is used - /// for protection - /// Container registration - /// status + + /// Specifies the product specific container name. E.g. + /// iaasvmcontainer;iaasvmcontainer;csname;vmname. + /// + + /// Specifies the product specific ds name. E.g. + /// vm;iaasvmcontainer;csname;vmname. + /// + + /// ErrorCode in case of intent failed + /// + + /// ErrorMessage in case of intent failed. + /// + + /// Specifies the policy name which is used for protection + /// + + /// Container registration status + /// public BackupStatusResponse(string protectionStatus = default(string), string vaultId = default(string), string fabricName = default(string), string containerName = default(string), string protectedItemName = default(string), string errorCode = default(string), string errorMessage = default(string), string policyName = default(string), string registrationStatus = default(string)) + { - ProtectionStatus = protectionStatus; - VaultId = vaultId; - FabricName = fabricName; - ContainerName = containerName; - ProtectedItemName = protectedItemName; - ErrorCode = errorCode; - ErrorMessage = errorMessage; - PolicyName = policyName; - RegistrationStatus = registrationStatus; + this.ProtectionStatus = protectionStatus; + this.VaultId = vaultId; + this.FabricName = fabricName; + this.ContainerName = containerName; + this.ProtectedItemName = protectedItemName; + this.ErrorCode = errorCode; + this.ErrorMessage = errorMessage; + this.PolicyName = policyName; + this.RegistrationStatus = registrationStatus; CustomInit(); } @@ -68,64 +73,61 @@ public BackupStatusResponse() /// partial void CustomInit(); + /// - /// Gets or sets specifies whether the container is registered or not. - /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', - /// 'Protected', 'ProtectionFailed' + /// Gets or sets specifies whether the container is registered or not Possible values include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', 'ProtectionFailed' /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; set; } /// /// Gets or sets specifies the arm resource id of the vault /// - [JsonProperty(PropertyName = "vaultId")] - public string VaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vaultId")] + public string VaultId {get; set; } /// - /// Gets or sets specifies the fabric name - Azure or AD. Possible - /// values include: 'Invalid', 'Azure' + /// Gets or sets specifies the fabric name - Azure or AD Possible values include: 'Invalid', 'Azure' /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// /// Gets or sets specifies the product specific container name. E.g. /// iaasvmcontainer;iaasvmcontainer;csname;vmname. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets specifies the product specific ds name. E.g. /// vm;iaasvmcontainer;csname;vmname. /// - [JsonProperty(PropertyName = "protectedItemName")] - public string ProtectedItemName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemName")] + public string ProtectedItemName {get; set; } /// /// Gets or sets errorCode in case of intent failed /// - [JsonProperty(PropertyName = "errorCode")] - public string ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public string ErrorCode {get; set; } /// /// Gets or sets errorMessage in case of intent failed. /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; set; } /// /// Gets or sets specifies the policy name which is used for protection /// - [JsonProperty(PropertyName = "policyName")] - public string PolicyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyName")] + public string PolicyName {get; set; } /// /// Gets or sets container registration status /// - [JsonProperty(PropertyName = "registrationStatus")] - public string RegistrationStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "registrationStatus")] + public string RegistrationStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupType.cs index 560082731e80..d50051ba75dc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/BackupType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for BackupType. /// + + public static class BackupType { public const string Invalid = "Invalid"; @@ -25,4 +22,4 @@ public static class BackupType public const string SnapshotFull = "SnapshotFull"; public const string SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryDisplay.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryDisplay.cs index a5f52988aa71..070bc60d437b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryDisplay.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryDisplay.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,19 +23,25 @@ public ClientDiscoveryDisplay() /// /// Initializes a new instance of the ClientDiscoveryDisplay class. /// - /// 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. + + /// 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; + this.Provider = provider; + this.Resource = resource; + this.Operation = operation; + this.Description = description; CustomInit(); } @@ -50,31 +50,30 @@ public ClientDiscoveryDisplay() /// partial void CustomInit(); + /// /// Gets or sets name of the provider for display purposes /// - [JsonProperty(PropertyName = "provider")] - public string Provider { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provider")] + public string Provider {get; set; } /// - /// Gets or sets resourceType for which this Operation can be - /// performed. + /// Gets or sets resourceType for which this Operation can be performed. /// - [JsonProperty(PropertyName = "resource")] - public string Resource { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resource")] + public string Resource {get; set; } /// /// Gets or sets operations Name itself. /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// - /// Gets or sets description of the operation having details of what - /// operation is about. + /// Gets or sets description of the operation having details of what operation + /// is about. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForLogSpecification.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForLogSpecification.cs index 30c5d2872d70..a2736d3cc02d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForLogSpecification.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForLogSpecification.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ClientDiscoveryForLogSpecification { /// - /// Initializes a new instance of the - /// ClientDiscoveryForLogSpecification class. + /// Initializes a new instance of the ClientDiscoveryForLogSpecification class. /// public ClientDiscoveryForLogSpecification() { @@ -28,18 +21,23 @@ public ClientDiscoveryForLogSpecification() } /// - /// Initializes a new instance of the - /// ClientDiscoveryForLogSpecification class. + /// Initializes a new instance of the ClientDiscoveryForLogSpecification class. /// - /// Name for shoebox log specification. - /// Localized display name - /// blob duration of shoebox log - /// specification + + /// Name for shoebox log specification. + /// + + /// Localized display name + /// + + /// blob duration of shoebox log specification + /// public ClientDiscoveryForLogSpecification(string name = default(string), string displayName = default(string), string blobDuration = default(string)) + { - Name = name; - DisplayName = displayName; - BlobDuration = blobDuration; + this.Name = name; + this.DisplayName = displayName; + this.BlobDuration = blobDuration; CustomInit(); } @@ -48,23 +46,23 @@ public ClientDiscoveryForLogSpecification() /// partial void CustomInit(); + /// /// Gets or sets name for shoebox log specification. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets localized display name /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "displayName")] + public string DisplayName {get; set; } /// /// Gets or sets blob duration of shoebox log specification /// - [JsonProperty(PropertyName = "blobDuration")] - public string BlobDuration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "blobDuration")] + public string BlobDuration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForProperties.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForProperties.cs index 36dcd9e2bd0a..68a829a7f8b5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ClientDiscoveryForProperties { /// - /// Initializes a new instance of the ClientDiscoveryForProperties - /// class. + /// Initializes a new instance of the ClientDiscoveryForProperties class. /// public ClientDiscoveryForProperties() { @@ -28,13 +21,15 @@ public ClientDiscoveryForProperties() } /// - /// Initializes a new instance of the ClientDiscoveryForProperties - /// class. + /// Initializes a new instance of the ClientDiscoveryForProperties class. /// - /// Operation properties. + + /// Operation properties. + /// public ClientDiscoveryForProperties(ClientDiscoveryForServiceSpecification serviceSpecification = default(ClientDiscoveryForServiceSpecification)) + { - ServiceSpecification = serviceSpecification; + this.ServiceSpecification = serviceSpecification; CustomInit(); } @@ -43,11 +38,11 @@ public ClientDiscoveryForProperties() /// partial void CustomInit(); + /// /// Gets or sets operation properties. /// - [JsonProperty(PropertyName = "serviceSpecification")] - public ClientDiscoveryForServiceSpecification ServiceSpecification { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceSpecification")] + public ClientDiscoveryForServiceSpecification ServiceSpecification {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForServiceSpecification.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForServiceSpecification.cs index 4773f56c2eb2..6743599f7cfb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForServiceSpecification.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryForServiceSpecification.cs @@ -1,29 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Class to represent shoebox service specification in json client - /// discovery. + /// Class to represent shoebox service specification in json client discovery. /// public partial class ClientDiscoveryForServiceSpecification { /// - /// Initializes a new instance of the - /// ClientDiscoveryForServiceSpecification class. + /// Initializes a new instance of the ClientDiscoveryForServiceSpecification class. /// public ClientDiscoveryForServiceSpecification() { @@ -31,14 +21,15 @@ public ClientDiscoveryForServiceSpecification() } /// - /// Initializes a new instance of the - /// ClientDiscoveryForServiceSpecification class. + /// Initializes a new instance of the ClientDiscoveryForServiceSpecification class. /// - /// List of log specifications of this - /// operation. - public ClientDiscoveryForServiceSpecification(IList logSpecifications = default(IList)) + + /// List of log specifications of this operation. + /// + public ClientDiscoveryForServiceSpecification(System.Collections.Generic.IList logSpecifications = default(System.Collections.Generic.IList)) + { - LogSpecifications = logSpecifications; + this.LogSpecifications = logSpecifications; CustomInit(); } @@ -47,11 +38,11 @@ public ClientDiscoveryForServiceSpecification() /// partial void CustomInit(); + /// /// Gets or sets list of log specifications of this operation. /// - [JsonProperty(PropertyName = "logSpecifications")] - public IList LogSpecifications { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "logSpecifications")] + public System.Collections.Generic.IList LogSpecifications {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryValueForSingleApi.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryValueForSingleApi.cs index 9d3c96031c74..e9aefe131d10 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryValueForSingleApi.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientDiscoveryValueForSingleApi.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ClientDiscoveryValueForSingleApi { /// - /// Initializes a new instance of the ClientDiscoveryValueForSingleApi - /// class. + /// Initializes a new instance of the ClientDiscoveryValueForSingleApi class. /// public ClientDiscoveryValueForSingleApi() { @@ -28,23 +21,28 @@ public ClientDiscoveryValueForSingleApi() } /// - /// Initializes a new instance of the ClientDiscoveryValueForSingleApi - /// class. + /// Initializes a new instance of the ClientDiscoveryValueForSingleApi class. /// - /// Name of the Operation. - /// Contains the localized display information - /// for this particular operation - /// The intended executor of the operation;governs - /// the display of the operation in the RBAC UX and the audit logs - /// UX - /// ShoeBox properties for the given - /// operation. + + /// Name of the Operation. + /// + + /// Contains the localized display information 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. + /// public ClientDiscoveryValueForSingleApi(string name = default(string), ClientDiscoveryDisplay display = default(ClientDiscoveryDisplay), string origin = default(string), ClientDiscoveryForProperties properties = default(ClientDiscoveryForProperties)) + { - Name = name; - Display = display; - Origin = origin; - Properties = properties; + this.Name = name; + this.Display = display; + this.Origin = origin; + this.Properties = properties; CustomInit(); } @@ -53,31 +51,31 @@ public ClientDiscoveryValueForSingleApi() /// partial void CustomInit(); + /// /// Gets or sets name of the Operation. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// - /// Gets or sets 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; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "display")] + public ClientDiscoveryDisplay Display {get; set; } /// - /// Gets or sets the intended executor of the operation;governs the - /// display of the operation in the RBAC UX and the audit logs UX + /// 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; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "origin")] + public string Origin {get; set; } /// /// Gets or sets shoeBox properties for the given operation. /// - [JsonProperty(PropertyName = "properties")] - public ClientDiscoveryForProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ClientDiscoveryForProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientScriptForConnect.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientScriptForConnect.cs index 036bd855e91b..c6c246ca1e64 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientScriptForConnect.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ClientScriptForConnect.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,25 +23,34 @@ public ClientScriptForConnect() /// /// Initializes a new instance of the ClientScriptForConnect class. /// - /// File content of the client script for - /// file / folder restore. - /// File extension of the client script - /// for file / folder restore - .ps1 , .sh , etc. - /// OS type - Windows, Linux etc. for which this - /// file / folder restore client script works. - /// URL of Executable from where to source the - /// content. If this is not null then ScriptContent should not be - /// used - /// Mandatory suffix that should be - /// added to the name of script that is given for download to user. - /// If its null or empty then , ignore it. + + /// File content of the client script for file / folder restore. + /// + + /// File extension of the client script for file / folder restore - .ps1 , .sh + /// , etc. + /// + + /// OS type - Windows, Linux etc. for which this file / folder restore client + /// script works. + /// + + /// URL of Executable from where to source the content. If this is not null + /// then ScriptContent should not be used + /// + + /// Mandatory suffix that should be added to the name of script that is given + /// for download to user. + /// If its null or empty then , ignore it. + /// public ClientScriptForConnect(string scriptContent = default(string), string scriptExtension = default(string), string osType = default(string), string url = default(string), string scriptNameSuffix = default(string)) + { - ScriptContent = scriptContent; - ScriptExtension = scriptExtension; - OsType = osType; - Url = url; - ScriptNameSuffix = scriptNameSuffix; + this.ScriptContent = scriptContent; + this.ScriptExtension = scriptExtension; + this.OSType = osType; + this.Url = url; + this.ScriptNameSuffix = scriptNameSuffix; CustomInit(); } @@ -56,41 +59,40 @@ public ClientScriptForConnect() /// partial void CustomInit(); + /// - /// Gets or sets file content of the client script for file / folder - /// restore. + /// Gets or sets file content of the client script for file / folder restore. /// - [JsonProperty(PropertyName = "scriptContent")] - public string ScriptContent { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scriptContent")] + public string ScriptContent {get; set; } /// - /// Gets or sets file extension of the client script for file / folder - /// restore - .ps1 , .sh , etc. + /// Gets or sets file extension of the client script for file / folder restore + /// - .ps1 , .sh , etc. /// - [JsonProperty(PropertyName = "scriptExtension")] - public string ScriptExtension { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scriptExtension")] + public string ScriptExtension {get; set; } /// - /// Gets or sets OS type - Windows, Linux etc. for which this file / - /// folder restore client script works. + /// Gets or sets oS type - Windows, Linux etc. for which this file / folder + /// restore client script works. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// - /// Gets or sets URL of Executable from where to source the content. If - /// this is not null then ScriptContent should not be used + /// Gets or sets uRL of Executable from where to source the content. If this is + /// not null then ScriptContent should not be used /// - [JsonProperty(PropertyName = "url")] - public string Url { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "url")] + public string Url {get; set; } /// - /// Gets or sets mandatory suffix that should be added to the name of - /// script that is given for download to user. + /// Gets or sets mandatory suffix that should be added to the name of script + /// that is given for download to user. /// If its null or empty then , ignore it. /// - [JsonProperty(PropertyName = "scriptNameSuffix")] - public string ScriptNameSuffix { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "scriptNameSuffix")] + public string ScriptNameSuffix {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ContainerIdentityInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ContainerIdentityInfo.cs index 1f6f40ac72ff..be286bab38cd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ContainerIdentityInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ContainerIdentityInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,19 +23,25 @@ public ContainerIdentityInfo() /// /// Initializes a new instance of the ContainerIdentityInfo class. /// - /// Unique name of the container - /// Protection container identity - AAD - /// Tenant - /// Protection container - /// identity - AAD Service Principal - /// Protection container identity - - /// Audience + + /// Unique name of the container + /// + + /// Protection container identity - AAD Tenant + /// + + /// Protection container identity - AAD Service Principal + /// + + /// Protection container identity - Audience + /// public ContainerIdentityInfo(string uniqueName = default(string), string aadTenantId = default(string), string servicePrincipalClientId = default(string), string audience = default(string)) + { - UniqueName = uniqueName; - AadTenantId = aadTenantId; - ServicePrincipalClientId = servicePrincipalClientId; - Audience = audience; + this.UniqueName = uniqueName; + this.AadTenantId = aadTenantId; + this.ServicePrincipalClientId = servicePrincipalClientId; + this.Audience = audience; CustomInit(); } @@ -50,29 +50,29 @@ public ContainerIdentityInfo() /// partial void CustomInit(); + /// /// Gets or sets unique name of the container /// - [JsonProperty(PropertyName = "uniqueName")] - public string UniqueName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "uniqueName")] + public string UniqueName {get; set; } /// /// Gets or sets protection container identity - AAD Tenant /// - [JsonProperty(PropertyName = "aadTenantId")] - public string AadTenantId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "aadTenantId")] + public string AadTenantId {get; set; } /// /// Gets or sets protection container identity - AAD Service Principal /// - [JsonProperty(PropertyName = "servicePrincipalClientId")] - public string ServicePrincipalClientId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "servicePrincipalClientId")] + public string ServicePrincipalClientId {get; set; } /// /// Gets or sets protection container identity - Audience /// - [JsonProperty(PropertyName = "audience")] - public string Audience { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "audience")] + public string Audience {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ContainerType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ContainerType.cs index e24f1e71a315..2732b6a5b078 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ContainerType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ContainerType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for ContainerType. /// + + public static class ContainerType { public const string Invalid = "Invalid"; @@ -28,9 +25,9 @@ public static class ContainerType public const string Windows = "Windows"; public const string VCenter = "VCenter"; public const string VMAppContainer = "VMAppContainer"; - public const string SQLAGWorkLoadContainer = "SQLAGWorkLoadContainer"; + public const string SqlagWorkLoadContainer = "SQLAGWorkLoadContainer"; public const string StorageContainer = "StorageContainer"; public const string GenericContainer = "GenericContainer"; public const string HanaHSRContainer = "HanaHSRContainer"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/CopyOptions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/CopyOptions.cs index d65d19461dc0..f93ecf652dc3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/CopyOptions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/CopyOptions.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for CopyOptions. /// + + public static class CopyOptions { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class CopyOptions public const string Overwrite = "Overwrite"; public const string FailOnConflict = "FailOnConflict"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/CreateMode.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/CreateMode.cs index 1ab8506518f3..2dd21ab795e9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/CreateMode.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/CreateMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for CreateMode. /// + + public static class CreateMode { public const string Invalid = "Invalid"; public const string Default = "Default"; public const string Recover = "Recover"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMContainerExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMContainerExtendedInfo.cs index c3476702ce09..15da575d4095 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMContainerExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMContainerExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public DPMContainerExtendedInfo() /// /// Initializes a new instance of the DPMContainerExtendedInfo class. /// - /// Last refresh time of the - /// DPMContainer. + + /// Last refresh time of the DPMContainer. + /// public DPMContainerExtendedInfo(System.DateTime? lastRefreshedAt = default(System.DateTime?)) + { - LastRefreshedAt = lastRefreshedAt; + this.LastRefreshedAt = lastRefreshedAt; CustomInit(); } @@ -42,11 +38,11 @@ public DPMContainerExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets last refresh time of the DPMContainer. /// - [JsonProperty(PropertyName = "lastRefreshedAt")] - public System.DateTime? LastRefreshedAt { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRefreshedAt")] + public System.DateTime? LastRefreshedAt {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMProtectedItem.cs index 2547a1db634c..9c41066ce2b2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,64 +24,87 @@ public DPMProtectedItem() /// /// Initializes a new instance of the DPMProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the managed - /// item - /// Backup Management server protecting - /// this backup item - /// Protection state of the backup - /// engine. Possible values include: 'Invalid', 'IRPending', - /// 'Protected', 'ProtectionError', 'ProtectionStopped', - /// 'ProtectionPaused', 'BackupsSuspended' - /// Extended info of the backup - /// item. - public DPMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string backupEngineName = default(string), string protectionState = default(string), DPMProtectedItemExtendedInfo extendedInfo = default(DPMProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the managed item + /// + + /// Backup Management server protecting this backup item + /// + + /// Protection state of the backup engine + /// Possible values include: 'Invalid', 'IRPending', 'Protected', + /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', + /// 'BackupsSuspended' + + /// Extended info of the backup item. + /// + public DPMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string backupEngineName = default(string), string protectionState = default(string), DPMProtectedItemExtendedInfo extendedInfo = default(DPMProtectedItemExtendedInfo)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) { - FriendlyName = friendlyName; - BackupEngineName = backupEngineName; - ProtectionState = protectionState; - ExtendedInfo = extendedInfo; + this.FriendlyName = friendlyName; + this.BackupEngineName = backupEngineName; + this.ProtectionState = protectionState; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -98,31 +113,29 @@ public DPMProtectedItem() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the managed item /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets backup Management server protecting this backup item /// - [JsonProperty(PropertyName = "backupEngineName")] - public string BackupEngineName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupEngineName")] + public string BackupEngineName {get; set; } /// - /// Gets or sets protection state of the backup engine. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' + /// Gets or sets protection state of the backup engine Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// /// Gets or sets extended info of the backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public DPMProtectedItemExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public DPMProtectedItemExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMProtectedItemExtendedInfo.cs index 98865c4fbbd8..1a63c4b49449 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DPMProtectedItemExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class DPMProtectedItemExtendedInfo { /// - /// Initializes a new instance of the DPMProtectedItemExtendedInfo - /// class. + /// Initializes a new instance of the DPMProtectedItemExtendedInfo class. /// public DPMProtectedItemExtendedInfo() { @@ -30,53 +21,67 @@ public DPMProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the DPMProtectedItemExtendedInfo - /// class. - /// - /// Attribute to provide - /// information on various DBs. - /// To check if backup item is disk - /// protected. - /// To check if backup item is cloud - /// protected. - /// Last backup status information on - /// backup item. - /// Last refresh time on backup - /// item. - /// Oldest cloud recovery point - /// time. - /// cloud recovery point - /// count. - /// Oldest disk recovery - /// point time. - /// latest disk recovery - /// point time. - /// disk recovery point - /// count. - /// To check if backup item is - /// collocated. - /// Protection group name of the - /// backup item. - /// Used Disk storage in - /// bytes. - /// total Disk storage in - /// bytes. - public DPMProtectedItemExtendedInfo(IDictionary protectableObjectLoadPath = default(IDictionary), bool? protectedProperty = default(bool?), bool? isPresentOnCloud = default(bool?), string lastBackupStatus = default(string), System.DateTime? lastRefreshedAt = default(System.DateTime?), System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), System.DateTime? onPremiseOldestRecoveryPoint = default(System.DateTime?), System.DateTime? onPremiseLatestRecoveryPoint = default(System.DateTime?), int? onPremiseRecoveryPointCount = default(int?), bool? isCollocated = default(bool?), string protectionGroupName = default(string), string diskStorageUsedInBytes = default(string), string totalDiskStorageSizeInBytes = default(string)) + /// Initializes a new instance of the DPMProtectedItemExtendedInfo class. + /// + + /// Attribute to provide information on various DBs. + /// + + /// To check if backup item is disk protected. + /// + + /// To check if backup item is cloud protected. + /// + + /// Last backup status information on backup item. + /// + + /// Last refresh time on backup item. + /// + + /// Oldest cloud recovery point time. + /// + + /// cloud recovery point count. + /// + + /// Oldest disk recovery point time. + /// + + /// latest disk recovery point time. + /// + + /// disk recovery point count. + /// + + /// To check if backup item is collocated. + /// + + /// Protection group name of the backup item. + /// + + /// Used Disk storage in bytes. + /// + + /// total Disk storage in bytes. + /// + public DPMProtectedItemExtendedInfo(System.Collections.Generic.IDictionary protectableObjectLoadPath = default(System.Collections.Generic.IDictionary), bool? protectedProperty = default(bool?), bool? isPresentOnCloud = default(bool?), string lastBackupStatus = default(string), System.DateTime? lastRefreshedAt = default(System.DateTime?), System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), System.DateTime? onPremiseOldestRecoveryPoint = default(System.DateTime?), System.DateTime? onPremiseLatestRecoveryPoint = default(System.DateTime?), int? onPremiseRecoveryPointCount = default(int?), bool? isCollocated = default(bool?), string protectionGroupName = default(string), string diskStorageUsedInBytes = default(string), string totalDiskStorageSizeInBytes = default(string)) + { - ProtectableObjectLoadPath = protectableObjectLoadPath; - ProtectedProperty = protectedProperty; - IsPresentOnCloud = isPresentOnCloud; - LastBackupStatus = lastBackupStatus; - LastRefreshedAt = lastRefreshedAt; - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; - OnPremiseOldestRecoveryPoint = onPremiseOldestRecoveryPoint; - OnPremiseLatestRecoveryPoint = onPremiseLatestRecoveryPoint; - OnPremiseRecoveryPointCount = onPremiseRecoveryPointCount; - IsCollocated = isCollocated; - ProtectionGroupName = protectionGroupName; - DiskStorageUsedInBytes = diskStorageUsedInBytes; - TotalDiskStorageSizeInBytes = totalDiskStorageSizeInBytes; + this.ProtectableObjectLoadPath = protectableObjectLoadPath; + this.ProtectedProperty = protectedProperty; + this.IsPresentOnCloud = isPresentOnCloud; + this.LastBackupStatus = lastBackupStatus; + this.LastRefreshedAt = lastRefreshedAt; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; + this.OnPremiseOldestRecoveryPoint = onPremiseOldestRecoveryPoint; + this.OnPremiseLatestRecoveryPoint = onPremiseLatestRecoveryPoint; + this.OnPremiseRecoveryPointCount = onPremiseRecoveryPointCount; + this.IsCollocated = isCollocated; + this.ProtectionGroupName = protectionGroupName; + this.DiskStorageUsedInBytes = diskStorageUsedInBytes; + this.TotalDiskStorageSizeInBytes = totalDiskStorageSizeInBytes; CustomInit(); } @@ -85,89 +90,89 @@ public DPMProtectedItemExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets attribute to provide information on various DBs. /// - [JsonProperty(PropertyName = "protectableObjectLoadPath")] - public IDictionary ProtectableObjectLoadPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableObjectLoadPath")] + public System.Collections.Generic.IDictionary ProtectableObjectLoadPath {get; set; } /// /// Gets or sets to check if backup item is disk protected. /// - [JsonProperty(PropertyName = "protected")] - public bool? ProtectedProperty { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protected")] + public bool? ProtectedProperty {get; set; } /// /// Gets or sets to check if backup item is cloud protected. /// - [JsonProperty(PropertyName = "isPresentOnCloud")] - public bool? IsPresentOnCloud { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isPresentOnCloud")] + public bool? IsPresentOnCloud {get; set; } /// /// Gets or sets last backup status information on backup item. /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// /// Gets or sets last refresh time on backup item. /// - [JsonProperty(PropertyName = "lastRefreshedAt")] - public System.DateTime? LastRefreshedAt { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRefreshedAt")] + public System.DateTime? LastRefreshedAt {get; set; } /// /// Gets or sets oldest cloud recovery point time. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// /// Gets or sets cloud recovery point count. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } /// /// Gets or sets oldest disk recovery point time. /// - [JsonProperty(PropertyName = "onPremiseOldestRecoveryPoint")] - public System.DateTime? OnPremiseOldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onPremiseOldestRecoveryPoint")] + public System.DateTime? OnPremiseOldestRecoveryPoint {get; set; } /// /// Gets or sets latest disk recovery point time. /// - [JsonProperty(PropertyName = "onPremiseLatestRecoveryPoint")] - public System.DateTime? OnPremiseLatestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onPremiseLatestRecoveryPoint")] + public System.DateTime? OnPremiseLatestRecoveryPoint {get; set; } /// /// Gets or sets disk recovery point count. /// - [JsonProperty(PropertyName = "onPremiseRecoveryPointCount")] - public int? OnPremiseRecoveryPointCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onPremiseRecoveryPointCount")] + public int? OnPremiseRecoveryPointCount {get; set; } /// /// Gets or sets to check if backup item is collocated. /// - [JsonProperty(PropertyName = "isCollocated")] - public bool? IsCollocated { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isCollocated")] + public bool? IsCollocated {get; set; } /// /// Gets or sets protection group name of the backup item. /// - [JsonProperty(PropertyName = "protectionGroupName")] - public string ProtectionGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionGroupName")] + public string ProtectionGroupName {get; set; } /// /// Gets or sets used Disk storage in bytes. /// - [JsonProperty(PropertyName = "diskStorageUsedInBytes")] - public string DiskStorageUsedInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskStorageUsedInBytes")] + public string DiskStorageUsedInBytes {get; set; } /// /// Gets or sets total Disk storage in bytes. /// - [JsonProperty(PropertyName = "totalDiskStorageSizeInBytes")] - public string TotalDiskStorageSizeInBytes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "totalDiskStorageSizeInBytes")] + public string TotalDiskStorageSizeInBytes {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailyRetentionFormat.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailyRetentionFormat.cs index 241bcc186790..03156de5910a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailyRetentionFormat.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailyRetentionFormat.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,10 +23,13 @@ public DailyRetentionFormat() /// /// Initializes a new instance of the DailyRetentionFormat class. /// - /// List of days of the month. - public DailyRetentionFormat(IList daysOfTheMonth = default(IList)) + + /// List of days of the month. + /// + public DailyRetentionFormat(System.Collections.Generic.IList daysOfTheMonth = default(System.Collections.Generic.IList)) + { - DaysOfTheMonth = daysOfTheMonth; + this.DaysOfTheMonth = daysOfTheMonth; CustomInit(); } @@ -43,11 +38,11 @@ public DailyRetentionFormat() /// partial void CustomInit(); + /// /// Gets or sets list of days of the month. /// - [JsonProperty(PropertyName = "daysOfTheMonth")] - public IList DaysOfTheMonth { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "daysOfTheMonth")] + public System.Collections.Generic.IList DaysOfTheMonth {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailyRetentionSchedule.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailyRetentionSchedule.cs index 0a1758efbabc..291834936508 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailyRetentionSchedule.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailyRetentionSchedule.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,14 +23,17 @@ public DailyRetentionSchedule() /// /// Initializes a new instance of the DailyRetentionSchedule class. /// - /// Retention times of retention - /// policy. - /// Retention duration of retention - /// Policy. - public DailyRetentionSchedule(IList retentionTimes = default(IList), RetentionDuration retentionDuration = default(RetentionDuration)) + + /// Retention times of retention policy. + /// + + /// Retention duration of retention Policy. + /// + public DailyRetentionSchedule(System.Collections.Generic.IList retentionTimes = default(System.Collections.Generic.IList), RetentionDuration retentionDuration = default(RetentionDuration)) + { - RetentionTimes = retentionTimes; - RetentionDuration = retentionDuration; + this.RetentionTimes = retentionTimes; + this.RetentionDuration = retentionDuration; CustomInit(); } @@ -47,17 +42,17 @@ public DailyRetentionSchedule() /// partial void CustomInit(); + /// /// Gets or sets retention times of retention policy. /// - [JsonProperty(PropertyName = "retentionTimes")] - public IList RetentionTimes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionTimes")] + public System.Collections.Generic.IList RetentionTimes {get; set; } /// /// Gets or sets retention duration of retention Policy. /// - [JsonProperty(PropertyName = "retentionDuration")] - public RetentionDuration RetentionDuration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionDuration")] + public RetentionDuration RetentionDuration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailySchedule.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailySchedule.cs index 4accc820dde8..41834eedf1d4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailySchedule.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DailySchedule.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class DailySchedule @@ -28,11 +20,13 @@ public DailySchedule() /// /// Initializes a new instance of the DailySchedule class. /// - /// List of times of day this schedule - /// has to be run. - public DailySchedule(IList scheduleRunTimes = default(IList)) + + /// List of times of day this schedule has to be run. + /// + public DailySchedule(System.Collections.Generic.IList scheduleRunTimes = default(System.Collections.Generic.IList)) + { - ScheduleRunTimes = scheduleRunTimes; + this.ScheduleRunTimes = scheduleRunTimes; CustomInit(); } @@ -41,11 +35,11 @@ public DailySchedule() /// partial void CustomInit(); + /// /// Gets or sets list of times of day this schedule has to be run. /// - [JsonProperty(PropertyName = "scheduleRunTimes")] - public IList ScheduleRunTimes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleRunTimes")] + public System.Collections.Generic.IList ScheduleRunTimes {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DataMoveLevel.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DataMoveLevel.cs index 175676db0b86..b75384e9c0d4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DataMoveLevel.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DataMoveLevel.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for DataMoveLevel. /// + + public static class DataMoveLevel { public const string Invalid = "Invalid"; public const string Vault = "Vault"; public const string Container = "Container"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DataSourceType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DataSourceType.cs index e2fdc89c87cc..61784a3ad407 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DataSourceType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DataSourceType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,13 +9,15 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for DataSourceType. /// + + public static class DataSourceType { public const string Invalid = "Invalid"; public const string VM = "VM"; public const string FileFolder = "FileFolder"; public const string AzureSqlDb = "AzureSqlDb"; - public const string SQLDB = "SQLDB"; + public const string Sqldb = "SQLDB"; public const string Exchange = "Exchange"; public const string Sharepoint = "Sharepoint"; public const string VMwareVM = "VMwareVM"; @@ -33,4 +30,4 @@ public static class DataSourceType public const string SAPAseDatabase = "SAPAseDatabase"; public const string SAPHanaDBInstance = "SAPHanaDBInstance"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Day.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Day.cs index 148b3265e321..af9444daa167 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Day.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Day.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public Day() /// /// Initializes a new instance of the Day class. /// - /// Date of the month - /// Whether Date is last date of month + + /// Date of the month + /// + + /// Whether Date is last date of month + /// public Day(int? date = default(int?), bool? isLast = default(bool?)) + { - Date = date; - IsLast = isLast; + this.Date = date; + this.IsLast = isLast; CustomInit(); } @@ -43,17 +42,17 @@ public Day() /// partial void CustomInit(); + /// /// Gets or sets date of the month /// - [JsonProperty(PropertyName = "date")] - public int? Date { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "date")] + public int? Date {get; set; } /// /// Gets or sets whether Date is last date of month /// - [JsonProperty(PropertyName = "isLast")] - public bool? IsLast { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isLast")] + public bool? IsLast {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DayOfWeek.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DayOfWeek.cs index 3fd086be7881..aebd8cfb0db2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DayOfWeek.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DayOfWeek.cs @@ -1,39 +1,32 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for DayOfWeek. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum DayOfWeek { - [EnumMember(Value = "Sunday")] + [System.Runtime.Serialization.EnumMember(Value = "Sunday")] Sunday, - [EnumMember(Value = "Monday")] + [System.Runtime.Serialization.EnumMember(Value = "Monday")] Monday, - [EnumMember(Value = "Tuesday")] + [System.Runtime.Serialization.EnumMember(Value = "Tuesday")] Tuesday, - [EnumMember(Value = "Wednesday")] + [System.Runtime.Serialization.EnumMember(Value = "Wednesday")] Wednesday, - [EnumMember(Value = "Thursday")] + [System.Runtime.Serialization.EnumMember(Value = "Thursday")] Thursday, - [EnumMember(Value = "Friday")] + [System.Runtime.Serialization.EnumMember(Value = "Friday")] Friday, - [EnumMember(Value = "Saturday")] + [System.Runtime.Serialization.EnumMember(Value = "Saturday")] Saturday } internal static class DayOfWeekEnumExtension @@ -42,7 +35,6 @@ internal static string ToSerializedValue(this DayOfWeek? value) { return value == null ? null : ((DayOfWeek)value).ToSerializedValue(); } - internal static string ToSerializedValue(this DayOfWeek value) { switch( value ) @@ -64,7 +56,6 @@ internal static string ToSerializedValue(this DayOfWeek value) } return null; } - internal static DayOfWeek? ParseDayOfWeek(this string value) { switch( value ) @@ -87,4 +78,4 @@ internal static string ToSerializedValue(this DayOfWeek value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DedupState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DedupState.cs index 83497ee6a19d..71a456cfb068 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DedupState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DedupState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for DedupState. /// + + public static class DedupState { public const string Invalid = "Invalid"; public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DiskExclusionProperties.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DiskExclusionProperties.cs index 2e04d40b006b..b3bf2febb18e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DiskExclusionProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DiskExclusionProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class DiskExclusionProperties @@ -28,14 +20,18 @@ public DiskExclusionProperties() /// /// Initializes a new instance of the DiskExclusionProperties class. /// - /// List of Disks' Logical Unit Numbers (LUN) - /// to be used for VM Protection. - /// Flag to indicate whether DiskLunList - /// is to be included/ excluded from backup. - public DiskExclusionProperties(IList diskLunList = default(IList), bool? isInclusionList = default(bool?)) + + /// List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + /// + + /// Flag to indicate whether DiskLunList is to be included/ excluded from + /// backup. + /// + public DiskExclusionProperties(System.Collections.Generic.IList diskLunList = default(System.Collections.Generic.IList), bool? isInclusionList = default(bool?)) + { - DiskLunList = diskLunList; - IsInclusionList = isInclusionList; + this.DiskLunList = diskLunList; + this.IsInclusionList = isInclusionList; CustomInit(); } @@ -44,19 +40,19 @@ public DiskExclusionProperties() /// partial void CustomInit(); + /// - /// Gets or sets list of Disks' Logical Unit Numbers (LUN) to be used - /// for VM Protection. + /// Gets or sets list of Disks' Logical Unit Numbers (LUN) to be used for VM + /// Protection. /// - [JsonProperty(PropertyName = "diskLunList")] - public IList DiskLunList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskLunList")] + public System.Collections.Generic.IList DiskLunList {get; set; } /// - /// Gets or sets flag to indicate whether DiskLunList is to be - /// included/ excluded from backup. + /// Gets or sets flag to indicate whether DiskLunList is to be included/ + /// excluded from backup. /// - [JsonProperty(PropertyName = "isInclusionList")] - public bool? IsInclusionList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isInclusionList")] + public bool? IsInclusionList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DiskInformation.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DiskInformation.cs index a2c1009393c4..2253b06d7eef 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DiskInformation.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DiskInformation.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,17 @@ public DiskInformation() /// /// Initializes a new instance of the DiskInformation class. /// + + /// + /// + + /// + /// public DiskInformation(int? lun = default(int?), string name = default(string)) + { - Lun = lun; - Name = name; + this.Lun = lun; + this.Name = name; CustomInit(); } @@ -41,15 +42,17 @@ public DiskInformation() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "lun")] - public int? Lun { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lun")] + public int? Lun {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DistributedNodesInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DistributedNodesInfo.cs index a4a585e32caf..5e4bec2e57c8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DistributedNodesInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DistributedNodesInfo.cs @@ -1,21 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// This is used to represent the various nodes of the distributed - /// container. + /// This is used to represent the various nodes of the distributed container. /// public partial class DistributedNodesInfo { @@ -30,17 +23,22 @@ public DistributedNodesInfo() /// /// Initializes a new instance of the DistributedNodesInfo class. /// - /// Name of the node under a distributed - /// container. + + /// Name of the node under a distributed container. + /// + /// Status of this Node. - /// Failed | Succeeded - /// Error Details if the Status is - /// non-success. + /// Failed | Succeeded + /// + + /// Error Details if the Status is non-success. + /// public DistributedNodesInfo(string nodeName = default(string), string status = default(string), ErrorDetail errorDetail = default(ErrorDetail)) + { - NodeName = nodeName; - Status = status; - ErrorDetail = errorDetail; + this.NodeName = nodeName; + this.Status = status; + this.ErrorDetail = errorDetail; CustomInit(); } @@ -49,24 +47,24 @@ public DistributedNodesInfo() /// partial void CustomInit(); + /// /// Gets or sets name of the node under a distributed container. /// - [JsonProperty(PropertyName = "nodeName")] - public string NodeName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nodeName")] + public string NodeName {get; set; } /// /// Gets or sets status of this Node. /// Failed | Succeeded /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets error Details if the Status is non-success. /// - [JsonProperty(PropertyName = "errorDetail")] - public ErrorDetail ErrorDetail { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetail")] + public ErrorDetail ErrorDetail {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmBackupEngine.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmBackupEngine.cs index 1d4802747cc3..d0185fc66ffa 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmBackupEngine.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmBackupEngine.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,32 +24,49 @@ public DpmBackupEngine() /// /// Initializes a new instance of the DpmBackupEngine class. /// - /// Friendly name of the backup - /// engine. - /// Type of backup management for - /// the backup engine. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// Registration status of the backup - /// engine with the Recovery Services Vault. - /// Status of the backup engine with - /// the Recovery Services Vault. = - /// {Active/Deleting/DeleteFailed} - /// Backup status of the backup - /// engine. - /// Flag indicating if the backup engine be - /// registered, once already registered. - /// ID of the backup engine. - /// Backup engine version - /// Backup agent version - /// To check if backup - /// agent upgrade available - /// To check if backup engine - /// upgrade available - /// Extended info of the - /// backupengine + + /// Friendly name of the backup engine. + /// + + /// Type of backup management for the backup engine. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Registration status of the backup engine with the Recovery Services Vault. + /// + + /// Status of the backup engine with the Recovery Services Vault. = + /// {Active/Deleting/DeleteFailed} + /// + + /// Backup status of the backup engine. + /// + + /// Flag indicating if the backup engine be registered, once already + /// registered. + /// + + /// ID of the backup engine. + /// + + /// Backup engine version + /// + + /// Backup agent version + /// + + /// To check if backup agent upgrade available + /// + + /// To check if backup engine upgrade available + /// + + /// Extended info of the backupengine + /// public DpmBackupEngine(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string backupEngineState = default(string), string healthStatus = default(string), bool? canReRegister = default(bool?), string backupEngineId = default(string), string dpmVersion = default(string), string azureBackupAgentVersion = default(string), bool? isAzureBackupAgentUpgradeAvailable = default(bool?), bool? isDpmUpgradeAvailable = default(bool?), BackupEngineExtendedInfo extendedInfo = default(BackupEngineExtendedInfo)) - : base(friendlyName, backupManagementType, registrationStatus, backupEngineState, healthStatus, canReRegister, backupEngineId, dpmVersion, azureBackupAgentVersion, isAzureBackupAgentUpgradeAvailable, isDpmUpgradeAvailable, extendedInfo) + + : base(friendlyName, backupManagementType, registrationStatus, backupEngineState, healthStatus, canReRegister, backupEngineId, dpmVersion, azureBackupAgentVersion, isAzureBackupAgentUpgradeAvailable, isDpmUpgradeAvailable, extendedInfo) { CustomInit(); } @@ -66,4 +77,4 @@ public DpmBackupEngine() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmContainer.cs index b2ab6dc3dd51..9e2f40689e5b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmContainer.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,41 +24,59 @@ public DpmContainer() /// /// Initializes a new instance of the DpmContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// Specifies whether the container is - /// re-registrable. - /// ID of container. - /// Number of protected items in the - /// BackupEngine - /// Backup engine Agent version - /// List of BackupEngines protecting the - /// container - /// To check if upgrade - /// available - /// Protection status of the - /// container. - /// Extended Info of the container. - public DpmContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), bool? canReRegister = default(bool?), string containerId = default(string), long? protectedItemCount = default(long?), string dpmAgentVersion = default(string), IList dpmServers = default(IList), bool? upgradeAvailable = default(bool?), string protectionStatus = default(string), DPMContainerExtendedInfo extendedInfo = default(DPMContainerExtendedInfo)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// Specifies whether the container is re-registrable. + /// + + /// ID of container. + /// + + /// Number of protected items in the BackupEngine + /// + + /// Backup engine Agent version + /// + + /// List of BackupEngines protecting the container + /// + + /// To check if upgrade available + /// + + /// Protection status of the container. + /// + + /// Extended Info of the container. + /// + public DpmContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), bool? canReRegister = default(bool?), string containerId = default(string), long? protectedItemCount = default(long?), string dpmAgentVersion = default(string), System.Collections.Generic.IList dpmServers = default(System.Collections.Generic.IList), bool? upgradeAvailable = default(bool?), string protectionStatus = default(string), DPMContainerExtendedInfo extendedInfo = default(DPMContainerExtendedInfo)) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) { - CanReRegister = canReRegister; - ContainerId = containerId; - ProtectedItemCount = protectedItemCount; - DpmAgentVersion = dpmAgentVersion; - DpmServers = dpmServers; - UpgradeAvailable = upgradeAvailable; - ProtectionStatus = protectionStatus; - ExtendedInfo = extendedInfo; + this.CanReRegister = canReRegister; + this.ContainerId = containerId; + this.ProtectedItemCount = protectedItemCount; + this.DpmAgentVersion = dpmAgentVersion; + this.DpmServers = dpmServers; + this.UpgradeAvailable = upgradeAvailable; + this.ProtectionStatus = protectionStatus; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -75,53 +85,53 @@ public DpmContainer() /// partial void CustomInit(); + /// /// Gets or sets specifies whether the container is re-registrable. /// - [JsonProperty(PropertyName = "canReRegister")] - public bool? CanReRegister { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "canReRegister")] + public bool? CanReRegister {get; set; } /// - /// Gets or sets ID of container. + /// Gets or sets iD of container. /// - [JsonProperty(PropertyName = "containerId")] - public string ContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerId")] + public string ContainerId {get; set; } /// /// Gets or sets number of protected items in the BackupEngine /// - [JsonProperty(PropertyName = "protectedItemCount")] - public long? ProtectedItemCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemCount")] + public long? ProtectedItemCount {get; set; } /// /// Gets or sets backup engine Agent version /// - [JsonProperty(PropertyName = "dpmAgentVersion")] - public string DpmAgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dpmAgentVersion")] + public string DpmAgentVersion {get; set; } /// /// Gets or sets list of BackupEngines protecting the container /// - [JsonProperty(PropertyName = "dpmServers")] - public IList DpmServers { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dpmServers")] + public System.Collections.Generic.IList DpmServers {get; set; } /// /// Gets or sets to check if upgrade available /// - [JsonProperty(PropertyName = "upgradeAvailable")] - public bool? UpgradeAvailable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "upgradeAvailable")] + public bool? UpgradeAvailable {get; set; } /// /// Gets or sets protection status of the container. /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; set; } /// /// Gets or sets extended Info of the container. /// - [JsonProperty(PropertyName = "extendedInfo")] - public DPMContainerExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public DPMContainerExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmErrorInfo.cs index eb0f9cad199b..b56145472554 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,13 +23,17 @@ public DpmErrorInfo() /// /// Initializes a new instance of the DpmErrorInfo class. /// - /// Localized error string. - /// List of localized recommendations for - /// above error code. - public DpmErrorInfo(string errorString = default(string), IList recommendations = default(IList)) + + /// Localized error string. + /// + + /// List of localized recommendations for above error code. + /// + public DpmErrorInfo(string errorString = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - ErrorString = errorString; - Recommendations = recommendations; + this.ErrorString = errorString; + this.Recommendations = recommendations; CustomInit(); } @@ -46,18 +42,17 @@ public DpmErrorInfo() /// partial void CustomInit(); + /// /// Gets or sets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; set; } /// - /// Gets or sets list of localized recommendations for above error - /// code. + /// Gets or sets list of localized recommendations for above error code. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJob.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJob.cs index 0820090f06b0..3e8728c02baa 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,40 +24,65 @@ public DpmJob() /// /// Initializes a new instance of the DpmJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Time elapsed for job. - /// DPM server name managing the backup - /// item or backup job. - /// Name of cluster/server protecting - /// current backup item, if any. - /// Type of container. - /// Type of backup item. - /// The state/actions applicable on this job - /// like cancel/retry. - /// The errors. - /// Additional information for this - /// job. - public DpmJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), string dpmServerName = default(string), string containerName = default(string), string containerType = default(string), string workloadType = default(string), IList actionsInfo = default(IList), IList errorDetails = default(IList), DpmJobExtendedInfo extendedInfo = default(DpmJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Time elapsed for job. + /// + + /// DPM server name managing the backup item or backup job. + /// + + /// Name of cluster/server protecting current backup item, if any. + /// + + /// Type of container. + /// + + /// Type of backup item. + /// + + /// The state/actions applicable on this job like cancel/retry. + /// + + /// The errors. + /// + + /// Additional information for this job. + /// + public DpmJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), string dpmServerName = default(string), string containerName = default(string), string containerType = default(string), string workloadType = default(string), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), DpmJobExtendedInfo extendedInfo = default(DpmJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - Duration = duration; - DpmServerName = dpmServerName; - ContainerName = containerName; - ContainerType = containerType; - WorkloadType = workloadType; - ActionsInfo = actionsInfo; - ErrorDetails = errorDetails; - ExtendedInfo = extendedInfo; + this.Duration = duration; + this.DpmServerName = dpmServerName; + this.ContainerName = containerName; + this.ContainerType = containerType; + this.WorkloadType = workloadType; + this.ActionsInfo = actionsInfo; + this.ErrorDetails = errorDetails; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -74,56 +91,53 @@ public DpmJob() /// partial void CustomInit(); + /// /// Gets or sets time elapsed for job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets DPM server name managing the backup item or backup - /// job. + /// Gets or sets dPM server name managing the backup item or backup job. /// - [JsonProperty(PropertyName = "dpmServerName")] - public string DpmServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dpmServerName")] + public string DpmServerName {get; set; } /// - /// Gets or sets name of cluster/server protecting current backup item, - /// if any. + /// Gets or sets name of cluster/server protecting current backup item, if any. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets type of container. /// - [JsonProperty(PropertyName = "containerType")] - public string ContainerType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerType")] + public string ContainerType {get; set; } /// /// Gets or sets type of backup item. /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// - /// Gets or sets the state/actions applicable on this job like - /// cancel/retry. + /// Gets or sets the state/actions applicable on this job like cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets the errors. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// /// Gets or sets additional information for this job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public DpmJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public DpmJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJobExtendedInfo.cs index f1f3bf044560..8943768232f0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,16 +23,21 @@ public DpmJobExtendedInfo() /// /// Initializes a new instance of the DpmJobExtendedInfo class. /// - /// List of tasks associated with this - /// job. - /// The job properties. - /// Non localized error message on - /// job execution. - public DpmJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), string dynamicErrorMessage = default(string)) + + /// List of tasks associated with this job. + /// + + /// The job properties. + /// + + /// Non localized error message on job execution. + /// + public DpmJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -49,23 +46,23 @@ public DpmJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks associated with this job. /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets the job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets non localized error message on job execution. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJobTaskDetails.cs index 53658dc559e9..23775f33e88f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/DpmJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,29 @@ public DpmJobTaskDetails() /// /// Initializes a new instance of the DpmJobTaskDetails class. /// - /// The task display name. - /// The start time. - /// The end time. - /// Time elapsed for task. - /// The status. + + /// The task display name. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// Time elapsed for task. + /// + + /// The status. + /// public DpmJobTaskDetails(string taskId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.TimeSpan? duration = default(System.TimeSpan?), string status = default(string)) + { - TaskId = taskId; - StartTime = startTime; - EndTime = endTime; - Duration = duration; - Status = status; + this.TaskId = taskId; + this.StartTime = startTime; + this.EndTime = endTime; + this.Duration = duration; + this.Status = status; CustomInit(); } @@ -49,35 +54,35 @@ public DpmJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets time elapsed for task. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EncryptionAtRestType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EncryptionAtRestType.cs index cf638c2e2f8c..cafeaca0de00 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EncryptionAtRestType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EncryptionAtRestType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for EncryptionAtRestType. /// + + public static class EncryptionAtRestType { public const string Invalid = "Invalid"; public const string MicrosoftManaged = "MicrosoftManaged"; public const string CustomerManaged = "CustomerManaged"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EncryptionDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EncryptionDetails.cs index 8e9d8ed26b9b..656797e900ee 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EncryptionDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EncryptionDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,21 +23,30 @@ public EncryptionDetails() /// /// Initializes a new instance of the EncryptionDetails class. /// - /// Identifies whether this backup copy - /// represents an encrypted VM at the time of backup. - /// Key Url. - /// Secret Url. - /// ID of Key Vault where KEK is - /// stored. - /// ID of Key Vault where Secret is - /// stored. + + /// Identifies whether this backup copy represents an encrypted VM at the time + /// of backup. + /// + + /// Key Url. + /// + + /// Secret Url. + /// + + /// ID of Key Vault where KEK is stored. + /// + + /// ID of Key Vault where Secret is stored. + /// public EncryptionDetails(bool? encryptionEnabled = default(bool?), string kekUrl = default(string), string secretKeyUrl = default(string), string kekVaultId = default(string), string secretKeyVaultId = default(string)) + { - EncryptionEnabled = encryptionEnabled; - KekUrl = kekUrl; - SecretKeyUrl = secretKeyUrl; - KekVaultId = kekVaultId; - SecretKeyVaultId = secretKeyVaultId; + this.EncryptionEnabled = encryptionEnabled; + this.KekUrl = kekUrl; + this.SecretKeyUrl = secretKeyUrl; + this.KekVaultId = kekVaultId; + this.SecretKeyVaultId = secretKeyVaultId; CustomInit(); } @@ -52,36 +55,36 @@ public EncryptionDetails() /// partial void CustomInit(); + /// - /// Gets or sets identifies whether this backup copy represents an - /// encrypted VM at the time of backup. + /// Gets or sets identifies whether this backup copy represents an encrypted VM + /// at the time of backup. /// - [JsonProperty(PropertyName = "encryptionEnabled")] - public bool? EncryptionEnabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionEnabled")] + public bool? EncryptionEnabled {get; set; } /// /// Gets or sets key Url. /// - [JsonProperty(PropertyName = "kekUrl")] - public string KekUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekUrl")] + public string KekUrl {get; set; } /// /// Gets or sets secret Url. /// - [JsonProperty(PropertyName = "secretKeyUrl")] - public string SecretKeyUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secretKeyUrl")] + public string SecretKeyUrl {get; set; } /// - /// Gets or sets ID of Key Vault where KEK is stored. + /// Gets or sets iD of Key Vault where KEK is stored. /// - [JsonProperty(PropertyName = "kekVaultId")] - public string KekVaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekVaultId")] + public string KekVaultId {get; set; } /// - /// Gets or sets ID of Key Vault where Secret is stored. + /// Gets or sets iD of Key Vault where Secret is stored. /// - [JsonProperty(PropertyName = "secretKeyVaultId")] - public string SecretKeyVaultId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "secretKeyVaultId")] + public string SecretKeyVaultId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EnhancedSecurityState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EnhancedSecurityState.cs index f50f7e014ca4..11cc8d408434 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EnhancedSecurityState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/EnhancedSecurityState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for EnhancedSecurityState. /// + + public static class EnhancedSecurityState { public const string Invalid = "Invalid"; public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs index 0a3deaaeb053..1e88a92ef353 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public ErrorAdditionalInfo() /// /// Initializes a new instance of the ErrorAdditionalInfo class. /// - /// The additional info type. - /// The additional info. + + /// The additional info type. + /// + + /// The additional info. + /// public ErrorAdditionalInfo(string type = default(string), object info = default(object)) + { - Type = type; - Info = info; + this.Type = type; + this.Info = info; CustomInit(); } @@ -43,17 +42,17 @@ public ErrorAdditionalInfo() /// partial void CustomInit(); + /// /// Gets the additional info type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets the additional info. /// - [JsonProperty(PropertyName = "info")] - public object Info { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "info")] + public object Info {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ErrorDetail.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ErrorDetail.cs index c2e58ec5e09c..ca73ade885f4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ErrorDetail.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ErrorDetail.cs @@ -1,23 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Error Detail class which encapsulates Code, Message and - /// Recommendations. + /// Error Detail class which encapsulates Code, Message and Recommendations. /// public partial class ErrorDetail { @@ -32,15 +23,21 @@ public ErrorDetail() /// /// Initializes a new instance of the ErrorDetail class. /// - /// Error code. - /// Error Message related to the Code. - /// List of recommendation - /// strings. - public ErrorDetail(string code = default(string), string message = default(string), IList recommendations = default(IList)) + + /// Error code. + /// + + /// Error Message related to the Code. + /// + + /// List of recommendation strings. + /// + public ErrorDetail(string code = default(string), string message = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - Code = code; - Message = message; - Recommendations = recommendations; + this.Code = code; + this.Message = message; + this.Recommendations = recommendations; CustomInit(); } @@ -49,23 +46,23 @@ public ErrorDetail() /// partial void CustomInit(); + /// /// Gets error code. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } /// /// Gets error Message related to the Code. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } /// /// Gets list of recommendation strings. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ExportJobsOperationResultInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ExportJobsOperationResultInfo.cs index c3bd195b2906..8212a7dc0a70 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ExportJobsOperationResultInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ExportJobsOperationResultInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ExportJobsOperationResultInfo : OperationResultInfoBase { /// - /// Initializes a new instance of the ExportJobsOperationResultInfo - /// class. + /// Initializes a new instance of the ExportJobsOperationResultInfo class. /// public ExportJobsOperationResultInfo() { @@ -29,23 +22,28 @@ public ExportJobsOperationResultInfo() } /// - /// Initializes a new instance of the ExportJobsOperationResultInfo - /// class. + /// Initializes a new instance of the ExportJobsOperationResultInfo class. /// - /// URL of the blob into which the serialized - /// string of list of jobs is exported. - /// SAS key to access the blob. It expires in - /// 15 mins. - /// URL of the blob into which the - /// ExcelFile is uploaded. - /// SAS key to access the blob. It - /// expires in 15 mins. + + /// URL of the blob into which the serialized string of list of jobs is + /// exported. + /// + + /// SAS key to access the blob. It expires in 15 mins. + /// + + /// URL of the blob into which the ExcelFile is uploaded. + /// + + /// SAS key to access the blob. It expires in 15 mins. + /// public ExportJobsOperationResultInfo(string blobUrl = default(string), string blobSasKey = default(string), string excelFileBlobUrl = default(string), string excelFileBlobSasKey = default(string)) + { - BlobUrl = blobUrl; - BlobSasKey = blobSasKey; - ExcelFileBlobUrl = excelFileBlobUrl; - ExcelFileBlobSasKey = excelFileBlobSasKey; + this.BlobUrl = blobUrl; + this.BlobSasKey = blobSasKey; + this.ExcelFileBlobUrl = excelFileBlobUrl; + this.ExcelFileBlobSasKey = excelFileBlobSasKey; CustomInit(); } @@ -54,30 +52,30 @@ public ExportJobsOperationResultInfo() /// partial void CustomInit(); + /// - /// Gets or sets URL of the blob into which the serialized string of - /// list of jobs is exported. + /// Gets or sets uRL of the blob into which the serialized string of list of + /// jobs is exported. /// - [JsonProperty(PropertyName = "blobUrl")] - public string BlobUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "blobUrl")] + public string BlobUrl {get; set; } /// - /// Gets or sets SAS key to access the blob. It expires in 15 mins. + /// Gets or sets sAS key to access the blob. It expires in 15 mins. /// - [JsonProperty(PropertyName = "blobSasKey")] - public string BlobSasKey { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "blobSasKey")] + public string BlobSasKey {get; set; } /// - /// Gets or sets URL of the blob into which the ExcelFile is uploaded. + /// Gets or sets uRL of the blob into which the ExcelFile is uploaded. /// - [JsonProperty(PropertyName = "excelFileBlobUrl")] - public string ExcelFileBlobUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "excelFileBlobUrl")] + public string ExcelFileBlobUrl {get; set; } /// - /// Gets or sets SAS key to access the blob. It expires in 15 mins. + /// Gets or sets sAS key to access the blob. It expires in 15 mins. /// - [JsonProperty(PropertyName = "excelFileBlobSasKey")] - public string ExcelFileBlobSasKey { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "excelFileBlobSasKey")] + public string ExcelFileBlobSasKey {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ExtendedProperties.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ExtendedProperties.cs index ac30869d3551..b265689eaab8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ExtendedProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ExtendedProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public ExtendedProperties() /// /// Initializes a new instance of the ExtendedProperties class. /// - /// Extended Properties for Disk - /// Exclusion. - /// Linux VM name - public ExtendedProperties(DiskExclusionProperties diskExclusionProperties = default(DiskExclusionProperties), string linuxVmApplicationName = default(string)) + + /// Extended Properties for Disk Exclusion. + /// + + /// Linux VM name + /// + public ExtendedProperties(DiskExclusionProperties diskExclusionProperties = default(DiskExclusionProperties), string linuxVMApplicationName = default(string)) + { - DiskExclusionProperties = diskExclusionProperties; - LinuxVmApplicationName = linuxVmApplicationName; + this.DiskExclusionProperties = diskExclusionProperties; + this.LinuxVMApplicationName = linuxVMApplicationName; CustomInit(); } @@ -44,17 +42,17 @@ public ExtendedProperties() /// partial void CustomInit(); + /// /// Gets or sets extended Properties for Disk Exclusion. /// - [JsonProperty(PropertyName = "diskExclusionProperties")] - public DiskExclusionProperties DiskExclusionProperties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskExclusionProperties")] + public DiskExclusionProperties DiskExclusionProperties {get; set; } /// /// Gets or sets linux VM name /// - [JsonProperty(PropertyName = "linuxVmApplicationName")] - public string LinuxVmApplicationName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "linuxVmApplicationName")] + public string LinuxVMApplicationName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/FabricName.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/FabricName.cs index b46109646dca..b4848303e6d7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/FabricName.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/FabricName.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for FabricName. /// + + public static class FabricName { public const string Invalid = "Invalid"; public const string Azure = "Azure"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/FeatureSupportRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/FeatureSupportRequest.cs index 0a6782043920..74f9ce145f15 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/FeatureSupportRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/FeatureSupportRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public FeatureSupportRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericContainer.cs index a035bd58cbde..2e0a663f6a46 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,25 +24,35 @@ public GenericContainer() /// /// Initializes a new instance of the GenericContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// Name of the container's fabric - /// Extended information (not - /// returned in List container API calls) + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// Name of the container's fabric + /// + + /// Extended information (not returned in List container API calls) + /// public GenericContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), string fabricName = default(string), GenericContainerExtendedInfo extendedInformation = default(GenericContainerExtendedInfo)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) { - FabricName = fabricName; - ExtendedInformation = extendedInformation; + this.FabricName = fabricName; + this.ExtendedInformation = extendedInformation; CustomInit(); } @@ -57,18 +61,18 @@ public GenericContainer() /// partial void CustomInit(); + /// - /// Gets or sets name of the container's fabric + /// Gets or sets name of the container's fabric /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// - /// Gets or sets extended information (not returned in List container - /// API calls) + /// Gets or sets extended information (not returned in List container API + /// calls) /// - [JsonProperty(PropertyName = "extendedInformation")] - public GenericContainerExtendedInfo ExtendedInformation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInformation")] + public GenericContainerExtendedInfo ExtendedInformation {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericContainerExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericContainerExtendedInfo.cs index 071605b53210..27d21a48cbe9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericContainerExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericContainerExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class GenericContainerExtendedInfo { /// - /// Initializes a new instance of the GenericContainerExtendedInfo - /// class. + /// Initializes a new instance of the GenericContainerExtendedInfo class. /// public GenericContainerExtendedInfo() { @@ -30,19 +21,23 @@ public GenericContainerExtendedInfo() } /// - /// Initializes a new instance of the GenericContainerExtendedInfo - /// class. + /// Initializes a new instance of the GenericContainerExtendedInfo class. /// - /// Public key of container cert - /// Container identity - /// information - /// Azure Backup Service Endpoints for - /// the container - public GenericContainerExtendedInfo(string rawCertData = default(string), ContainerIdentityInfo containerIdentityInfo = default(ContainerIdentityInfo), IDictionary serviceEndpoints = default(IDictionary)) + + /// Public key of container cert + /// + + /// Container identity information + /// + + /// Azure Backup Service Endpoints for the container + /// + public GenericContainerExtendedInfo(string rawCertData = default(string), ContainerIdentityInfo containerIdentityInfo = default(ContainerIdentityInfo), System.Collections.Generic.IDictionary serviceEndpoints = default(System.Collections.Generic.IDictionary)) + { - RawCertData = rawCertData; - ContainerIdentityInfo = containerIdentityInfo; - ServiceEndpoints = serviceEndpoints; + this.RawCertData = rawCertData; + this.ContainerIdentityInfo = containerIdentityInfo; + this.ServiceEndpoints = serviceEndpoints; CustomInit(); } @@ -51,23 +46,23 @@ public GenericContainerExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets public key of container cert /// - [JsonProperty(PropertyName = "rawCertData")] - public string RawCertData { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rawCertData")] + public string RawCertData {get; set; } /// /// Gets or sets container identity information /// - [JsonProperty(PropertyName = "containerIdentityInfo")] - public ContainerIdentityInfo ContainerIdentityInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerIdentityInfo")] + public ContainerIdentityInfo ContainerIdentityInfo {get; set; } /// /// Gets or sets azure Backup Service Endpoints for the container /// - [JsonProperty(PropertyName = "serviceEndpoints")] - public IDictionary ServiceEndpoints { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceEndpoints")] + public System.Collections.Generic.IDictionary ServiceEndpoints {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericProtectedItem.cs index 320bb766c6e7..4140b69af7cc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,68 +24,97 @@ public GenericProtectedItem() /// /// Initializes a new instance of the GenericProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of the container. - /// Indicates consistency of policy object - /// and policy applied to this backup item. + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of the container. + /// + + /// Indicates consistency of policy object and policy applied to this backup + /// item. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'IRPending', 'Protected', /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', /// 'BackupsSuspended' - /// Data Plane Service ID of the - /// protected item. - /// Loosely coupled (type, value) - /// associations (example - parent of a protected item) - /// Name of this backup item's fabric. - public GenericProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string policyState = default(string), string protectionState = default(string), long? protectedItemId = default(long?), IDictionary sourceAssociations = default(IDictionary), string fabricName = default(string)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) + + /// Data Plane Service ID of the protected item. + /// + + /// Loosely coupled (type, value) associations (example - parent of a protected + /// item) + /// + + /// Name of this backup item's fabric. + /// + public GenericProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string policyState = default(string), string protectionState = default(string), long? protectedItemId = default(long?), System.Collections.Generic.IDictionary sourceAssociations = default(System.Collections.Generic.IDictionary), string fabricName = default(string)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) { - FriendlyName = friendlyName; - PolicyState = policyState; - ProtectionState = protectionState; - ProtectedItemId = protectedItemId; - SourceAssociations = sourceAssociations; - FabricName = fabricName; + this.FriendlyName = friendlyName; + this.PolicyState = policyState; + this.ProtectionState = protectionState; + this.ProtectedItemId = protectedItemId; + this.SourceAssociations = sourceAssociations; + this.FabricName = fabricName; CustomInit(); } @@ -102,45 +123,43 @@ public GenericProtectedItem() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the container. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets indicates consistency of policy object and policy - /// applied to this backup item. + /// Gets or sets indicates consistency of policy object and policy applied to + /// this backup item. /// - [JsonProperty(PropertyName = "policyState")] - public string PolicyState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyState")] + public string PolicyState {get; set; } /// - /// Gets or sets backup state of this backup item. Possible values - /// include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', - /// 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' + /// Gets or sets backup state of this backup item. Possible values include: 'Invalid', 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused', 'BackupsSuspended' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// /// Gets or sets data Plane Service ID of the protected item. /// - [JsonProperty(PropertyName = "protectedItemId")] - public long? ProtectedItemId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemId")] + public long? ProtectedItemId {get; set; } /// - /// Gets or sets loosely coupled (type, value) associations (example - - /// parent of a protected item) + /// Gets or sets loosely coupled (type, value) associations (example - parent + /// of a protected item) /// - [JsonProperty(PropertyName = "sourceAssociations")] - public IDictionary SourceAssociations { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceAssociations")] + public System.Collections.Generic.IDictionary SourceAssociations {get; set; } /// - /// Gets or sets name of this backup item's fabric. + /// Gets or sets name of this backup item's fabric. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericProtectionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericProtectionPolicy.cs index d11669d23067..0d0c01d7021f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericProtectionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericProtectionPolicy.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,21 +24,29 @@ public GenericProtectionPolicy() /// /// Initializes a new instance of the GenericProtectionPolicy class. /// - /// Number of items associated with - /// this policy. - /// ResourceGuard - /// Operation Requests - /// List of sub-protection policies - /// which includes schedule and retention - /// TimeZone optional input as string. For - /// example: TimeZone = "Pacific Standard Time". - /// Name of this policy's fabric. - public GenericProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), IList subProtectionPolicy = default(IList), string timeZone = default(string), string fabricName = default(string)) - : base(protectedItemsCount, resourceGuardOperationRequests) + + /// Number of items associated with this policy. + /// + + /// ResourceGuard Operation Requests + /// + + /// List of sub-protection policies which includes schedule and retention + /// + + /// TimeZone optional input as string. For example: TimeZone = "Pacific + /// Standard Time". + /// + + /// Name of this policy's fabric. + /// + public GenericProtectionPolicy(int? protectedItemsCount = default(int?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), System.Collections.Generic.IList subProtectionPolicy = default(System.Collections.Generic.IList), string timeZone = default(string), string fabricName = default(string)) + + : base(protectedItemsCount, resourceGuardOperationRequests) { - SubProtectionPolicy = subProtectionPolicy; - TimeZone = timeZone; - FabricName = fabricName; + this.SubProtectionPolicy = subProtectionPolicy; + this.TimeZone = timeZone; + this.FabricName = fabricName; CustomInit(); } @@ -55,25 +55,25 @@ public GenericProtectionPolicy() /// partial void CustomInit(); + /// - /// Gets or sets list of sub-protection policies which includes - /// schedule and retention + /// Gets or sets list of sub-protection policies which includes schedule and + /// retention /// - [JsonProperty(PropertyName = "subProtectionPolicy")] - public IList SubProtectionPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subProtectionPolicy")] + public System.Collections.Generic.IList SubProtectionPolicy {get; set; } /// - /// Gets or sets timeZone optional input as string. For example: - /// TimeZone = "Pacific Standard Time". + /// Gets or sets timeZone optional input as string. For example: TimeZone = + /// "Pacific Standard Time". /// - [JsonProperty(PropertyName = "timeZone")] - public string TimeZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "timeZone")] + public string TimeZone {get; set; } /// - /// Gets or sets name of this policy's fabric. + /// Gets or sets name of this policy's fabric. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericRecoveryPoint.cs index 5f38d1731cdf..85591cfa43c5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GenericRecoveryPoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,22 +24,29 @@ public GenericRecoveryPoint() /// /// Initializes a new instance of the GenericRecoveryPoint class. /// - /// Friendly name of the backup - /// copy. - /// Type of the backup copy. - /// Time at which this backup copy was - /// created. - /// Additional information - /// associated with this backup copy. - /// Properties of Recovery - /// Point + + /// Friendly name of the backup copy. + /// + + /// Type of the backup copy. + /// + + /// Time at which this backup copy was created. + /// + + /// Additional information associated with this backup copy. + /// + + /// Properties of Recovery Point + /// public GenericRecoveryPoint(string friendlyName = default(string), string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string recoveryPointAdditionalInfo = default(string), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties)) + { - FriendlyName = friendlyName; - RecoveryPointType = recoveryPointType; - RecoveryPointTime = recoveryPointTime; - RecoveryPointAdditionalInfo = recoveryPointAdditionalInfo; - RecoveryPointProperties = recoveryPointProperties; + this.FriendlyName = friendlyName; + this.RecoveryPointType = recoveryPointType; + this.RecoveryPointTime = recoveryPointTime; + this.RecoveryPointAdditionalInfo = recoveryPointAdditionalInfo; + this.RecoveryPointProperties = recoveryPointProperties; CustomInit(); } @@ -54,36 +55,35 @@ public GenericRecoveryPoint() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the backup copy. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets type of the backup copy. /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// /// Gets or sets time at which this backup copy was created. /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public System.DateTime? RecoveryPointTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime {get; set; } /// - /// Gets or sets additional information associated with this backup - /// copy. + /// Gets or sets additional information associated with this backup copy. /// - [JsonProperty(PropertyName = "recoveryPointAdditionalInfo")] - public string RecoveryPointAdditionalInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointAdditionalInfo")] + public string RecoveryPointAdditionalInfo {get; set; } /// /// Gets or sets properties of Recovery Point /// - [JsonProperty(PropertyName = "recoveryPointProperties")] - public RecoveryPointProperties RecoveryPointProperties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointProperties")] + public RecoveryPointProperties RecoveryPointProperties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GetProtectedItemQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GetProtectedItemQueryObject.cs index e84810c7d2be..ecfdc4f54564 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GetProtectedItemQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/GetProtectedItemQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class GetProtectedItemQueryObject { /// - /// Initializes a new instance of the GetProtectedItemQueryObject - /// class. + /// Initializes a new instance of the GetProtectedItemQueryObject class. /// public GetProtectedItemQueryObject() { @@ -28,14 +21,15 @@ public GetProtectedItemQueryObject() } /// - /// Initializes a new instance of the GetProtectedItemQueryObject - /// class. + /// Initializes a new instance of the GetProtectedItemQueryObject class. /// - /// Specifies if the additional information should - /// be provided for this item. + + /// Specifies if the additional information should be provided for this item. + /// public GetProtectedItemQueryObject(string expand = default(string)) + { - Expand = expand; + this.Expand = expand; CustomInit(); } @@ -44,12 +38,12 @@ public GetProtectedItemQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets specifies if the additional information should be - /// provided for this item. + /// Gets or sets specifies if the additional information should be provided for + /// this item. /// - [JsonProperty(PropertyName = "expand")] - public string Expand { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "expand")] + public string Expand {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HealthState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HealthState.cs index 161d62917450..28baedf1c4a1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HealthState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HealthState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for HealthState. /// + + public static class HealthState { public const string Passed = "Passed"; @@ -21,4 +18,4 @@ public static class HealthState public const string ActionSuggested = "ActionSuggested"; public const string Invalid = "Invalid"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HealthStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HealthStatus.cs index 975069b5ea17..1feaca3803fd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HealthStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HealthStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for HealthStatus. /// + + public static class HealthStatus { public const string Passed = "Passed"; @@ -21,4 +18,4 @@ public static class HealthStatus public const string ActionSuggested = "ActionSuggested"; public const string Invalid = "Invalid"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HourlySchedule.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HourlySchedule.cs index 992c429e5121..bfbf9d4d80bf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HourlySchedule.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HourlySchedule.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; public partial class HourlySchedule @@ -26,18 +20,22 @@ public HourlySchedule() /// /// Initializes a new instance of the HourlySchedule class. /// - /// Interval at which backup needs to be - /// triggered. For hourly the value - /// can be 4/6/8/12 - /// To specify start time of the - /// backup window - /// To specify duration of the - /// backup window + + /// Interval at which backup needs to be triggered. For hourly the value + /// can be 4/6/8/12 + /// + + /// To specify start time of the backup window + /// + + /// To specify duration of the backup window + /// public HourlySchedule(int? interval = default(int?), System.DateTime? scheduleWindowStartTime = default(System.DateTime?), int? scheduleWindowDuration = default(int?)) + { - Interval = interval; - ScheduleWindowStartTime = scheduleWindowStartTime; - ScheduleWindowDuration = scheduleWindowDuration; + this.Interval = interval; + this.ScheduleWindowStartTime = scheduleWindowStartTime; + this.ScheduleWindowDuration = scheduleWindowDuration; CustomInit(); } @@ -46,25 +44,25 @@ public HourlySchedule() /// partial void CustomInit(); + /// - /// Gets or sets interval at which backup needs to be triggered. For - /// hourly the value + /// Gets or sets interval at which backup needs to be triggered. For hourly the + /// value /// can be 4/6/8/12 /// - [JsonProperty(PropertyName = "interval")] - public int? Interval { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "interval")] + public int? Interval {get; set; } /// /// Gets or sets to specify start time of the backup window /// - [JsonProperty(PropertyName = "scheduleWindowStartTime")] - public System.DateTime? ScheduleWindowStartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleWindowStartTime")] + public System.DateTime? ScheduleWindowStartTime {get; set; } /// /// Gets or sets to specify duration of the backup window /// - [JsonProperty(PropertyName = "scheduleWindowDuration")] - public int? ScheduleWindowDuration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleWindowDuration")] + public int? ScheduleWindowDuration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HttpStatusCode.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HttpStatusCode.cs index ce56d6551ee1..448856ad7cdd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HttpStatusCode.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/HttpStatusCode.cs @@ -1,119 +1,112 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for HttpStatusCode. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum HttpStatusCode { - [EnumMember(Value = "Continue")] + [System.Runtime.Serialization.EnumMember(Value = "Continue")] Continue, - [EnumMember(Value = "SwitchingProtocols")] + [System.Runtime.Serialization.EnumMember(Value = "SwitchingProtocols")] SwitchingProtocols, - [EnumMember(Value = "OK")] + [System.Runtime.Serialization.EnumMember(Value = "OK")] OK, - [EnumMember(Value = "Created")] + [System.Runtime.Serialization.EnumMember(Value = "Created")] Created, - [EnumMember(Value = "Accepted")] + [System.Runtime.Serialization.EnumMember(Value = "Accepted")] Accepted, - [EnumMember(Value = "NonAuthoritativeInformation")] + [System.Runtime.Serialization.EnumMember(Value = "NonAuthoritativeInformation")] NonAuthoritativeInformation, - [EnumMember(Value = "NoContent")] + [System.Runtime.Serialization.EnumMember(Value = "NoContent")] NoContent, - [EnumMember(Value = "ResetContent")] + [System.Runtime.Serialization.EnumMember(Value = "ResetContent")] ResetContent, - [EnumMember(Value = "PartialContent")] + [System.Runtime.Serialization.EnumMember(Value = "PartialContent")] PartialContent, - [EnumMember(Value = "MultipleChoices")] + [System.Runtime.Serialization.EnumMember(Value = "MultipleChoices")] MultipleChoices, - [EnumMember(Value = "Ambiguous")] + [System.Runtime.Serialization.EnumMember(Value = "Ambiguous")] Ambiguous, - [EnumMember(Value = "MovedPermanently")] + [System.Runtime.Serialization.EnumMember(Value = "MovedPermanently")] MovedPermanently, - [EnumMember(Value = "Moved")] + [System.Runtime.Serialization.EnumMember(Value = "Moved")] Moved, - [EnumMember(Value = "Found")] + [System.Runtime.Serialization.EnumMember(Value = "Found")] Found, - [EnumMember(Value = "Redirect")] + [System.Runtime.Serialization.EnumMember(Value = "Redirect")] Redirect, - [EnumMember(Value = "SeeOther")] + [System.Runtime.Serialization.EnumMember(Value = "SeeOther")] SeeOther, - [EnumMember(Value = "RedirectMethod")] + [System.Runtime.Serialization.EnumMember(Value = "RedirectMethod")] RedirectMethod, - [EnumMember(Value = "NotModified")] + [System.Runtime.Serialization.EnumMember(Value = "NotModified")] NotModified, - [EnumMember(Value = "UseProxy")] + [System.Runtime.Serialization.EnumMember(Value = "UseProxy")] UseProxy, - [EnumMember(Value = "Unused")] + [System.Runtime.Serialization.EnumMember(Value = "Unused")] Unused, - [EnumMember(Value = "TemporaryRedirect")] + [System.Runtime.Serialization.EnumMember(Value = "TemporaryRedirect")] TemporaryRedirect, - [EnumMember(Value = "RedirectKeepVerb")] + [System.Runtime.Serialization.EnumMember(Value = "RedirectKeepVerb")] RedirectKeepVerb, - [EnumMember(Value = "BadRequest")] + [System.Runtime.Serialization.EnumMember(Value = "BadRequest")] BadRequest, - [EnumMember(Value = "Unauthorized")] + [System.Runtime.Serialization.EnumMember(Value = "Unauthorized")] Unauthorized, - [EnumMember(Value = "PaymentRequired")] + [System.Runtime.Serialization.EnumMember(Value = "PaymentRequired")] PaymentRequired, - [EnumMember(Value = "Forbidden")] + [System.Runtime.Serialization.EnumMember(Value = "Forbidden")] Forbidden, - [EnumMember(Value = "NotFound")] + [System.Runtime.Serialization.EnumMember(Value = "NotFound")] NotFound, - [EnumMember(Value = "MethodNotAllowed")] + [System.Runtime.Serialization.EnumMember(Value = "MethodNotAllowed")] MethodNotAllowed, - [EnumMember(Value = "NotAcceptable")] + [System.Runtime.Serialization.EnumMember(Value = "NotAcceptable")] NotAcceptable, - [EnumMember(Value = "ProxyAuthenticationRequired")] + [System.Runtime.Serialization.EnumMember(Value = "ProxyAuthenticationRequired")] ProxyAuthenticationRequired, - [EnumMember(Value = "RequestTimeout")] + [System.Runtime.Serialization.EnumMember(Value = "RequestTimeout")] RequestTimeout, - [EnumMember(Value = "Conflict")] + [System.Runtime.Serialization.EnumMember(Value = "Conflict")] Conflict, - [EnumMember(Value = "Gone")] + [System.Runtime.Serialization.EnumMember(Value = "Gone")] Gone, - [EnumMember(Value = "LengthRequired")] + [System.Runtime.Serialization.EnumMember(Value = "LengthRequired")] LengthRequired, - [EnumMember(Value = "PreconditionFailed")] + [System.Runtime.Serialization.EnumMember(Value = "PreconditionFailed")] PreconditionFailed, - [EnumMember(Value = "RequestEntityTooLarge")] + [System.Runtime.Serialization.EnumMember(Value = "RequestEntityTooLarge")] RequestEntityTooLarge, - [EnumMember(Value = "RequestUriTooLong")] + [System.Runtime.Serialization.EnumMember(Value = "RequestUriTooLong")] RequestUriTooLong, - [EnumMember(Value = "UnsupportedMediaType")] + [System.Runtime.Serialization.EnumMember(Value = "UnsupportedMediaType")] UnsupportedMediaType, - [EnumMember(Value = "RequestedRangeNotSatisfiable")] + [System.Runtime.Serialization.EnumMember(Value = "RequestedRangeNotSatisfiable")] RequestedRangeNotSatisfiable, - [EnumMember(Value = "ExpectationFailed")] + [System.Runtime.Serialization.EnumMember(Value = "ExpectationFailed")] ExpectationFailed, - [EnumMember(Value = "UpgradeRequired")] + [System.Runtime.Serialization.EnumMember(Value = "UpgradeRequired")] UpgradeRequired, - [EnumMember(Value = "InternalServerError")] + [System.Runtime.Serialization.EnumMember(Value = "InternalServerError")] InternalServerError, - [EnumMember(Value = "NotImplemented")] + [System.Runtime.Serialization.EnumMember(Value = "NotImplemented")] NotImplemented, - [EnumMember(Value = "BadGateway")] + [System.Runtime.Serialization.EnumMember(Value = "BadGateway")] BadGateway, - [EnumMember(Value = "ServiceUnavailable")] + [System.Runtime.Serialization.EnumMember(Value = "ServiceUnavailable")] ServiceUnavailable, - [EnumMember(Value = "GatewayTimeout")] + [System.Runtime.Serialization.EnumMember(Value = "GatewayTimeout")] GatewayTimeout, - [EnumMember(Value = "HttpVersionNotSupported")] + [System.Runtime.Serialization.EnumMember(Value = "HttpVersionNotSupported")] HttpVersionNotSupported } internal static class HttpStatusCodeEnumExtension @@ -122,7 +115,6 @@ internal static string ToSerializedValue(this HttpStatusCode? value) { return value == null ? null : ((HttpStatusCode)value).ToSerializedValue(); } - internal static string ToSerializedValue(this HttpStatusCode value) { switch( value ) @@ -224,7 +216,6 @@ internal static string ToSerializedValue(this HttpStatusCode value) } return null; } - internal static HttpStatusCode? ParseHttpStatusCode(this string value) { switch( value ) @@ -327,4 +318,4 @@ internal static string ToSerializedValue(this HttpStatusCode value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IAASVMPolicyType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IAASVMPolicyType.cs index b499b389b3fd..6c0e744e4b5b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IAASVMPolicyType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IAASVMPolicyType.cs @@ -1,23 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { /// - /// Defines values for IAASVMPolicyType. + /// Defines values for IaasvmPolicyType. /// - public static class IAASVMPolicyType + + + public static class IaasvmPolicyType { public const string Invalid = "Invalid"; public const string V1 = "V1"; public const string V2 = "V2"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ILRRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ILRRequest.cs index 47bd20e0beba..8f91f7cc547e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ILRRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ILRRequest.cs @@ -1,22 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// /// Parameters to Provision ILR API. /// - [Newtonsoft.Json.JsonObject("ILRRequest")] + [Newtonsoft.Json.JsonObject("IlrRequest")] public partial class ILRRequest { /// @@ -34,4 +28,4 @@ public ILRRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ILRRequestResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ILRRequestResource.cs index 5456a366d768..b955cb3ec831 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ILRRequestResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ILRRequestResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,20 +23,33 @@ public ILRRequestResource() /// /// Initializes a new instance of the ILRRequestResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// ILRRequestResource properties - public ILRRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), ILRRequest properties = default(ILRRequest)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// ILRRequestResource properties + /// + public ILRRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), ILRRequest properties = default(ILRRequest)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -53,11 +58,11 @@ public ILRRequestResource() /// partial void CustomInit(); + /// /// Gets or sets iLRRequestResource properties /// - [JsonProperty(PropertyName = "properties")] - public ILRRequest Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ILRRequest Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaaSVMContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaaSVMContainer.cs index 2d192dcb55ae..a5fce515380f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaaSVMContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaaSVMContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,30 +24,41 @@ public IaaSVMContainer() /// /// Initializes a new instance of the IaaSVMContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// Fully qualified ARM url of the - /// virtual machine represented by this Azure IaaS VM - /// container. - /// Specifies whether the container - /// represents a Classic or an Azure Resource Manager VM. - /// Resource group name of Recovery - /// Services Vault. + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// Fully qualified ARM url of the virtual machine represented by this Azure + /// IaaS VM container. + /// + + /// Specifies whether the container represents a Classic or an Azure Resource + /// Manager VM. + /// + + /// Resource group name of Recovery Services Vault. + /// public IaaSVMContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), string virtualMachineId = default(string), string virtualMachineVersion = default(string), string resourceGroup = default(string)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) { - VirtualMachineId = virtualMachineId; - VirtualMachineVersion = virtualMachineVersion; - ResourceGroup = resourceGroup; + this.VirtualMachineId = virtualMachineId; + this.VirtualMachineVersion = virtualMachineVersion; + this.ResourceGroup = resourceGroup; CustomInit(); } @@ -62,25 +67,25 @@ public IaaSVMContainer() /// partial void CustomInit(); + /// - /// Gets or sets fully qualified ARM url of the virtual machine - /// represented by this Azure IaaS VM container. + /// Gets or sets fully qualified ARM url of the virtual machine represented by + /// this Azure IaaS VM container. /// - [JsonProperty(PropertyName = "virtualMachineId")] - public string VirtualMachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineId")] + public string VirtualMachineId {get; set; } /// - /// Gets or sets specifies whether the container represents a Classic - /// or an Azure Resource Manager VM. + /// Gets or sets specifies whether the container represents a Classic or an + /// Azure Resource Manager VM. /// - [JsonProperty(PropertyName = "virtualMachineVersion")] - public string VirtualMachineVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineVersion")] + public string VirtualMachineVersion {get; set; } /// /// Gets or sets resource group name of Recovery Services Vault. /// - [JsonProperty(PropertyName = "resourceGroup")] - public string ResourceGroup { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGroup")] + public string ResourceGroup {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaaSVMProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaaSVMProtectableItem.cs index 82e591dc8ac5..72ee3248cb14 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaaSVMProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaaSVMProtectableItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,27 +24,36 @@ public IaaSVMProtectableItem() /// /// Initializes a new instance of the IaaSVMProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' - /// Fully qualified ARM ID of the - /// virtual machine. - /// Specifies whether the container - /// represents a Classic or an Azure Resource Manager VM. - /// Resource group name of Recovery - /// Services Vault. + + /// Fully qualified ARM ID of the virtual machine. + /// + + /// Specifies whether the container represents a Classic or an Azure Resource + /// Manager VM. + /// + + /// Resource group name of Recovery Services Vault. + /// public IaaSVMProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string), string virtualMachineId = default(string), string virtualMachineVersion = default(string), string resourceGroup = default(string)) - : base(backupManagementType, workloadType, friendlyName, protectionState) + + : base(backupManagementType, workloadType, friendlyName, protectionState) { - VirtualMachineId = virtualMachineId; - VirtualMachineVersion = virtualMachineVersion; - ResourceGroup = resourceGroup; + this.VirtualMachineId = virtualMachineId; + this.VirtualMachineVersion = virtualMachineVersion; + this.ResourceGroup = resourceGroup; CustomInit(); } @@ -59,24 +62,24 @@ public IaaSVMProtectableItem() /// partial void CustomInit(); + /// /// Gets or sets fully qualified ARM ID of the virtual machine. /// - [JsonProperty(PropertyName = "virtualMachineId")] - public string VirtualMachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineId")] + public string VirtualMachineId {get; set; } /// - /// Gets or sets specifies whether the container represents a Classic - /// or an Azure Resource Manager VM. + /// Gets or sets specifies whether the container represents a Classic or an + /// Azure Resource Manager VM. /// - [JsonProperty(PropertyName = "virtualMachineVersion")] - public string VirtualMachineVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineVersion")] + public string VirtualMachineVersion {get; set; } /// /// Gets or sets resource group name of Recovery Services Vault. /// - [JsonProperty(PropertyName = "resourceGroup")] - public string ResourceGroup { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGroup")] + public string ResourceGroup {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMBackupRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMBackupRequest.cs index 5e738dd33da2..961e7b67ca65 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMBackupRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMBackupRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +24,13 @@ public IaasVMBackupRequest() /// /// Initializes a new instance of the IaasVMBackupRequest class. /// - /// Backup copy will expire - /// after the time specified (UTC). - public IaasVMBackupRequest(System.DateTime? recoveryPointExpiryTimeInUTC = default(System.DateTime?)) + + /// Backup copy will expire after the time specified (UTC). + /// + public IaasVMBackupRequest(System.DateTime? recoveryPointExpiryTimeInUtc = default(System.DateTime?)) + { - RecoveryPointExpiryTimeInUTC = recoveryPointExpiryTimeInUTC; + this.RecoveryPointExpiryTimeInUtc = recoveryPointExpiryTimeInUtc; CustomInit(); } @@ -43,12 +39,11 @@ public IaasVMBackupRequest() /// partial void CustomInit(); + /// - /// Gets or sets backup copy will expire after the time specified - /// (UTC). + /// Gets or sets backup copy will expire after the time specified (UTC). /// - [JsonProperty(PropertyName = "recoveryPointExpiryTimeInUTC")] - public System.DateTime? RecoveryPointExpiryTimeInUTC { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointExpiryTimeInUTC")] + public System.DateTime? RecoveryPointExpiryTimeInUtc {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMILRRegistrationRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMILRRegistrationRequest.cs index 835c84e5c9b0..e46d0bf5c810 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMILRRegistrationRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMILRRegistrationRequest.cs @@ -1,51 +1,50 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// /// Restore files/folders from a backup copy of IaaS VM. /// [Newtonsoft.Json.JsonObject("IaasVMILRRegistrationRequest")] - public partial class IaasVMILRRegistrationRequest : ILRRequest + public partial class IaasVmilrRegistrationRequest : ILRRequest { /// - /// Initializes a new instance of the IaasVMILRRegistrationRequest - /// class. + /// Initializes a new instance of the IaasVmilrRegistrationRequest class. /// - public IaasVMILRRegistrationRequest() + public IaasVmilrRegistrationRequest() { CustomInit(); } /// - /// Initializes a new instance of the IaasVMILRRegistrationRequest - /// class. + /// Initializes a new instance of the IaasVmilrRegistrationRequest class. /// - /// ID of the IaaS VM backup copy from - /// where the files/folders have to be restored. - /// Fully qualified ARM ID of the - /// virtual machine whose the files / folders have to be - /// restored. - /// iSCSI initiator name. - /// Whether to renew existing - /// registration with the iSCSI server. - public IaasVMILRRegistrationRequest(string recoveryPointId = default(string), string virtualMachineId = default(string), string initiatorName = default(string), bool? renewExistingRegistration = default(bool?)) + + /// ID of the IaaS VM backup copy from where the files/folders have to be + /// restored. + /// + + /// Fully qualified ARM ID of the virtual machine whose the files / folders + /// have to be restored. + /// + + /// iSCSI initiator name. + /// + + /// Whether to renew existing registration with the iSCSI server. + /// + public IaasVmilrRegistrationRequest(string recoveryPointId = default(string), string virtualMachineId = default(string), string initiatorName = default(string), bool? renewExistingRegistration = default(bool?)) + { - RecoveryPointId = recoveryPointId; - VirtualMachineId = virtualMachineId; - InitiatorName = initiatorName; - RenewExistingRegistration = renewExistingRegistration; + this.RecoveryPointId = recoveryPointId; + this.VirtualMachineId = virtualMachineId; + this.InitiatorName = initiatorName; + this.RenewExistingRegistration = renewExistingRegistration; CustomInit(); } @@ -54,32 +53,31 @@ public IaasVMILRRegistrationRequest() /// partial void CustomInit(); + /// - /// Gets or sets ID of the IaaS VM backup copy from where the - /// files/folders have to be restored. + /// Gets or sets iD of the IaaS VM backup copy from where the files/folders + /// have to be restored. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// - /// Gets or sets fully qualified ARM ID of the virtual machine whose - /// the files / folders have to be restored. + /// Gets or sets fully qualified ARM ID of the virtual machine whose the files + /// / folders have to be restored. /// - [JsonProperty(PropertyName = "virtualMachineId")] - public string VirtualMachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineId")] + public string VirtualMachineId {get; set; } /// /// Gets or sets iSCSI initiator name. /// - [JsonProperty(PropertyName = "initiatorName")] - public string InitiatorName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initiatorName")] + public string InitiatorName {get; set; } /// - /// Gets or sets whether to renew existing registration with the iSCSI - /// server. + /// Gets or sets whether to renew existing registration with the iSCSI server. /// - [JsonProperty(PropertyName = "renewExistingRegistration")] - public bool? RenewExistingRegistration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "renewExistingRegistration")] + public bool? RenewExistingRegistration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRecoveryPoint.cs index 1949d0ed1644..7f2c19428ee1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRecoveryPoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,54 +24,75 @@ public IaasVMRecoveryPoint() /// /// Initializes a new instance of the IaasVMRecoveryPoint class. /// - /// Type of the backup copy. - /// Time at which this backup copy was - /// created. - /// Additional information - /// associated with this backup copy. - /// Storage type of the VM whose - /// backup copy is created. - /// Identifies whether the VM was - /// encrypted when the backup copy is created. - /// Required details for recovering an - /// encrypted VM. Applicable only when IsSourceVMEncrypted is - /// true. - /// Is the session to recover - /// items from this backup copy still active. - /// Recovery point tier - /// information. - /// Whether VM is with Managed - /// Disks - /// Virtual Machine Size - /// Original Storage Account - /// Option - /// OS type - /// Disk - /// configuration - /// Identifies the zone of the VM at the time of - /// backup. Applicable only for zone-pinned Vms - /// Eligibility of RP to - /// be moved to another tier - /// Properties of Recovery - /// Point - public IaasVMRecoveryPoint(string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string recoveryPointAdditionalInfo = default(string), string sourceVMStorageType = default(string), bool? isSourceVMEncrypted = default(bool?), KeyAndSecretDetails keyAndSecret = default(KeyAndSecretDetails), bool? isInstantIlrSessionActive = default(bool?), IList recoveryPointTierDetails = default(IList), bool? isManagedVirtualMachine = default(bool?), string virtualMachineSize = default(string), bool? originalStorageAccountOption = default(bool?), string osType = default(string), RecoveryPointDiskConfiguration recoveryPointDiskConfiguration = default(RecoveryPointDiskConfiguration), IList zones = default(IList), IDictionary recoveryPointMoveReadinessInfo = default(IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties)) + + /// Type of the backup copy. + /// + + /// Time at which this backup copy was created. + /// + + /// Additional information associated with this backup copy. + /// + + /// Storage type of the VM whose backup copy is created. + /// + + /// Identifies whether the VM was encrypted when the backup copy is created. + /// + + /// Required details for recovering an encrypted VM. Applicable only when + /// IsSourceVMEncrypted is true. + /// + + /// Is the session to recover items from this backup copy still active. + /// + + /// Recovery point tier information. + /// + + /// Whether VM is with Managed Disks + /// + + /// Virtual Machine Size + /// + + /// Original Storage Account Option + /// + + /// OS type + /// + + /// Disk configuration + /// + + /// Identifies the zone of the VM at the time of backup. Applicable only for + /// zone-pinned Vms + /// + + /// Eligibility of RP to be moved to another tier + /// + + /// Properties of Recovery Point + /// + public IaasVMRecoveryPoint(string recoveryPointType = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?), string recoveryPointAdditionalInfo = default(string), string sourceVMStorageType = default(string), bool? isSourceVMEncrypted = default(bool?), KeyAndSecretDetails keyAndSecret = default(KeyAndSecretDetails), bool? isInstantIlrSessionActive = default(bool?), System.Collections.Generic.IList recoveryPointTierDetails = default(System.Collections.Generic.IList), bool? isManagedVirtualMachine = default(bool?), string virtualMachineSize = default(string), bool? originalStorageAccountOption = default(bool?), string osType = default(string), RecoveryPointDiskConfiguration recoveryPointDiskConfiguration = default(RecoveryPointDiskConfiguration), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary recoveryPointMoveReadinessInfo = default(System.Collections.Generic.IDictionary), RecoveryPointProperties recoveryPointProperties = default(RecoveryPointProperties)) + { - RecoveryPointType = recoveryPointType; - RecoveryPointTime = recoveryPointTime; - RecoveryPointAdditionalInfo = recoveryPointAdditionalInfo; - SourceVMStorageType = sourceVMStorageType; - IsSourceVMEncrypted = isSourceVMEncrypted; - KeyAndSecret = keyAndSecret; - IsInstantIlrSessionActive = isInstantIlrSessionActive; - RecoveryPointTierDetails = recoveryPointTierDetails; - IsManagedVirtualMachine = isManagedVirtualMachine; - VirtualMachineSize = virtualMachineSize; - OriginalStorageAccountOption = originalStorageAccountOption; - OsType = osType; - RecoveryPointDiskConfiguration = recoveryPointDiskConfiguration; - Zones = zones; - RecoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; - RecoveryPointProperties = recoveryPointProperties; + this.RecoveryPointType = recoveryPointType; + this.RecoveryPointTime = recoveryPointTime; + this.RecoveryPointAdditionalInfo = recoveryPointAdditionalInfo; + this.SourceVMStorageType = sourceVMStorageType; + this.IsSourceVMEncrypted = isSourceVMEncrypted; + this.KeyAndSecret = keyAndSecret; + this.IsInstantIlrSessionActive = isInstantIlrSessionActive; + this.RecoveryPointTierDetails = recoveryPointTierDetails; + this.IsManagedVirtualMachine = isManagedVirtualMachine; + this.VirtualMachineSize = virtualMachineSize; + this.OriginalStorageAccountOption = originalStorageAccountOption; + this.OSType = osType; + this.RecoveryPointDiskConfiguration = recoveryPointDiskConfiguration; + this.Zones = zones; + this.RecoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; + this.RecoveryPointProperties = recoveryPointProperties; CustomInit(); } @@ -88,106 +101,105 @@ public IaasVMRecoveryPoint() /// partial void CustomInit(); + /// /// Gets or sets type of the backup copy. /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// /// Gets or sets time at which this backup copy was created. /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public System.DateTime? RecoveryPointTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime {get; set; } /// - /// Gets or sets additional information associated with this backup - /// copy. + /// Gets or sets additional information associated with this backup copy. /// - [JsonProperty(PropertyName = "recoveryPointAdditionalInfo")] - public string RecoveryPointAdditionalInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointAdditionalInfo")] + public string RecoveryPointAdditionalInfo {get; set; } /// /// Gets or sets storage type of the VM whose backup copy is created. /// - [JsonProperty(PropertyName = "sourceVMStorageType")] - public string SourceVMStorageType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceVMStorageType")] + public string SourceVMStorageType {get; set; } /// - /// Gets or sets identifies whether the VM was encrypted when the - /// backup copy is created. + /// Gets or sets identifies whether the VM was encrypted when the backup copy + /// is created. /// - [JsonProperty(PropertyName = "isSourceVMEncrypted")] - public bool? IsSourceVMEncrypted { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isSourceVMEncrypted")] + public bool? IsSourceVMEncrypted {get; set; } /// - /// Gets or sets required details for recovering an encrypted VM. - /// Applicable only when IsSourceVMEncrypted is true. + /// Gets or sets required details for recovering an encrypted VM. Applicable + /// only when IsSourceVMEncrypted is true. /// - [JsonProperty(PropertyName = "keyAndSecret")] - public KeyAndSecretDetails KeyAndSecret { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyAndSecret")] + public KeyAndSecretDetails KeyAndSecret {get; set; } /// - /// Gets or sets is the session to recover items from this backup copy - /// still active. + /// Gets or sets is the session to recover items from this backup copy still + /// active. /// - [JsonProperty(PropertyName = "isInstantIlrSessionActive")] - public bool? IsInstantIlrSessionActive { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isInstantIlrSessionActive")] + public bool? IsInstantIlrSessionActive {get; set; } /// /// Gets or sets recovery point tier information. /// - [JsonProperty(PropertyName = "recoveryPointTierDetails")] - public IList RecoveryPointTierDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTierDetails")] + public System.Collections.Generic.IList RecoveryPointTierDetails {get; set; } /// /// Gets or sets whether VM is with Managed Disks /// - [JsonProperty(PropertyName = "isManagedVirtualMachine")] - public bool? IsManagedVirtualMachine { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isManagedVirtualMachine")] + public bool? IsManagedVirtualMachine {get; set; } /// /// Gets or sets virtual Machine Size /// - [JsonProperty(PropertyName = "virtualMachineSize")] - public string VirtualMachineSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineSize")] + public string VirtualMachineSize {get; set; } /// /// Gets or sets original Storage Account Option /// - [JsonProperty(PropertyName = "originalStorageAccountOption")] - public bool? OriginalStorageAccountOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "originalStorageAccountOption")] + public bool? OriginalStorageAccountOption {get; set; } /// - /// Gets or sets OS type + /// Gets or sets oS type /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets disk configuration /// - [JsonProperty(PropertyName = "recoveryPointDiskConfiguration")] - public RecoveryPointDiskConfiguration RecoveryPointDiskConfiguration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointDiskConfiguration")] + public RecoveryPointDiskConfiguration RecoveryPointDiskConfiguration {get; set; } /// /// Gets or sets identifies the zone of the VM at the time of backup. /// Applicable only for zone-pinned Vms /// - [JsonProperty(PropertyName = "zones")] - public IList Zones { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "zones")] + public System.Collections.Generic.IList Zones {get; set; } /// /// Gets or sets eligibility of RP to be moved to another tier /// - [JsonProperty(PropertyName = "recoveryPointMoveReadinessInfo")] - public IDictionary RecoveryPointMoveReadinessInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointMoveReadinessInfo")] + public System.Collections.Generic.IDictionary RecoveryPointMoveReadinessInfo {get; set; } /// /// Gets or sets properties of Recovery Point /// - [JsonProperty(PropertyName = "recoveryPointProperties")] - public RecoveryPointProperties RecoveryPointProperties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointProperties")] + public RecoveryPointProperties RecoveryPointProperties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRestoreRequest.cs index 627b8c98dab7..f37bc579ec5d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRestoreRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,83 +24,109 @@ public IaasVMRestoreRequest() /// /// Initializes a new instance of the IaasVMRestoreRequest class. /// - /// ID of the backup copy to be - /// recovered. - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM - /// which is being recovered. - /// This is the complete ARM Id of - /// the VM that will be created. + + /// ID of the backup copy to be recovered. + /// + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM which is being recovered. + /// + + /// This is the complete ARM Id of the VM that will be created. /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// This is the ARM Id of the - /// resource group that you want to create for this Virtual machine and - /// other artifacts. - /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} - /// Fully qualified ARM ID of the - /// storage account to which the VM has to be restored. - /// This is the virtual network Id of - /// the vnet that will be attached to the virtual machine. - /// User will be validated for join action permissions in the linked - /// access. - /// Subnet ID, is the subnet ID associated with - /// the to be restored VM. For Classic VMs it would be - /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager - /// VMs it would be ARM resource ID used to represent - /// the subnet. - /// Fully qualified ARM ID of the - /// domain name to be associated to the VM being restored. This applies - /// only to Classic - /// Virtual Machines. - /// Region in which the virtual machine is - /// restored. - /// Affinity group associated to VM to be - /// restored. Used only for Classic Compute Virtual Machines. - /// Should a new cloud service be - /// created while restoring the VM. If this is false, VM will be - /// restored to the same - /// cloud service as it was at the time of backup. - /// Original Storage Account - /// Option - /// Details needed if the VM was - /// encrypted at the time of backup. - /// List of Disk LUNs for partial - /// restore - /// Flag to denote of an - /// Unmanaged disk VM should be restored with Managed disks. - /// DiskEncryptionSet's ID - needed - /// if the VM needs to be encrypted at rest during restore with - /// customer managed key. - /// Target zone where the VM and its disks should - /// be restored. - /// Managed Identity information required to - /// access customer storage account. - /// IaaS VM workload specific - /// restore details for restores using managed identity. - public IaasVMRestoreRequest(string recoveryPointId = default(string), string recoveryType = default(string), string sourceResourceId = default(string), string targetVirtualMachineId = default(string), string targetResourceGroupId = default(string), string storageAccountId = default(string), string virtualNetworkId = default(string), string subnetId = default(string), string targetDomainNameId = default(string), string region = default(string), string affinityGroup = default(string), bool? createNewCloudService = default(bool?), bool? originalStorageAccountOption = default(bool?), EncryptionDetails encryptionDetails = default(EncryptionDetails), IList restoreDiskLunList = default(IList), bool? restoreWithManagedDisks = default(bool?), string diskEncryptionSetId = default(string), IList zones = default(IList), IdentityInfo identityInfo = default(IdentityInfo), IdentityBasedRestoreDetails identityBasedRestoreDetails = default(IdentityBasedRestoreDetails)) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// This is the ARM Id of the resource group that you want to create for this + /// Virtual machine and other artifacts. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} + /// + + /// Fully qualified ARM ID of the storage account to which the VM has to be + /// restored. + /// + + /// This is the virtual network Id of the vnet that will be attached to the + /// virtual machine. + /// User will be validated for join action permissions in the linked access. + /// + + /// Subnet ID, is the subnet ID associated with the to be restored VM. For + /// Classic VMs it would be + /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it + /// would be ARM resource ID used to represent + /// the subnet. + /// + + /// Fully qualified ARM ID of the domain name to be associated to the VM being + /// restored. This applies only to Classic + /// Virtual Machines. + /// + + /// Region in which the virtual machine is restored. + /// + + /// Affinity group associated to VM to be restored. Used only for Classic + /// Compute Virtual Machines. + /// + + /// Should a new cloud service be created while restoring the VM. If this is + /// false, VM will be restored to the same + /// cloud service as it was at the time of backup. + /// + + /// Original Storage Account Option + /// + + /// Details needed if the VM was encrypted at the time of backup. + /// + + /// List of Disk LUNs for partial restore + /// + + /// Flag to denote of an Unmanaged disk VM should be restored with Managed + /// disks. + /// + + /// DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest + /// during restore with customer managed key. + /// + + /// Target zone where the VM and its disks should be restored. + /// + + /// Managed Identity information required to access customer storage account. + /// + + /// IaaS VM workload specific restore details for restores using managed + /// identity. + /// + public IaasVMRestoreRequest(string recoveryPointId = default(string), string recoveryType = default(string), string sourceResourceId = default(string), string targetVirtualMachineId = default(string), string targetResourceGroupId = default(string), string storageAccountId = default(string), string virtualNetworkId = default(string), string subnetId = default(string), string targetDomainNameId = default(string), string region = default(string), string affinityGroup = default(string), bool? createNewCloudService = default(bool?), bool? originalStorageAccountOption = default(bool?), EncryptionDetails encryptionDetails = default(EncryptionDetails), System.Collections.Generic.IList restoreDiskLunList = default(System.Collections.Generic.IList), bool? restoreWithManagedDisks = default(bool?), string diskEncryptionSetId = default(string), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), IdentityInfo identityInfo = default(IdentityInfo), IdentityBasedRestoreDetails identityBasedRestoreDetails = default(IdentityBasedRestoreDetails)) + { - RecoveryPointId = recoveryPointId; - RecoveryType = recoveryType; - SourceResourceId = sourceResourceId; - TargetVirtualMachineId = targetVirtualMachineId; - TargetResourceGroupId = targetResourceGroupId; - StorageAccountId = storageAccountId; - VirtualNetworkId = virtualNetworkId; - SubnetId = subnetId; - TargetDomainNameId = targetDomainNameId; - Region = region; - AffinityGroup = affinityGroup; - CreateNewCloudService = createNewCloudService; - OriginalStorageAccountOption = originalStorageAccountOption; - EncryptionDetails = encryptionDetails; - RestoreDiskLunList = restoreDiskLunList; - RestoreWithManagedDisks = restoreWithManagedDisks; - DiskEncryptionSetId = diskEncryptionSetId; - Zones = zones; - IdentityInfo = identityInfo; - IdentityBasedRestoreDetails = identityBasedRestoreDetails; + this.RecoveryPointId = recoveryPointId; + this.RecoveryType = recoveryType; + this.SourceResourceId = sourceResourceId; + this.TargetVirtualMachineId = targetVirtualMachineId; + this.TargetResourceGroupId = targetResourceGroupId; + this.StorageAccountId = storageAccountId; + this.VirtualNetworkId = virtualNetworkId; + this.SubnetId = subnetId; + this.TargetDomainNameId = targetDomainNameId; + this.Region = region; + this.AffinityGroup = affinityGroup; + this.CreateNewCloudService = createNewCloudService; + this.OriginalStorageAccountOption = originalStorageAccountOption; + this.EncryptionDetails = encryptionDetails; + this.RestoreDiskLunList = restoreDiskLunList; + this.RestoreWithManagedDisks = restoreWithManagedDisks; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.Zones = zones; + this.IdentityInfo = identityInfo; + this.IdentityBasedRestoreDetails = identityBasedRestoreDetails; CustomInit(); } @@ -117,152 +135,145 @@ public IaasVMRestoreRequest() /// partial void CustomInit(); + /// - /// Gets or sets ID of the backup copy to be recovered. + /// Gets or sets iD of the backup copy to be recovered. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// - /// Gets or sets type of this recovery. Possible values include: - /// 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', - /// 'Offline' + /// Gets or sets type of this recovery. Possible values include: 'Invalid', 'OriginalLocation', 'AlternateLocation', 'RestoreDisks', 'Offline' /// - [JsonProperty(PropertyName = "recoveryType")] - public string RecoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryType")] + public string RecoveryType {get; set; } /// - /// Gets or sets fully qualified ARM ID of the VM which is being - /// recovered. + /// Gets or sets fully qualified ARM ID of the VM which is being recovered. /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// - /// Gets or sets this is the complete ARM Id of the VM that will be - /// created. + /// Gets or sets this is the complete ARM Id of the VM that will be created. /// For e.g. /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} /// - [JsonProperty(PropertyName = "targetVirtualMachineId")] - public string TargetVirtualMachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVirtualMachineId")] + public string TargetVirtualMachineId {get; set; } /// - /// Gets or sets this is the ARM Id of the resource group that you want - /// to create for this Virtual machine and other artifacts. + /// Gets or sets this is the ARM Id of the resource group that you want to + /// create for this Virtual machine and other artifacts. /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} /// - [JsonProperty(PropertyName = "targetResourceGroupId")] - public string TargetResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroupId")] + public string TargetResourceGroupId {get; set; } /// - /// Gets or sets fully qualified ARM ID of the storage account to which - /// the VM has to be restored. + /// Gets or sets fully qualified ARM ID of the storage account to which the VM + /// has to be restored. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; set; } /// - /// Gets or sets this is the virtual network Id of the vnet that will - /// be attached to the virtual machine. - /// User will be validated for join action permissions in the linked - /// access. + /// Gets or sets this is the virtual network Id of the vnet that will be + /// attached to the virtual machine. + /// User will be validated for join action permissions in the linked access. /// - [JsonProperty(PropertyName = "virtualNetworkId")] - public string VirtualNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualNetworkId")] + public string VirtualNetworkId {get; set; } /// - /// Gets or sets subnet ID, is the subnet ID associated with the to be - /// restored VM. For Classic VMs it would be - /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager - /// VMs it would be ARM resource ID used to represent + /// Gets or sets subnet ID, is the subnet ID associated with the to be restored + /// VM. For Classic VMs it would be + /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it + /// would be ARM resource ID used to represent /// the subnet. /// - [JsonProperty(PropertyName = "subnetId")] - public string SubnetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subnetId")] + public string SubnetId {get; set; } /// - /// Gets or sets fully qualified ARM ID of the domain name to be - /// associated to the VM being restored. This applies only to Classic + /// Gets or sets fully qualified ARM ID of the domain name to be associated to + /// the VM being restored. This applies only to Classic /// Virtual Machines. /// - [JsonProperty(PropertyName = "targetDomainNameId")] - public string TargetDomainNameId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDomainNameId")] + public string TargetDomainNameId {get; set; } /// /// Gets or sets region in which the virtual machine is restored. /// - [JsonProperty(PropertyName = "region")] - public string Region { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "region")] + public string Region {get; set; } /// - /// Gets or sets affinity group associated to VM to be restored. Used - /// only for Classic Compute Virtual Machines. + /// Gets or sets affinity group associated to VM to be restored. Used only for + /// Classic Compute Virtual Machines. /// - [JsonProperty(PropertyName = "affinityGroup")] - public string AffinityGroup { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "affinityGroup")] + public string AffinityGroup {get; set; } /// - /// Gets or sets should a new cloud service be created while restoring - /// the VM. If this is false, VM will be restored to the same + /// Gets or sets should a new cloud service be created while restoring the VM. + /// If this is false, VM will be restored to the same /// cloud service as it was at the time of backup. /// - [JsonProperty(PropertyName = "createNewCloudService")] - public bool? CreateNewCloudService { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createNewCloudService")] + public bool? CreateNewCloudService {get; set; } /// /// Gets or sets original Storage Account Option /// - [JsonProperty(PropertyName = "originalStorageAccountOption")] - public bool? OriginalStorageAccountOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "originalStorageAccountOption")] + public bool? OriginalStorageAccountOption {get; set; } /// - /// Gets or sets details needed if the VM was encrypted at the time of - /// backup. + /// Gets or sets details needed if the VM was encrypted at the time of backup. /// - [JsonProperty(PropertyName = "encryptionDetails")] - public EncryptionDetails EncryptionDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionDetails")] + public EncryptionDetails EncryptionDetails {get; set; } /// /// Gets or sets list of Disk LUNs for partial restore /// - [JsonProperty(PropertyName = "restoreDiskLunList")] - public IList RestoreDiskLunList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreDiskLunList")] + public System.Collections.Generic.IList RestoreDiskLunList {get; set; } /// - /// Gets or sets flag to denote of an Unmanaged disk VM should be - /// restored with Managed disks. + /// Gets or sets flag to denote of an Unmanaged disk VM should be restored with + /// Managed disks. /// - [JsonProperty(PropertyName = "restoreWithManagedDisks")] - public bool? RestoreWithManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreWithManagedDisks")] + public bool? RestoreWithManagedDisks {get; set; } /// - /// Gets or sets diskEncryptionSet's ID - needed if the VM needs to be + /// Gets or sets diskEncryptionSet's ID - needed if the VM needs to be /// encrypted at rest during restore with customer managed key. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } /// - /// Gets or sets target zone where the VM and its disks should be - /// restored. + /// Gets or sets target zone where the VM and its disks should be restored. /// - [JsonProperty(PropertyName = "zones")] - public IList Zones { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "zones")] + public System.Collections.Generic.IList Zones {get; set; } /// - /// Gets or sets managed Identity information required to access - /// customer storage account. + /// Gets or sets managed Identity information required to access customer + /// storage account. /// - [JsonProperty(PropertyName = "identityInfo")] - public IdentityInfo IdentityInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "identityInfo")] + public IdentityInfo IdentityInfo {get; set; } /// - /// Gets or sets iaaS VM workload specific restore details for restores - /// using managed identity. + /// Gets or sets iaaS VM workload specific restore details for restores using + /// managed identity. /// - [JsonProperty(PropertyName = "identityBasedRestoreDetails")] - public IdentityBasedRestoreDetails IdentityBasedRestoreDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "identityBasedRestoreDetails")] + public IdentityBasedRestoreDetails IdentityBasedRestoreDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRestoreWithRehydrationRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRestoreWithRehydrationRequest.cs index 8c3da757acee..16bd473fd8df 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRestoreWithRehydrationRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IaasVMRestoreWithRehydrationRequest.cs @@ -1,30 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// IaaS VM workload-specific restore with integrated rehydration of - /// recovery point. + /// IaaS VM workload-specific restore with integrated rehydration of recovery + /// point. /// [Newtonsoft.Json.JsonObject("IaasVMRestoreWithRehydrationRequest")] public partial class IaasVMRestoreWithRehydrationRequest : IaasVMRestoreRequest { /// - /// Initializes a new instance of the - /// IaasVMRestoreWithRehydrationRequest class. + /// Initializes a new instance of the IaasVMRestoreWithRehydrationRequest class. /// public IaasVMRestoreWithRehydrationRequest() { @@ -32,70 +23,96 @@ public IaasVMRestoreWithRehydrationRequest() } /// - /// Initializes a new instance of the - /// IaasVMRestoreWithRehydrationRequest class. + /// Initializes a new instance of the IaasVMRestoreWithRehydrationRequest class. /// - /// ID of the backup copy to be - /// recovered. - /// Type of this recovery. Possible values - /// include: 'Invalid', 'OriginalLocation', 'AlternateLocation', - /// 'RestoreDisks', 'Offline' - /// Fully qualified ARM ID of the VM - /// which is being recovered. - /// This is the complete ARM Id of - /// the VM that will be created. + + /// ID of the backup copy to be recovered. + /// + + /// Type of this recovery. + /// Possible values include: 'Invalid', 'OriginalLocation', + /// 'AlternateLocation', 'RestoreDisks', 'Offline' + + /// Fully qualified ARM ID of the VM which is being recovered. + /// + + /// This is the complete ARM Id of the VM that will be created. /// For e.g. - /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - /// This is the ARM Id of the - /// resource group that you want to create for this Virtual machine and - /// other artifacts. - /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} - /// Fully qualified ARM ID of the - /// storage account to which the VM has to be restored. - /// This is the virtual network Id of - /// the vnet that will be attached to the virtual machine. - /// User will be validated for join action permissions in the linked - /// access. - /// Subnet ID, is the subnet ID associated with - /// the to be restored VM. For Classic VMs it would be - /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager - /// VMs it would be ARM resource ID used to represent - /// the subnet. - /// Fully qualified ARM ID of the - /// domain name to be associated to the VM being restored. This applies - /// only to Classic - /// Virtual Machines. - /// Region in which the virtual machine is - /// restored. - /// Affinity group associated to VM to be - /// restored. Used only for Classic Compute Virtual Machines. - /// Should a new cloud service be - /// created while restoring the VM. If this is false, VM will be - /// restored to the same - /// cloud service as it was at the time of backup. - /// Original Storage Account - /// Option - /// Details needed if the VM was - /// encrypted at the time of backup. - /// List of Disk LUNs for partial - /// restore - /// Flag to denote of an - /// Unmanaged disk VM should be restored with Managed disks. - /// DiskEncryptionSet's ID - needed - /// if the VM needs to be encrypted at rest during restore with - /// customer managed key. - /// Target zone where the VM and its disks should - /// be restored. - /// Managed Identity information required to - /// access customer storage account. - /// IaaS VM workload specific - /// restore details for restores using managed identity. - /// RP Rehydration - /// Info - public IaasVMRestoreWithRehydrationRequest(string recoveryPointId = default(string), string recoveryType = default(string), string sourceResourceId = default(string), string targetVirtualMachineId = default(string), string targetResourceGroupId = default(string), string storageAccountId = default(string), string virtualNetworkId = default(string), string subnetId = default(string), string targetDomainNameId = default(string), string region = default(string), string affinityGroup = default(string), bool? createNewCloudService = default(bool?), bool? originalStorageAccountOption = default(bool?), EncryptionDetails encryptionDetails = default(EncryptionDetails), IList restoreDiskLunList = default(IList), bool? restoreWithManagedDisks = default(bool?), string diskEncryptionSetId = default(string), IList zones = default(IList), IdentityInfo identityInfo = default(IdentityInfo), IdentityBasedRestoreDetails identityBasedRestoreDetails = default(IdentityBasedRestoreDetails), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) - : base(recoveryPointId, recoveryType, sourceResourceId, targetVirtualMachineId, targetResourceGroupId, storageAccountId, virtualNetworkId, subnetId, targetDomainNameId, region, affinityGroup, createNewCloudService, originalStorageAccountOption, encryptionDetails, restoreDiskLunList, restoreWithManagedDisks, diskEncryptionSetId, zones, identityInfo, identityBasedRestoreDetails) + /// /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + + /// This is the ARM Id of the resource group that you want to create for this + /// Virtual machine and other artifacts. + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg} + /// + + /// Fully qualified ARM ID of the storage account to which the VM has to be + /// restored. + /// + + /// This is the virtual network Id of the vnet that will be attached to the + /// virtual machine. + /// User will be validated for join action permissions in the linked access. + /// + + /// Subnet ID, is the subnet ID associated with the to be restored VM. For + /// Classic VMs it would be + /// {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it + /// would be ARM resource ID used to represent + /// the subnet. + /// + + /// Fully qualified ARM ID of the domain name to be associated to the VM being + /// restored. This applies only to Classic + /// Virtual Machines. + /// + + /// Region in which the virtual machine is restored. + /// + + /// Affinity group associated to VM to be restored. Used only for Classic + /// Compute Virtual Machines. + /// + + /// Should a new cloud service be created while restoring the VM. If this is + /// false, VM will be restored to the same + /// cloud service as it was at the time of backup. + /// + + /// Original Storage Account Option + /// + + /// Details needed if the VM was encrypted at the time of backup. + /// + + /// List of Disk LUNs for partial restore + /// + + /// Flag to denote of an Unmanaged disk VM should be restored with Managed + /// disks. + /// + + /// DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest + /// during restore with customer managed key. + /// + + /// Target zone where the VM and its disks should be restored. + /// + + /// Managed Identity information required to access customer storage account. + /// + + /// IaaS VM workload specific restore details for restores using managed + /// identity. + /// + + /// RP Rehydration Info + /// + public IaasVMRestoreWithRehydrationRequest(string recoveryPointId = default(string), string recoveryType = default(string), string sourceResourceId = default(string), string targetVirtualMachineId = default(string), string targetResourceGroupId = default(string), string storageAccountId = default(string), string virtualNetworkId = default(string), string subnetId = default(string), string targetDomainNameId = default(string), string region = default(string), string affinityGroup = default(string), bool? createNewCloudService = default(bool?), bool? originalStorageAccountOption = default(bool?), EncryptionDetails encryptionDetails = default(EncryptionDetails), System.Collections.Generic.IList restoreDiskLunList = default(System.Collections.Generic.IList), bool? restoreWithManagedDisks = default(bool?), string diskEncryptionSetId = default(string), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), IdentityInfo identityInfo = default(IdentityInfo), IdentityBasedRestoreDetails identityBasedRestoreDetails = default(IdentityBasedRestoreDetails), RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default(RecoveryPointRehydrationInfo)) + + : base(recoveryPointId, recoveryType, sourceResourceId, targetVirtualMachineId, targetResourceGroupId, storageAccountId, virtualNetworkId, subnetId, targetDomainNameId, region, affinityGroup, createNewCloudService, originalStorageAccountOption, encryptionDetails, restoreDiskLunList, restoreWithManagedDisks, diskEncryptionSetId, zones, identityInfo, identityBasedRestoreDetails) { - RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + this.RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; CustomInit(); } @@ -104,11 +121,11 @@ public IaasVMRestoreWithRehydrationRequest() /// partial void CustomInit(); + /// - /// Gets or sets RP Rehydration Info + /// Gets or sets rP Rehydration Info /// - [JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] - public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointRehydrationInfo")] + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IdentityBasedRestoreDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IdentityBasedRestoreDetails.cs index c3bd66edb52a..fb43871ef207 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IdentityBasedRestoreDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IdentityBasedRestoreDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class IdentityBasedRestoreDetails { /// - /// Initializes a new instance of the IdentityBasedRestoreDetails - /// class. + /// Initializes a new instance of the IdentityBasedRestoreDetails class. /// public IdentityBasedRestoreDetails() { @@ -29,16 +22,19 @@ public IdentityBasedRestoreDetails() } /// - /// Initializes a new instance of the IdentityBasedRestoreDetails - /// class. + /// Initializes a new instance of the IdentityBasedRestoreDetails class. /// - /// Gets the class type. - /// Fully qualified ARM ID of the - /// target storage account. + + /// Gets the class type. + /// + + /// Fully qualified ARM ID of the target storage account. + /// public IdentityBasedRestoreDetails(string objectType = default(string), string targetStorageAccountId = default(string)) + { - ObjectType = objectType; - TargetStorageAccountId = targetStorageAccountId; + this.ObjectType = objectType; + this.TargetStorageAccountId = targetStorageAccountId; CustomInit(); } @@ -47,17 +43,17 @@ public IdentityBasedRestoreDetails() /// partial void CustomInit(); + /// - /// Gets the class type. + /// Gets or sets gets the class type. /// - [JsonProperty(PropertyName = "objectType")] - public string ObjectType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "objectType")] + public string ObjectType {get; set; } /// /// Gets or sets fully qualified ARM ID of the target storage account. /// - [JsonProperty(PropertyName = "targetStorageAccountId")] - public string TargetStorageAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetStorageAccountId")] + public string TargetStorageAccountId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IdentityInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IdentityInfo.cs index 2f1f2cbaee44..ed01e9772696 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IdentityInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IdentityInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,20 @@ public IdentityInfo() /// /// Initializes a new instance of the IdentityInfo class. /// - /// To differentiate if the - /// managed identity is system assigned or user assigned - /// Managed Identity Resource - /// Id - /// Optional: Might not be required in the case of system assigned - /// managed identity + + /// To differentiate if the managed identity is system assigned or user + /// assigned + /// + + /// Managed Identity Resource Id + /// Optional: Might not be required in the case of system assigned managed + /// identity + /// public IdentityInfo(bool? isSystemAssignedIdentity = default(bool?), string managedIdentityResourceId = default(string)) + { - IsSystemAssignedIdentity = isSystemAssignedIdentity; - ManagedIdentityResourceId = managedIdentityResourceId; + this.IsSystemAssignedIdentity = isSystemAssignedIdentity; + this.ManagedIdentityResourceId = managedIdentityResourceId; CustomInit(); } @@ -47,20 +45,20 @@ public IdentityInfo() /// partial void CustomInit(); + /// - /// Gets or sets to differentiate if the managed identity is system - /// assigned or user assigned + /// Gets or sets to differentiate if the managed identity is system assigned or + /// user assigned /// - [JsonProperty(PropertyName = "isSystemAssignedIdentity")] - public bool? IsSystemAssignedIdentity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isSystemAssignedIdentity")] + public bool? IsSystemAssignedIdentity {get; set; } /// /// Gets or sets managed Identity Resource Id - /// Optional: Might not be required in the case of system assigned - /// managed identity + /// Optional: Might not be required in the case of system assigned managed + /// identity /// - [JsonProperty(PropertyName = "managedIdentityResourceId")] - public string ManagedIdentityResourceId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "managedIdentityResourceId")] + public string ManagedIdentityResourceId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InfrastructureEncryptionState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InfrastructureEncryptionState.cs index c065ffe67036..7c04dacc9a60 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InfrastructureEncryptionState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InfrastructureEncryptionState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for InfrastructureEncryptionState. /// + + public static class InfrastructureEncryptionState { public const string Invalid = "Invalid"; public const string Disabled = "Disabled"; public const string Enabled = "Enabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryInfo.cs index e97a60e855aa..588b866012e9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,19 +23,23 @@ public InquiryInfo() /// /// Initializes a new instance of the InquiryInfo class. /// + /// Inquiry Status for this container such as - /// InProgress | Failed | Succeeded - /// Error Details if the Status is - /// non-success. - /// Inquiry Details which will have - /// workload specific details. - /// For e.g. - For SQL and oracle this will contain different - /// details. - public InquiryInfo(string status = default(string), ErrorDetail errorDetail = default(ErrorDetail), IList inquiryDetails = default(IList)) + /// InProgress | Failed | Succeeded + /// + + /// Error Details if the Status is non-success. + /// + + /// Inquiry Details which will have workload specific details. + /// For e.g. - For SQL and oracle this will contain different details. + /// + public InquiryInfo(string status = default(string), ErrorDetail errorDetail = default(ErrorDetail), System.Collections.Generic.IList inquiryDetails = default(System.Collections.Generic.IList)) + { - Status = status; - ErrorDetail = errorDetail; - InquiryDetails = inquiryDetails; + this.Status = status; + this.ErrorDetail = errorDetail; + this.InquiryDetails = inquiryDetails; CustomInit(); } @@ -52,26 +48,25 @@ public InquiryInfo() /// partial void CustomInit(); + /// /// Gets or sets inquiry Status for this container such as /// InProgress | Failed | Succeeded /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets error Details if the Status is non-success. /// - [JsonProperty(PropertyName = "errorDetail")] - public ErrorDetail ErrorDetail { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetail")] + public ErrorDetail ErrorDetail {get; set; } /// - /// Gets or sets inquiry Details which will have workload specific - /// details. + /// Gets or sets inquiry Details which will have workload specific details. /// For e.g. - For SQL and oracle this will contain different details. /// - [JsonProperty(PropertyName = "inquiryDetails")] - public IList InquiryDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "inquiryDetails")] + public System.Collections.Generic.IList InquiryDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryStatus.cs index 92b3e89bf0e2..ac1bab846c99 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for InquiryStatus. /// + + public static class InquiryStatus { public const string Invalid = "Invalid"; public const string Success = "Success"; public const string Failed = "Failed"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryValidation.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryValidation.cs index c91faf5c1cb2..0e1732179c95 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryValidation.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InquiryValidation.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,21 @@ public InquiryValidation() /// /// Initializes a new instance of the InquiryValidation class. /// - /// Status for the Inquiry Validation. - /// Error Detail in case the status is - /// non-success. - /// Error Additional Detail in case the - /// status is non-success. + + /// Status for the Inquiry Validation. + /// + + /// Error Detail in case the status is non-success. + /// + + /// Error Additional Detail in case the status is non-success. + /// public InquiryValidation(string status = default(string), ErrorDetail errorDetail = default(ErrorDetail), string additionalDetail = default(string)) + { - Status = status; - ErrorDetail = errorDetail; - AdditionalDetail = additionalDetail; + this.Status = status; + this.ErrorDetail = errorDetail; + this.AdditionalDetail = additionalDetail; CustomInit(); } @@ -47,23 +46,23 @@ public InquiryValidation() /// partial void CustomInit(); + /// /// Gets or sets status for the Inquiry Validation. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets error Detail in case the status is non-success. /// - [JsonProperty(PropertyName = "errorDetail")] - public ErrorDetail ErrorDetail { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetail")] + public ErrorDetail ErrorDetail {get; set; } /// /// Gets error Additional Detail in case the status is non-success. /// - [JsonProperty(PropertyName = "additionalDetail")] - public string AdditionalDetail { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalDetail")] + public string AdditionalDetail {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InstantItemRecoveryTarget.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InstantItemRecoveryTarget.cs index b2ecc356b94a..a60bc4ddda30 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InstantItemRecoveryTarget.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InstantItemRecoveryTarget.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,10 +23,13 @@ public InstantItemRecoveryTarget() /// /// Initializes a new instance of the InstantItemRecoveryTarget class. /// - /// List of client scripts. - public InstantItemRecoveryTarget(IList clientScripts = default(IList)) + + /// List of client scripts. + /// + public InstantItemRecoveryTarget(System.Collections.Generic.IList clientScripts = default(System.Collections.Generic.IList)) + { - ClientScripts = clientScripts; + this.ClientScripts = clientScripts; CustomInit(); } @@ -43,11 +38,11 @@ public InstantItemRecoveryTarget() /// partial void CustomInit(); + /// /// Gets or sets list of client scripts. /// - [JsonProperty(PropertyName = "clientScripts")] - public IList ClientScripts { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "clientScripts")] + public System.Collections.Generic.IList ClientScripts {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InstantRPAdditionalDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InstantRPAdditionalDetails.cs index 93a402838646..7074db7748a2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InstantRPAdditionalDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/InstantRPAdditionalDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; public partial class InstantRPAdditionalDetails @@ -26,10 +20,17 @@ public InstantRPAdditionalDetails() /// /// Initializes a new instance of the InstantRPAdditionalDetails class. /// - public InstantRPAdditionalDetails(string azureBackupRGNamePrefix = default(string), string azureBackupRGNameSuffix = default(string)) + + /// + /// + + /// + /// + public InstantRPAdditionalDetails(string azureBackupRgNamePrefix = default(string), string azureBackupRgNameSuffix = default(string)) + { - AzureBackupRGNamePrefix = azureBackupRGNamePrefix; - AzureBackupRGNameSuffix = azureBackupRGNameSuffix; + this.AzureBackupRgNamePrefix = azureBackupRgNamePrefix; + this.AzureBackupRgNameSuffix = azureBackupRgNameSuffix; CustomInit(); } @@ -38,15 +39,17 @@ public InstantRPAdditionalDetails() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "azureBackupRGNamePrefix")] - public string AzureBackupRGNamePrefix { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureBackupRGNamePrefix")] + public string AzureBackupRgNamePrefix {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "azureBackupRGNameSuffix")] - public string AzureBackupRGNameSuffix { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "azureBackupRGNameSuffix")] + public string AzureBackupRgNameSuffix {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IntentItemType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IntentItemType.cs index 9335e1f19ef5..e6baeef2389f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IntentItemType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/IntentItemType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for IntentItemType. /// + + public static class IntentItemType { public const string Invalid = "Invalid"; public const string SQLInstance = "SQLInstance"; public const string SQLAvailabilityGroupContainer = "SQLAvailabilityGroupContainer"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Job.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Job.cs index 1a112d486aa0..6b9a2c757183 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Job.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Job.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,26 +24,39 @@ public Job() /// /// Initializes a new instance of the Job class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// public Job(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string)) + { - EntityFriendlyName = entityFriendlyName; - BackupManagementType = backupManagementType; - Operation = operation; - Status = status; - StartTime = startTime; - EndTime = endTime; - ActivityId = activityId; + this.EntityFriendlyName = entityFriendlyName; + this.BackupManagementType = backupManagementType; + this.Operation = operation; + this.Status = status; + this.StartTime = startTime; + this.EndTime = endTime; + this.ActivityId = activityId; CustomInit(); } @@ -58,51 +65,48 @@ public Job() /// partial void CustomInit(); + /// - /// Gets or sets friendly name of the entity on which the current job - /// is executing. + /// Gets or sets friendly name of the entity on which the current job is + /// executing. /// - [JsonProperty(PropertyName = "entityFriendlyName")] - public string EntityFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "entityFriendlyName")] + public string EntityFriendlyName {get; set; } /// - /// Gets or sets backup management type to execute the current job. - /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type to execute the current job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// /// Gets or sets the operation name. /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// /// Gets or sets job status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets activityId of job. /// - [JsonProperty(PropertyName = "activityId")] - public string ActivityId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "activityId")] + public string ActivityId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobOperationType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobOperationType.cs index cb0a15cc5ee0..2569e37bb4b2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobOperationType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobOperationType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for JobOperationType. /// + + public static class JobOperationType { public const string Invalid = "Invalid"; @@ -28,4 +25,4 @@ public static class JobOperationType public const string Undelete = "Undelete"; public const string UpdateCustomerManagedKey = "UpdateCustomerManagedKey"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobQueryObject.cs index e37e367742dd..8fcdc8d8b7a0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,31 +23,39 @@ public JobQueryObject() /// /// Initializes a new instance of the JobQueryObject class. /// - /// Status of the job. Possible values include: - /// 'Invalid', 'InProgress', 'Completed', 'Failed', + + /// Status of the job. + /// Possible values include: 'Invalid', 'InProgress', 'Completed', 'Failed', /// 'CompletedWithWarnings', 'Cancelled', 'Cancelling' - /// Type of backup management for - /// the job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', - /// 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Type of operation. Possible values include: - /// 'Invalid', 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', - /// 'Restore', 'DisableBackup', 'DeleteBackupData', - /// 'CrossRegionRestore', 'Undelete', + + /// Type of backup management for the job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Type of operation. + /// Possible values include: 'Invalid', 'Register', 'UnRegister', + /// 'ConfigureBackup', 'Backup', 'Restore', 'DisableBackup', + /// 'DeleteBackupData', 'CrossRegionRestore', 'Undelete', /// 'UpdateCustomerManagedKey' - /// JobID represents the job uniquely. - /// Job has started at this time. Value is in - /// UTC. - /// Job has ended at this time. Value is in - /// UTC. + + /// JobID represents the job uniquely. + /// + + /// Job has started at this time. Value is in UTC. + /// + + /// Job has ended at this time. Value is in UTC. + /// public JobQueryObject(string status = default(string), string backupManagementType = default(string), string operation = default(string), string jobId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?)) + { - Status = status; - BackupManagementType = backupManagementType; - Operation = operation; - JobId = jobId; - StartTime = startTime; - EndTime = endTime; + this.Status = status; + this.BackupManagementType = backupManagementType; + this.Operation = operation; + this.JobId = jobId; + this.StartTime = startTime; + this.EndTime = endTime; CustomInit(); } @@ -62,49 +64,41 @@ public JobQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets status of the job. Possible values include: 'Invalid', - /// 'InProgress', 'Completed', 'Failed', 'CompletedWithWarnings', - /// 'Cancelled', 'Cancelling' + /// Gets or sets status of the job. Possible values include: 'Invalid', 'InProgress', 'Completed', 'Failed', 'CompletedWithWarnings', 'Cancelled', 'Cancelling' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// - /// Gets or sets type of backup management for the job. Possible values - /// include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets type of backup management for the job. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets type of operation. Possible values include: 'Invalid', - /// 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', - /// 'DisableBackup', 'DeleteBackupData', 'CrossRegionRestore', - /// 'Undelete', 'UpdateCustomerManagedKey' + /// Gets or sets type of operation. Possible values include: 'Invalid', 'Register', 'UnRegister', 'ConfigureBackup', 'Backup', 'Restore', 'DisableBackup', 'DeleteBackupData', 'CrossRegionRestore', 'Undelete', 'UpdateCustomerManagedKey' /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// /// Gets or sets jobID represents the job uniquely. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; set; } /// /// Gets or sets job has started at this time. Value is in UTC. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets job has ended at this time. Value is in UTC. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobResource.cs index bb3dbe233758..8f69bb6b1c32 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,20 +23,33 @@ public JobResource() /// /// Initializes a new instance of the JobResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// JobResource properties - public JobResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), Job properties = default(Job)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// JobResource properties + /// + public JobResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), Job properties = default(Job)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -53,11 +58,11 @@ public JobResource() /// partial void CustomInit(); + /// /// Gets or sets jobResource properties /// - [JsonProperty(PropertyName = "properties")] - public Job Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public Job Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobStatus.cs index c949477860ee..cb98cfa9c1b9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for JobStatus. /// + + public static class JobStatus { public const string Invalid = "Invalid"; @@ -24,4 +21,4 @@ public static class JobStatus public const string Cancelled = "Cancelled"; public const string Cancelling = "Cancelling"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobSupportedAction.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobSupportedAction.cs index de0a683deb51..5e4969634c2a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobSupportedAction.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/JobSupportedAction.cs @@ -1,31 +1,24 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for JobSupportedAction. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum JobSupportedAction { - [EnumMember(Value = "Invalid")] + [System.Runtime.Serialization.EnumMember(Value = "Invalid")] Invalid, - [EnumMember(Value = "Cancellable")] + [System.Runtime.Serialization.EnumMember(Value = "Cancellable")] Cancellable, - [EnumMember(Value = "Retriable")] + [System.Runtime.Serialization.EnumMember(Value = "Retriable")] Retriable } internal static class JobSupportedActionEnumExtension @@ -34,7 +27,6 @@ internal static string ToSerializedValue(this JobSupportedAction? value) { return value == null ? null : ((JobSupportedAction)value).ToSerializedValue(); } - internal static string ToSerializedValue(this JobSupportedAction value) { switch( value ) @@ -48,7 +40,6 @@ internal static string ToSerializedValue(this JobSupportedAction value) } return null; } - internal static JobSupportedAction? ParseJobSupportedAction(this string value) { switch( value ) @@ -63,4 +54,4 @@ internal static string ToSerializedValue(this JobSupportedAction value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KEKDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KEKDetails.cs index cc08fd77e669..20bf985c8fc4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KEKDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KEKDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,21 @@ public KEKDetails() /// /// Initializes a new instance of the KEKDetails class. /// - /// Key is KEK. - /// Key Vault ID where this Key is - /// stored. - /// KEK data. + + /// Key is KEK. + /// + + /// Key Vault ID where this Key is stored. + /// + + /// KEK data. + /// public KEKDetails(string keyUrl = default(string), string keyVaultId = default(string), string keyBackupData = default(string)) + { - KeyUrl = keyUrl; - KeyVaultId = keyVaultId; - KeyBackupData = keyBackupData; + this.KeyUrl = keyUrl; + this.KeyVaultId = keyVaultId; + this.KeyBackupData = keyBackupData; CustomInit(); } @@ -46,23 +46,23 @@ public KEKDetails() /// partial void CustomInit(); + /// /// Gets or sets key is KEK. /// - [JsonProperty(PropertyName = "keyUrl")] - public string KeyUrl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyUrl")] + public string KeyUrl {get; set; } /// /// Gets or sets key Vault ID where this Key is stored. /// - [JsonProperty(PropertyName = "keyVaultId")] - public string KeyVaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultId")] + public string KeyVaultId {get; set; } /// - /// Gets or sets KEK data. + /// Gets or sets kEK data. /// - [JsonProperty(PropertyName = "keyBackupData")] - public string KeyBackupData { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "keyBackupData")] + public string KeyBackupData {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KPIResourceHealthDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KPIResourceHealthDetails.cs index 1079e3535ff4..e503011bbc6e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KPIResourceHealthDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KPIResourceHealthDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,19 @@ public KPIResourceHealthDetails() /// /// Initializes a new instance of the KPIResourceHealthDetails class. /// - /// Resource Health Status. Possible - /// values include: 'Healthy', 'TransientDegraded', + + /// Resource Health Status + /// Possible values include: 'Healthy', 'TransientDegraded', /// 'PersistentDegraded', 'TransientUnhealthy', 'PersistentUnhealthy', /// 'Invalid' - /// Resource Health Status - public KPIResourceHealthDetails(string resourceHealthStatus = default(string), IList resourceHealthDetails = default(IList)) + + /// Resource Health Status + /// + public KPIResourceHealthDetails(string resourceHealthStatus = default(string), System.Collections.Generic.IList resourceHealthDetails = default(System.Collections.Generic.IList)) + { - ResourceHealthStatus = resourceHealthStatus; - ResourceHealthDetails = resourceHealthDetails; + this.ResourceHealthStatus = resourceHealthStatus; + this.ResourceHealthDetails = resourceHealthDetails; CustomInit(); } @@ -48,19 +44,17 @@ public KPIResourceHealthDetails() /// partial void CustomInit(); + /// - /// Gets or sets resource Health Status. Possible values include: - /// 'Healthy', 'TransientDegraded', 'PersistentDegraded', - /// 'TransientUnhealthy', 'PersistentUnhealthy', 'Invalid' + /// Gets or sets resource Health Status Possible values include: 'Healthy', 'TransientDegraded', 'PersistentDegraded', 'TransientUnhealthy', 'PersistentUnhealthy', 'Invalid' /// - [JsonProperty(PropertyName = "resourceHealthStatus")] - public string ResourceHealthStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceHealthStatus")] + public string ResourceHealthStatus {get; set; } /// /// Gets or sets resource Health Status /// - [JsonProperty(PropertyName = "resourceHealthDetails")] - public IList ResourceHealthDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceHealthDetails")] + public System.Collections.Generic.IList ResourceHealthDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KeyAndSecretDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KeyAndSecretDetails.cs index ac25ed561c1c..e3f992c9a365 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KeyAndSecretDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/KeyAndSecretDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -35,15 +29,21 @@ public KeyAndSecretDetails() /// /// Initializes a new instance of the KeyAndSecretDetails class. /// - /// KEK is encryption key for BEK. - /// BEK is bitlocker encryption key. - /// Encryption mechanism: None/ - /// SinglePass/ DoublePass + + /// KEK is encryption key for BEK. + /// + + /// BEK is bitlocker encryption key. + /// + + /// Encryption mechanism: None/ SinglePass/ DoublePass + /// public KeyAndSecretDetails(KEKDetails kekDetails = default(KEKDetails), BEKDetails bekDetails = default(BEKDetails), string encryptionMechanism = default(string)) + { - KekDetails = kekDetails; - BekDetails = bekDetails; - EncryptionMechanism = encryptionMechanism; + this.KekDetails = kekDetails; + this.BekDetails = bekDetails; + this.EncryptionMechanism = encryptionMechanism; CustomInit(); } @@ -52,23 +52,23 @@ public KeyAndSecretDetails() /// partial void CustomInit(); + /// - /// Gets or sets KEK is encryption key for BEK. + /// Gets or sets kEK is encryption key for BEK. /// - [JsonProperty(PropertyName = "kekDetails")] - public KEKDetails KekDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekDetails")] + public KEKDetails KekDetails {get; set; } /// - /// Gets or sets BEK is bitlocker encryption key. + /// Gets or sets bEK is bitlocker encryption key. /// - [JsonProperty(PropertyName = "bekDetails")] - public BEKDetails BekDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "bekDetails")] + public BEKDetails BekDetails {get; set; } /// /// Gets or sets encryption mechanism: None/ SinglePass/ DoublePass /// - [JsonProperty(PropertyName = "encryptionMechanism")] - public string EncryptionMechanism { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionMechanism")] + public string EncryptionMechanism {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LastBackupStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LastBackupStatus.cs index 439465987978..32ba2b5eff3f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LastBackupStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LastBackupStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for LastBackupStatus. /// + + public static class LastBackupStatus { public const string Invalid = "Invalid"; @@ -21,4 +18,4 @@ public static class LastBackupStatus public const string Unhealthy = "Unhealthy"; public const string IRPending = "IRPending"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LastUpdateStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LastUpdateStatus.cs index 76a19234bd73..f72d3a09d784 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LastUpdateStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LastUpdateStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for LastUpdateStatus. /// + + public static class LastUpdateStatus { public const string Invalid = "Invalid"; @@ -25,4 +22,4 @@ public static class LastUpdateStatus public const string Initialized = "Initialized"; public const string FirstInitialization = "FirstInitialization"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ListRecoveryPointsRecommendedForMoveRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ListRecoveryPointsRecommendedForMoveRequest.cs index b6b295f0e4a2..72438e9db53a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ListRecoveryPointsRecommendedForMoveRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ListRecoveryPointsRecommendedForMoveRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ListRecoveryPointsRecommendedForMoveRequest { /// - /// Initializes a new instance of the - /// ListRecoveryPointsRecommendedForMoveRequest class. + /// Initializes a new instance of the ListRecoveryPointsRecommendedForMoveRequest class. /// public ListRecoveryPointsRecommendedForMoveRequest() { @@ -30,16 +21,19 @@ public ListRecoveryPointsRecommendedForMoveRequest() } /// - /// Initializes a new instance of the - /// ListRecoveryPointsRecommendedForMoveRequest class. + /// Initializes a new instance of the ListRecoveryPointsRecommendedForMoveRequest class. /// - /// Gets the class type. - /// List of Recovery Points excluded from - /// Move - public ListRecoveryPointsRecommendedForMoveRequest(string objectType = default(string), IList excludedRPList = default(IList)) + + /// Gets the class type. + /// + + /// List of Recovery Points excluded from Move + /// + public ListRecoveryPointsRecommendedForMoveRequest(string objectType = default(string), System.Collections.Generic.IList excludedRpList = default(System.Collections.Generic.IList)) + { - ObjectType = objectType; - ExcludedRPList = excludedRPList; + this.ObjectType = objectType; + this.ExcludedRpList = excludedRpList; CustomInit(); } @@ -48,17 +42,17 @@ public ListRecoveryPointsRecommendedForMoveRequest() /// partial void CustomInit(); + /// - /// Gets the class type. + /// Gets or sets gets the class type. /// - [JsonProperty(PropertyName = "objectType")] - public string ObjectType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "objectType")] + public string ObjectType {get; set; } /// /// Gets or sets list of Recovery Points excluded from Move /// - [JsonProperty(PropertyName = "excludedRPList")] - public IList ExcludedRPList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "excludedRPList")] + public System.Collections.Generic.IList ExcludedRpList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LogSchedulePolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LogSchedulePolicy.cs index 54a0222333bd..eb709cb0ecb7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LogSchedulePolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LogSchedulePolicy.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +24,13 @@ public LogSchedulePolicy() /// /// Initializes a new instance of the LogSchedulePolicy class. /// - /// Frequency of the log schedule - /// operation of this policy in minutes. + + /// Frequency of the log schedule operation of this policy in minutes. + /// public LogSchedulePolicy(int? scheduleFrequencyInMins = default(int?)) + { - ScheduleFrequencyInMins = scheduleFrequencyInMins; + this.ScheduleFrequencyInMins = scheduleFrequencyInMins; CustomInit(); } @@ -43,12 +39,12 @@ public LogSchedulePolicy() /// partial void CustomInit(); + /// - /// Gets or sets frequency of the log schedule operation of this policy - /// in minutes. + /// Gets or sets frequency of the log schedule operation of this policy in + /// minutes. /// - [JsonProperty(PropertyName = "scheduleFrequencyInMins")] - public int? ScheduleFrequencyInMins { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleFrequencyInMins")] + public int? ScheduleFrequencyInMins {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LongTermRetentionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LongTermRetentionPolicy.cs index 141cf4b91d17..dac1838e83f7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LongTermRetentionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LongTermRetentionPolicy.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,20 +24,25 @@ public LongTermRetentionPolicy() /// /// Initializes a new instance of the LongTermRetentionPolicy class. /// - /// Daily retention schedule of the - /// protection policy. - /// Weekly retention schedule of the - /// protection policy. - /// Monthly retention schedule of the - /// protection policy. - /// Yearly retention schedule of the - /// protection policy. + + /// Daily retention schedule of the protection policy. + /// + + /// Weekly retention schedule of the protection policy. + /// + + /// Monthly retention schedule of the protection policy. + /// + + /// Yearly retention schedule of the protection policy. + /// public LongTermRetentionPolicy(DailyRetentionSchedule dailySchedule = default(DailyRetentionSchedule), WeeklyRetentionSchedule weeklySchedule = default(WeeklyRetentionSchedule), MonthlyRetentionSchedule monthlySchedule = default(MonthlyRetentionSchedule), YearlyRetentionSchedule yearlySchedule = default(YearlyRetentionSchedule)) + { - DailySchedule = dailySchedule; - WeeklySchedule = weeklySchedule; - MonthlySchedule = monthlySchedule; - YearlySchedule = yearlySchedule; + this.DailySchedule = dailySchedule; + this.WeeklySchedule = weeklySchedule; + this.MonthlySchedule = monthlySchedule; + this.YearlySchedule = yearlySchedule; CustomInit(); } @@ -52,29 +51,29 @@ public LongTermRetentionPolicy() /// partial void CustomInit(); + /// /// Gets or sets daily retention schedule of the protection policy. /// - [JsonProperty(PropertyName = "dailySchedule")] - public DailyRetentionSchedule DailySchedule { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dailySchedule")] + public DailyRetentionSchedule DailySchedule {get; set; } /// /// Gets or sets weekly retention schedule of the protection policy. /// - [JsonProperty(PropertyName = "weeklySchedule")] - public WeeklyRetentionSchedule WeeklySchedule { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "weeklySchedule")] + public WeeklyRetentionSchedule WeeklySchedule {get; set; } /// /// Gets or sets monthly retention schedule of the protection policy. /// - [JsonProperty(PropertyName = "monthlySchedule")] - public MonthlyRetentionSchedule MonthlySchedule { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monthlySchedule")] + public MonthlyRetentionSchedule MonthlySchedule {get; set; } /// /// Gets or sets yearly retention schedule of the protection policy. /// - [JsonProperty(PropertyName = "yearlySchedule")] - public YearlyRetentionSchedule YearlySchedule { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "yearlySchedule")] + public YearlyRetentionSchedule YearlySchedule {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LongTermSchedulePolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LongTermSchedulePolicy.cs index 23eb0270da56..9820e6207588 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LongTermSchedulePolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/LongTermSchedulePolicy.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public LongTermSchedulePolicy() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MABContainerHealthDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MABContainerHealthDetails.cs index d76e5f8e6619..cd822dc974ed 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MABContainerHealthDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MABContainerHealthDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,16 +23,25 @@ public MABContainerHealthDetails() /// /// Initializes a new instance of the MABContainerHealthDetails class. /// - /// Health Code - /// Health Title - /// Health Message - /// Health Recommended Actions - public MABContainerHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), IList recommendations = default(IList)) + + /// Health Code + /// + + /// Health Title + /// + + /// Health Message + /// + + /// Health Recommended Actions + /// + public MABContainerHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - Code = code; - Title = title; - Message = message; - Recommendations = recommendations; + this.Code = code; + this.Title = title; + this.Message = message; + this.Recommendations = recommendations; CustomInit(); } @@ -49,29 +50,29 @@ public MABContainerHealthDetails() /// partial void CustomInit(); + /// /// Gets or sets health Code /// - [JsonProperty(PropertyName = "code")] - public int? Code { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public int? Code {get; set; } /// /// Gets or sets health Title /// - [JsonProperty(PropertyName = "title")] - public string Title { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "title")] + public string Title {get; set; } /// /// Gets or sets health Message /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } /// /// Gets or sets health Recommended Actions /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabContainer.cs index c530394579cb..49dde0542e4e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabContainer.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,40 +24,55 @@ public MabContainer() /// /// Initializes a new instance of the MabContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container - /// Can the container be registered one - /// more time. - /// ContainerID represents the - /// container. - /// Number of items backed up in this - /// container. - /// Agent version of this container. - /// Additional information for this - /// container - /// Health details on this mab - /// container. - /// Health state of mab - /// container. - public MabContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), bool? canReRegister = default(bool?), long? containerId = default(long?), long? protectedItemCount = default(long?), string agentVersion = default(string), MabContainerExtendedInfo extendedInfo = default(MabContainerExtendedInfo), IList mabContainerHealthDetails = default(IList), string containerHealthState = default(string)) - : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// + + /// Can the container be registered one more time. + /// + + /// ContainerID represents the container. + /// + + /// Number of items backed up in this container. + /// + + /// Agent version of this container. + /// + + /// Additional information for this container + /// + + /// Health details on this mab container. + /// + + /// Health state of mab container. + /// + public MabContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string), bool? canReRegister = default(bool?), long? containerId = default(long?), long? protectedItemCount = default(long?), string agentVersion = default(string), MabContainerExtendedInfo extendedInfo = default(MabContainerExtendedInfo), System.Collections.Generic.IList mabContainerHealthDetails = default(System.Collections.Generic.IList), string containerHealthState = default(string)) + + : base(friendlyName, backupManagementType, registrationStatus, healthStatus, protectableObjectType) { - CanReRegister = canReRegister; - ContainerId = containerId; - ProtectedItemCount = protectedItemCount; - AgentVersion = agentVersion; - ExtendedInfo = extendedInfo; - MabContainerHealthDetails = mabContainerHealthDetails; - ContainerHealthState = containerHealthState; + this.CanReRegister = canReRegister; + this.ContainerId = containerId; + this.ProtectedItemCount = protectedItemCount; + this.AgentVersion = agentVersion; + this.ExtendedInfo = extendedInfo; + this.MabContainerHealthDetails = mabContainerHealthDetails; + this.ContainerHealthState = containerHealthState; CustomInit(); } @@ -74,47 +81,47 @@ public MabContainer() /// partial void CustomInit(); + /// /// Gets or sets can the container be registered one more time. /// - [JsonProperty(PropertyName = "canReRegister")] - public bool? CanReRegister { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "canReRegister")] + public bool? CanReRegister {get; set; } /// /// Gets or sets containerID represents the container. /// - [JsonProperty(PropertyName = "containerId")] - public long? ContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerId")] + public long? ContainerId {get; set; } /// /// Gets or sets number of items backed up in this container. /// - [JsonProperty(PropertyName = "protectedItemCount")] - public long? ProtectedItemCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemCount")] + public long? ProtectedItemCount {get; set; } /// /// Gets or sets agent version of this container. /// - [JsonProperty(PropertyName = "agentVersion")] - public string AgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion {get; set; } /// /// Gets or sets additional information for this container /// - [JsonProperty(PropertyName = "extendedInfo")] - public MabContainerExtendedInfo ExtendedInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public MabContainerExtendedInfo ExtendedInfo {get; set; } /// /// Gets or sets health details on this mab container. /// - [JsonProperty(PropertyName = "mabContainerHealthDetails")] - public IList MabContainerHealthDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mabContainerHealthDetails")] + public System.Collections.Generic.IList MabContainerHealthDetails {get; set; } /// /// Gets or sets health state of mab container. /// - [JsonProperty(PropertyName = "containerHealthState")] - public string ContainerHealthState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "containerHealthState")] + public string ContainerHealthState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabContainerExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabContainerExtendedInfo.cs index acf15da58d01..81d4db3f57c1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabContainerExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabContainerExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,27 +23,32 @@ public MabContainerExtendedInfo() /// /// Initializes a new instance of the MabContainerExtendedInfo class. /// - /// Time stamp when this container was - /// refreshed. - /// Type of backup items associated with - /// this container. Possible values include: 'Invalid', 'VM', - /// 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', - /// 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', - /// 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + + /// Time stamp when this container was refreshed. + /// + + /// Type of backup items associated with this container. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', /// 'SAPAseDatabase', 'SAPHanaDBInstance' - /// List of backup items associated with this - /// container. - /// Backup policy associated with this - /// container. - /// Latest backup status of this - /// container. - public MabContainerExtendedInfo(System.DateTime? lastRefreshedAt = default(System.DateTime?), string backupItemType = default(string), IList backupItems = default(IList), string policyName = default(string), string lastBackupStatus = default(string)) + + /// List of backup items associated with this container. + /// + + /// Backup policy associated with this container. + /// + + /// Latest backup status of this container. + /// + public MabContainerExtendedInfo(System.DateTime? lastRefreshedAt = default(System.DateTime?), string backupItemType = default(string), System.Collections.Generic.IList backupItems = default(System.Collections.Generic.IList), string policyName = default(string), string lastBackupStatus = default(string)) + { - LastRefreshedAt = lastRefreshedAt; - BackupItemType = backupItemType; - BackupItems = backupItems; - PolicyName = policyName; - LastBackupStatus = lastBackupStatus; + this.LastRefreshedAt = lastRefreshedAt; + this.BackupItemType = backupItemType; + this.BackupItems = backupItems; + this.PolicyName = policyName; + this.LastBackupStatus = lastBackupStatus; CustomInit(); } @@ -60,40 +57,35 @@ public MabContainerExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets time stamp when this container was refreshed. /// - [JsonProperty(PropertyName = "lastRefreshedAt")] - public System.DateTime? LastRefreshedAt { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRefreshedAt")] + public System.DateTime? LastRefreshedAt {get; set; } /// - /// Gets or sets type of backup items associated with this container. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' + /// Gets or sets type of backup items associated with this container. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "backupItemType")] - public string BackupItemType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupItemType")] + public string BackupItemType {get; set; } /// /// Gets or sets list of backup items associated with this container. /// - [JsonProperty(PropertyName = "backupItems")] - public IList BackupItems { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupItems")] + public System.Collections.Generic.IList BackupItems {get; set; } /// /// Gets or sets backup policy associated with this container. /// - [JsonProperty(PropertyName = "policyName")] - public string PolicyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyName")] + public string PolicyName {get; set; } /// /// Gets or sets latest backup status of this container. /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabErrorInfo.cs index 7f902f825534..9896ef8fd086 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,13 +23,17 @@ public MabErrorInfo() /// /// Initializes a new instance of the MabErrorInfo class. /// - /// Localized error string. - /// List of localized - /// recommendations. - public MabErrorInfo(string errorString = default(string), IList recommendations = default(IList)) + + /// Localized error string. + /// + + /// List of localized recommendations. + /// + public MabErrorInfo(string errorString = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - ErrorString = errorString; - Recommendations = recommendations; + this.ErrorString = errorString; + this.Recommendations = recommendations; CustomInit(); } @@ -46,17 +42,17 @@ public MabErrorInfo() /// partial void CustomInit(); + /// /// Gets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; private set; } /// /// Gets list of localized recommendations. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabFileFolderProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabFileFolderProtectedItem.cs index a541888d5550..d25778e8343f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabFileFolderProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabFileFolderProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,71 +24,97 @@ public MabFileFolderProtectedItem() /// /// Initializes a new instance of the MabFileFolderProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - /// Friendly name of this backup - /// item. - /// Name of the computer associated with - /// this backup item. - /// Status of last backup - /// operation. - /// Timestamp of the last backup operation - /// on this backup item. - /// Protected, ProtectionStopped, - /// IRPending or ProtectionError - /// Sync time for deferred - /// deletion in UTC - /// Additional information with this backup - /// item. - public MabFileFolderProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string computerName = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectionState = default(string), long? deferredDeleteSyncTimeInUTC = default(long?), MabFileFolderProtectedItemExtendedInfo extendedInfo = default(MabFileFolderProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + + /// Friendly name of this backup item. + /// + + /// Name of the computer associated with this backup item. + /// + + /// Status of last backup operation. + /// + + /// Timestamp of the last backup operation on this backup item. + /// + + /// Protected, ProtectionStopped, IRPending or ProtectionError + /// + + /// Sync time for deferred deletion in UTC + /// + + /// Additional information with this backup item. + /// + public MabFileFolderProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?), string friendlyName = default(string), string computerName = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectionState = default(string), long? deferredDeleteSyncTimeInUtc = default(long?), MabFileFolderProtectedItemExtendedInfo extendedInfo = default(MabFileFolderProtectedItemExtendedInfo)) + + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUtc, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriod) { - FriendlyName = friendlyName; - ComputerName = computerName; - LastBackupStatus = lastBackupStatus; - LastBackupTime = lastBackupTime; - ProtectionState = protectionState; - DeferredDeleteSyncTimeInUTC = deferredDeleteSyncTimeInUTC; - ExtendedInfo = extendedInfo; + this.FriendlyName = friendlyName; + this.ComputerName = computerName; + this.LastBackupStatus = lastBackupStatus; + this.LastBackupTime = lastBackupTime; + this.ProtectionState = protectionState; + this.DeferredDeleteSyncTimeInUtc = deferredDeleteSyncTimeInUtc; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -105,49 +123,47 @@ public MabFileFolderProtectedItem() /// partial void CustomInit(); + /// /// Gets or sets friendly name of this backup item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets name of the computer associated with this backup item. /// - [JsonProperty(PropertyName = "computerName")] - public string ComputerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "computerName")] + public string ComputerName {get; set; } /// /// Gets or sets status of last backup operation. /// - [JsonProperty(PropertyName = "lastBackupStatus")] - public string LastBackupStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupStatus")] + public string LastBackupStatus {get; set; } /// - /// Gets or sets timestamp of the last backup operation on this backup - /// item. + /// Gets or sets timestamp of the last backup operation on this backup item. /// - [JsonProperty(PropertyName = "lastBackupTime")] - public System.DateTime? LastBackupTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastBackupTime")] + public System.DateTime? LastBackupTime {get; set; } /// - /// Gets or sets protected, ProtectionStopped, IRPending or - /// ProtectionError + /// Gets or sets protected, ProtectionStopped, IRPending or ProtectionError /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// /// Gets or sets sync time for deferred deletion in UTC /// - [JsonProperty(PropertyName = "deferredDeleteSyncTimeInUTC")] - public long? DeferredDeleteSyncTimeInUTC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "deferredDeleteSyncTimeInUTC")] + public long? DeferredDeleteSyncTimeInUtc {get; set; } /// /// Gets or sets additional information with this backup item. /// - [JsonProperty(PropertyName = "extendedInfo")] - public MabFileFolderProtectedItemExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public MabFileFolderProtectedItemExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabFileFolderProtectedItemExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabFileFolderProtectedItemExtendedInfo.cs index 7f40669f47e5..7d89c2d76bb6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabFileFolderProtectedItemExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabFileFolderProtectedItemExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class MabFileFolderProtectedItemExtendedInfo { /// - /// Initializes a new instance of the - /// MabFileFolderProtectedItemExtendedInfo class. + /// Initializes a new instance of the MabFileFolderProtectedItemExtendedInfo class. /// public MabFileFolderProtectedItemExtendedInfo() { @@ -28,20 +21,23 @@ public MabFileFolderProtectedItemExtendedInfo() } /// - /// Initializes a new instance of the - /// MabFileFolderProtectedItemExtendedInfo class. + /// Initializes a new instance of the MabFileFolderProtectedItemExtendedInfo class. /// - /// Last time when the agent data synced - /// to service. - /// The oldest backup copy - /// available. - /// Number of backup copies associated - /// with the backup item. + + /// Last time when the agent data synced to service. + /// + + /// The oldest backup copy available. + /// + + /// Number of backup copies associated with the backup item. + /// public MabFileFolderProtectedItemExtendedInfo(System.DateTime? lastRefreshedAt = default(System.DateTime?), System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?)) + { - LastRefreshedAt = lastRefreshedAt; - OldestRecoveryPoint = oldestRecoveryPoint; - RecoveryPointCount = recoveryPointCount; + this.LastRefreshedAt = lastRefreshedAt; + this.OldestRecoveryPoint = oldestRecoveryPoint; + this.RecoveryPointCount = recoveryPointCount; CustomInit(); } @@ -50,24 +46,23 @@ public MabFileFolderProtectedItemExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets last time when the agent data synced to service. /// - [JsonProperty(PropertyName = "lastRefreshedAt")] - public System.DateTime? LastRefreshedAt { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRefreshedAt")] + public System.DateTime? LastRefreshedAt {get; set; } /// /// Gets or sets the oldest backup copy available. /// - [JsonProperty(PropertyName = "oldestRecoveryPoint")] - public System.DateTime? OldestRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oldestRecoveryPoint")] + public System.DateTime? OldestRecoveryPoint {get; set; } /// - /// Gets or sets number of backup copies associated with the backup - /// item. + /// Gets or sets number of backup copies associated with the backup item. /// - [JsonProperty(PropertyName = "recoveryPointCount")] - public int? RecoveryPointCount { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointCount")] + public int? RecoveryPointCount {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJob.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJob.cs index b217c8e04b22..9f2f14bce58a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,47 +24,68 @@ public MabJob() /// /// Initializes a new instance of the MabJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Time taken by job to run. - /// The state/actions applicable on jobs like - /// cancel/retry. - /// Name of server protecting the - /// DS. - /// Server type of MAB container. Possible - /// values include: 'Invalid', 'Unknown', 'IaasVMContainer', - /// 'IaasVMServiceContainer', 'DPMContainer', - /// 'AzureBackupServerContainer', 'MABContainer', 'Cluster', - /// 'AzureSqlContainer', 'Windows', 'VCenter', 'VMAppContainer', - /// 'SQLAGWorkLoadContainer', 'StorageContainer', + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Time taken by job to run. + /// + + /// The state/actions applicable on jobs like cancel/retry. + /// + + /// Name of server protecting the DS. + /// + + /// Server type of MAB container. + /// Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', + /// 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', + /// 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', + /// 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', /// 'GenericContainer' - /// Workload type of backup item. Possible - /// values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', - /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', - /// 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' - /// The errors. - /// Additional information on the - /// job. - public MabJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), string mabServerName = default(string), string mabServerType = default(string), string workloadType = default(string), IList errorDetails = default(IList), MabJobExtendedInfo extendedInfo = default(MabJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Workload type of backup item. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// The errors. + /// + + /// Additional information on the job. + /// + public MabJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), string mabServerName = default(string), string mabServerType = default(string), string workloadType = default(string), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), MabJobExtendedInfo extendedInfo = default(MabJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - Duration = duration; - ActionsInfo = actionsInfo; - MabServerName = mabServerName; - MabServerType = mabServerType; - WorkloadType = workloadType; - ErrorDetails = errorDetails; - ExtendedInfo = extendedInfo; + this.Duration = duration; + this.ActionsInfo = actionsInfo; + this.MabServerName = mabServerName; + this.MabServerType = mabServerType; + this.WorkloadType = workloadType; + this.ErrorDetails = errorDetails; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -81,57 +94,47 @@ public MabJob() /// partial void CustomInit(); + /// /// Gets or sets time taken by job to run. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets the state/actions applicable on jobs like - /// cancel/retry. + /// Gets or sets the state/actions applicable on jobs like cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets name of server protecting the DS. /// - [JsonProperty(PropertyName = "mabServerName")] - public string MabServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mabServerName")] + public string MabServerName {get; set; } /// - /// Gets or sets server type of MAB container. Possible values include: - /// 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', - /// 'DPMContainer', 'AzureBackupServerContainer', 'MABContainer', - /// 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', - /// 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', - /// 'GenericContainer' + /// Gets or sets server type of MAB container. Possible values include: 'Invalid', 'Unknown', 'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer', 'AzureBackupServerContainer', 'MABContainer', 'Cluster', 'AzureSqlContainer', 'Windows', 'VCenter', 'VMAppContainer', 'SQLAGWorkLoadContainer', 'StorageContainer', 'GenericContainer' /// - [JsonProperty(PropertyName = "mabServerType")] - public string MabServerType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mabServerType")] + public string MabServerType {get; set; } /// - /// Gets or sets workload type of backup item. Possible values include: - /// 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', - /// 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets or sets workload type of backup item. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// /// Gets or sets the errors. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// /// Gets or sets additional information on the job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public MabJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public MabJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJobExtendedInfo.cs index 936495b24a74..947d2c55431d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public MabJobExtendedInfo() /// /// Initializes a new instance of the MabJobExtendedInfo class. /// - /// List of tasks for this job. - /// The job properties. - /// Non localized error message - /// specific to this job. - public MabJobExtendedInfo(IList tasksList = default(IList), IDictionary propertyBag = default(IDictionary), string dynamicErrorMessage = default(string)) + + /// List of tasks for this job. + /// + + /// The job properties. + /// + + /// Non localized error message specific to this job. + /// + public MabJobExtendedInfo(System.Collections.Generic.IList tasksList = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary), string dynamicErrorMessage = default(string)) + { - TasksList = tasksList; - PropertyBag = propertyBag; - DynamicErrorMessage = dynamicErrorMessage; + this.TasksList = tasksList; + this.PropertyBag = propertyBag; + this.DynamicErrorMessage = dynamicErrorMessage; CustomInit(); } @@ -48,23 +46,23 @@ public MabJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets list of tasks for this job. /// - [JsonProperty(PropertyName = "tasksList")] - public IList TasksList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasksList")] + public System.Collections.Generic.IList TasksList {get; set; } /// /// Gets or sets the job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } /// /// Gets or sets non localized error message specific to this job. /// - [JsonProperty(PropertyName = "dynamicErrorMessage")] - public string DynamicErrorMessage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dynamicErrorMessage")] + public string DynamicErrorMessage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJobTaskDetails.cs index eea97e6f4c34..13e38afe6fcf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabJobTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,29 @@ public MabJobTaskDetails() /// /// Initializes a new instance of the MabJobTaskDetails class. /// - /// The task display name. - /// The start time. - /// The end time. - /// Time elapsed for task. - /// The status. + + /// The task display name. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// Time elapsed for task. + /// + + /// The status. + /// public MabJobTaskDetails(string taskId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.TimeSpan? duration = default(System.TimeSpan?), string status = default(string)) + { - TaskId = taskId; - StartTime = startTime; - EndTime = endTime; - Duration = duration; - Status = status; + this.TaskId = taskId; + this.StartTime = startTime; + this.EndTime = endTime; + this.Duration = duration; + this.Status = status; CustomInit(); } @@ -49,35 +54,35 @@ public MabJobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the task display name. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets time elapsed for task. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// /// Gets or sets the status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabProtectionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabProtectionPolicy.cs index b27b8a6cbdce..a84bad3aabc7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabProtectionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabProtectionPolicy.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,18 +24,24 @@ public MabProtectionPolicy() /// /// Initializes a new instance of the MabProtectionPolicy class. /// - /// Number of items associated with - /// this policy. - /// ResourceGuard - /// Operation Requests - /// Backup schedule of backup - /// policy. - /// Retention policy details. - public MabProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy)) - : base(protectedItemsCount, resourceGuardOperationRequests) + + /// Number of items associated with this policy. + /// + + /// ResourceGuard Operation Requests + /// + + /// Backup schedule of backup policy. + /// + + /// Retention policy details. + /// + public MabProtectionPolicy(int? protectedItemsCount = default(int?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy)) + + : base(protectedItemsCount, resourceGuardOperationRequests) { - SchedulePolicy = schedulePolicy; - RetentionPolicy = retentionPolicy; + this.SchedulePolicy = schedulePolicy; + this.RetentionPolicy = retentionPolicy; CustomInit(); } @@ -52,17 +50,17 @@ public MabProtectionPolicy() /// partial void CustomInit(); + /// /// Gets or sets backup schedule of backup policy. /// - [JsonProperty(PropertyName = "schedulePolicy")] - public SchedulePolicy SchedulePolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "schedulePolicy")] + public SchedulePolicy SchedulePolicy {get; set; } /// /// Gets or sets retention policy details. /// - [JsonProperty(PropertyName = "retentionPolicy")] - public RetentionPolicy RetentionPolicy { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionPolicy")] + public RetentionPolicy RetentionPolicy {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabServerType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabServerType.cs index 763a2e9c8d7c..09281f5194fc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabServerType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MabServerType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for MabServerType. /// + + public static class MabServerType { public const string Invalid = "Invalid"; @@ -28,8 +25,8 @@ public static class MabServerType public const string Windows = "Windows"; public const string VCenter = "VCenter"; public const string VMAppContainer = "VMAppContainer"; - public const string SQLAGWorkLoadContainer = "SQLAGWorkLoadContainer"; + public const string SqlagWorkLoadContainer = "SQLAGWorkLoadContainer"; public const string StorageContainer = "StorageContainer"; public const string GenericContainer = "GenericContainer"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MonthOfYear.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MonthOfYear.cs index f3831fc793c9..dcfddb103250 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MonthOfYear.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MonthOfYear.cs @@ -1,51 +1,44 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for MonthOfYear. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum MonthOfYear { - [EnumMember(Value = "Invalid")] + [System.Runtime.Serialization.EnumMember(Value = "Invalid")] Invalid, - [EnumMember(Value = "January")] + [System.Runtime.Serialization.EnumMember(Value = "January")] January, - [EnumMember(Value = "February")] + [System.Runtime.Serialization.EnumMember(Value = "February")] February, - [EnumMember(Value = "March")] + [System.Runtime.Serialization.EnumMember(Value = "March")] March, - [EnumMember(Value = "April")] + [System.Runtime.Serialization.EnumMember(Value = "April")] April, - [EnumMember(Value = "May")] + [System.Runtime.Serialization.EnumMember(Value = "May")] May, - [EnumMember(Value = "June")] + [System.Runtime.Serialization.EnumMember(Value = "June")] June, - [EnumMember(Value = "July")] + [System.Runtime.Serialization.EnumMember(Value = "July")] July, - [EnumMember(Value = "August")] + [System.Runtime.Serialization.EnumMember(Value = "August")] August, - [EnumMember(Value = "September")] + [System.Runtime.Serialization.EnumMember(Value = "September")] September, - [EnumMember(Value = "October")] + [System.Runtime.Serialization.EnumMember(Value = "October")] October, - [EnumMember(Value = "November")] + [System.Runtime.Serialization.EnumMember(Value = "November")] November, - [EnumMember(Value = "December")] + [System.Runtime.Serialization.EnumMember(Value = "December")] December } internal static class MonthOfYearEnumExtension @@ -54,7 +47,6 @@ internal static string ToSerializedValue(this MonthOfYear? value) { return value == null ? null : ((MonthOfYear)value).ToSerializedValue(); } - internal static string ToSerializedValue(this MonthOfYear value) { switch( value ) @@ -88,7 +80,6 @@ internal static string ToSerializedValue(this MonthOfYear value) } return null; } - internal static MonthOfYear? ParseMonthOfYear(this string value) { switch( value ) @@ -123,4 +114,4 @@ internal static string ToSerializedValue(this MonthOfYear value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MonthlyRetentionSchedule.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MonthlyRetentionSchedule.cs index 1968a0e8569d..1764d74c5cd9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MonthlyRetentionSchedule.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MonthlyRetentionSchedule.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,24 +23,29 @@ public MonthlyRetentionSchedule() /// /// Initializes a new instance of the MonthlyRetentionSchedule class. /// - /// Retention schedule format - /// type for monthly retention policy. Possible values include: - /// 'Invalid', 'Daily', 'Weekly' - /// Daily retention format for - /// monthly retention policy. - /// Weekly retention format for - /// monthly retention policy. - /// Retention times of retention - /// policy. - /// Retention duration of retention - /// Policy. - public MonthlyRetentionSchedule(string retentionScheduleFormatType = default(string), DailyRetentionFormat retentionScheduleDaily = default(DailyRetentionFormat), WeeklyRetentionFormat retentionScheduleWeekly = default(WeeklyRetentionFormat), IList retentionTimes = default(IList), RetentionDuration retentionDuration = default(RetentionDuration)) + + /// Retention schedule format type for monthly retention policy. + /// Possible values include: 'Invalid', 'Daily', 'Weekly' + + /// Daily retention format for monthly retention policy. + /// + + /// Weekly retention format for monthly retention policy. + /// + + /// Retention times of retention policy. + /// + + /// Retention duration of retention Policy. + /// + public MonthlyRetentionSchedule(string retentionScheduleFormatType = default(string), DailyRetentionFormat retentionScheduleDaily = default(DailyRetentionFormat), WeeklyRetentionFormat retentionScheduleWeekly = default(WeeklyRetentionFormat), System.Collections.Generic.IList retentionTimes = default(System.Collections.Generic.IList), RetentionDuration retentionDuration = default(RetentionDuration)) + { - RetentionScheduleFormatType = retentionScheduleFormatType; - RetentionScheduleDaily = retentionScheduleDaily; - RetentionScheduleWeekly = retentionScheduleWeekly; - RetentionTimes = retentionTimes; - RetentionDuration = retentionDuration; + this.RetentionScheduleFormatType = retentionScheduleFormatType; + this.RetentionScheduleDaily = retentionScheduleDaily; + this.RetentionScheduleWeekly = retentionScheduleWeekly; + this.RetentionTimes = retentionTimes; + this.RetentionDuration = retentionDuration; CustomInit(); } @@ -57,36 +54,35 @@ public MonthlyRetentionSchedule() /// partial void CustomInit(); + /// - /// Gets or sets retention schedule format type for monthly retention - /// policy. Possible values include: 'Invalid', 'Daily', 'Weekly' + /// Gets or sets retention schedule format type for monthly retention policy. Possible values include: 'Invalid', 'Daily', 'Weekly' /// - [JsonProperty(PropertyName = "retentionScheduleFormatType")] - public string RetentionScheduleFormatType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionScheduleFormatType")] + public string RetentionScheduleFormatType {get; set; } /// /// Gets or sets daily retention format for monthly retention policy. /// - [JsonProperty(PropertyName = "retentionScheduleDaily")] - public DailyRetentionFormat RetentionScheduleDaily { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionScheduleDaily")] + public DailyRetentionFormat RetentionScheduleDaily {get; set; } /// /// Gets or sets weekly retention format for monthly retention policy. /// - [JsonProperty(PropertyName = "retentionScheduleWeekly")] - public WeeklyRetentionFormat RetentionScheduleWeekly { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionScheduleWeekly")] + public WeeklyRetentionFormat RetentionScheduleWeekly {get; set; } /// /// Gets or sets retention times of retention policy. /// - [JsonProperty(PropertyName = "retentionTimes")] - public IList RetentionTimes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionTimes")] + public System.Collections.Generic.IList RetentionTimes {get; set; } /// /// Gets or sets retention duration of retention Policy. /// - [JsonProperty(PropertyName = "retentionDuration")] - public RetentionDuration RetentionDuration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionDuration")] + public RetentionDuration RetentionDuration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MoveRPAcrossTiersRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MoveRPAcrossTiersRequest.cs index 3935a72b0349..8b4894f58c6c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MoveRPAcrossTiersRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/MoveRPAcrossTiersRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; public partial class MoveRPAcrossTiersRequest @@ -26,18 +20,21 @@ public MoveRPAcrossTiersRequest() /// /// Initializes a new instance of the MoveRPAcrossTiersRequest class. /// - /// Gets the class type. - /// Source tier from where RP needs to be - /// moved. Possible values include: 'Invalid', 'InstantRP', - /// 'HardenedRP', 'ArchivedRP' - /// Target tier where RP needs to be - /// moved. Possible values include: 'Invalid', 'InstantRP', - /// 'HardenedRP', 'ArchivedRP' + + /// Gets the class type. + /// + + /// Source tier from where RP needs to be moved + /// Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + + /// Target tier where RP needs to be moved + /// Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' public MoveRPAcrossTiersRequest(string objectType = default(string), RecoveryPointTierType? sourceTierType = default(RecoveryPointTierType?), RecoveryPointTierType? targetTierType = default(RecoveryPointTierType?)) + { - ObjectType = objectType; - SourceTierType = sourceTierType; - TargetTierType = targetTierType; + this.ObjectType = objectType; + this.SourceTierType = sourceTierType; + this.TargetTierType = targetTierType; CustomInit(); } @@ -46,25 +43,23 @@ public MoveRPAcrossTiersRequest() /// partial void CustomInit(); + /// - /// Gets the class type. + /// Gets or sets gets the class type. /// - [JsonProperty(PropertyName = "objectType")] - public string ObjectType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "objectType")] + public string ObjectType {get; set; } /// - /// Gets or sets source tier from where RP needs to be moved. Possible - /// values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + /// Gets or sets source tier from where RP needs to be moved Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' /// - [JsonProperty(PropertyName = "sourceTierType")] - public RecoveryPointTierType? SourceTierType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceTierType")] + public RecoveryPointTierType? SourceTierType {get; set; } /// - /// Gets or sets target tier where RP needs to be moved. Possible - /// values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + /// Gets or sets target tier where RP needs to be moved Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' /// - [JsonProperty(PropertyName = "targetTierType")] - public RecoveryPointTierType? TargetTierType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetTierType")] + public RecoveryPointTierType? TargetTierType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NameInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NameInfo.cs index f6321b5d7161..01e4cff4a370 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NameInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NameInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public NameInfo() /// /// Initializes a new instance of the NameInfo class. /// - /// Value of usage. - /// Localized value of usage. + + /// Value of usage. + /// + + /// Localized value of usage. + /// public NameInfo(string value = default(string), string localizedValue = default(string)) + { - Value = value; - LocalizedValue = localizedValue; + this.Value = value; + this.LocalizedValue = localizedValue; CustomInit(); } @@ -43,17 +42,17 @@ public NameInfo() /// partial void CustomInit(); + /// /// Gets or sets value of usage. /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public string Value {get; set; } /// /// Gets or sets localized value of usage. /// - [JsonProperty(PropertyName = "localizedValue")] - public string LocalizedValue { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "localizedValue")] + public string LocalizedValue {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponse.cs index 2559d2ec61ff..639ea268d21e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponse.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public NewErrorResponse() /// /// Initializes a new instance of the NewErrorResponse class. /// - /// The error object. + + /// The error object. + /// public NewErrorResponse(NewErrorResponseError error = default(NewErrorResponseError)) + { - Error = error; + this.Error = error; CustomInit(); } @@ -41,11 +38,11 @@ public NewErrorResponse() /// partial void CustomInit(); + /// /// Gets or sets the error object. /// - [JsonProperty(PropertyName = "error")] - public NewErrorResponseError Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public NewErrorResponseError Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponseError.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponseError.cs index 5180ae8876c5..54c22ac8b5f7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponseError.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponseError.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,18 +23,29 @@ public NewErrorResponseError() /// /// Initializes a new instance of the NewErrorResponseError class. /// - /// The error code. - /// The error message. - /// The error target. - /// The error details. - /// The error additional info. - public NewErrorResponseError(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList)) + + /// The error code. + /// + + /// The error message. + /// + + /// The error target. + /// + + /// The error details. + /// + + /// The error additional info. + /// + public NewErrorResponseError(string code = default(string), string message = default(string), string target = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList), System.Collections.Generic.IList additionalInfo = default(System.Collections.Generic.IList)) + { - Code = code; - Message = message; - Target = target; - Details = details; - AdditionalInfo = additionalInfo; + this.Code = code; + this.Message = message; + this.Target = target; + this.Details = details; + this.AdditionalInfo = additionalInfo; CustomInit(); } @@ -51,35 +54,35 @@ public NewErrorResponseError() /// partial void CustomInit(); + /// /// Gets the error code. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } /// /// Gets the error message. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } /// /// Gets the error target. /// - [JsonProperty(PropertyName = "target")] - public string Target { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "target")] + public string Target {get; private set; } /// /// Gets the error details. /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; private set; } /// /// Gets the error additional info. /// - [JsonProperty(PropertyName = "additionalInfo")] - public IList AdditionalInfo { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")] + public System.Collections.Generic.IList AdditionalInfo {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponseException.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponseException.cs index 24ed879e2521..132f3dc6c70c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponseException.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/NewErrorResponseException.cs @@ -1,32 +1,25 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Microsoft.Rest; /// - /// Exception thrown for an invalid response with NewErrorResponse - /// information. + /// Exception thrown for an invalid response with NewErrorResponse information. /// - public partial class NewErrorResponseException : RestException + public partial class NewErrorResponseException : Microsoft.Rest.RestException { /// /// Gets information about the associated HTTP request. /// - public HttpRequestMessageWrapper Request { get; set; } + public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; } /// /// Gets information about the associated HTTP response. /// - public HttpResponseMessageWrapper Response { get; set; } + public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; } /// /// Gets or sets the body object. @@ -41,7 +34,7 @@ public NewErrorResponseException() } /// - /// Initializes a new instance of the NewErrorResponseException class. + /// Initializes a new instance of the NewErrorResponse class. /// /// The exception message. public NewErrorResponseException(string message) @@ -50,7 +43,7 @@ public NewErrorResponseException(string message) } /// - /// Initializes a new instance of the NewErrorResponseException class. + /// Initializes a new instance of the NewErrorResponse class. /// /// The exception message. /// Inner exception. @@ -59,4 +52,4 @@ public NewErrorResponseException(string message, System.Exception innerException { } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfo.cs index e6d1fd393c45..b1c93bb3cd25 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,11 +24,13 @@ public OperationResultInfo() /// /// Initializes a new instance of the OperationResultInfo class. /// - /// List of jobs created by this - /// operation. - public OperationResultInfo(IList jobList = default(IList)) + + /// List of jobs created by this operation. + /// + public OperationResultInfo(System.Collections.Generic.IList jobList = default(System.Collections.Generic.IList)) + { - JobList = jobList; + this.JobList = jobList; CustomInit(); } @@ -45,11 +39,11 @@ public OperationResultInfo() /// partial void CustomInit(); + /// /// Gets or sets list of jobs created by this operation. /// - [JsonProperty(PropertyName = "jobList")] - public IList JobList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "jobList")] + public System.Collections.Generic.IList JobList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfoBase.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfoBase.cs index 3db0fb3593b5..0ef5a32e48b3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfoBase.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfoBase.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public OperationResultInfoBase() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfoBaseResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfoBaseResource.cs index 35661a902c33..8640299b6904 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfoBaseResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationResultInfoBaseResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class OperationResultInfoBaseResource : OperationWorkerResponse { /// - /// Initializes a new instance of the OperationResultInfoBaseResource - /// class. + /// Initializes a new instance of the OperationResultInfoBaseResource class. /// public OperationResultInfoBaseResource() { @@ -30,32 +21,34 @@ public OperationResultInfoBaseResource() } /// - /// Initializes a new instance of the OperationResultInfoBaseResource - /// class. + /// Initializes a new instance of the OperationResultInfoBaseResource class. /// + /// HTTP Status Code of the operation. - /// Possible values include: 'Continue', 'SwitchingProtocols', 'OK', - /// 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', - /// 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', - /// 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', - /// 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', - /// 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', - /// 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + /// Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', + /// 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + /// 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', + /// 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', + /// 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', + /// 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', /// 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', /// 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', /// 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', /// 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', /// 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - /// 'NotImplemented', 'BadGateway', 'ServiceUnavailable', - /// 'GatewayTimeout', 'HttpVersionNotSupported' - /// HTTP headers associated with this - /// operation. - /// OperationResultInfoBaseResource - /// operation - public OperationResultInfoBaseResource(HttpStatusCode? statusCode = default(HttpStatusCode?), IDictionary> headers = default(IDictionary>), OperationResultInfoBase operation = default(OperationResultInfoBase)) - : base(statusCode, headers) + /// 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + /// 'HttpVersionNotSupported' + + /// HTTP headers associated with this operation. + /// + + /// OperationResultInfoBaseResource operation + /// + public OperationResultInfoBaseResource(HttpStatusCode? statusCode = default(HttpStatusCode?), System.Collections.Generic.IDictionary> headers = default(System.Collections.Generic.IDictionary>), OperationResultInfoBase operation = default(OperationResultInfoBase)) + + : base(statusCode, headers) { - Operation = operation; + this.Operation = operation; CustomInit(); } @@ -64,11 +57,11 @@ public OperationResultInfoBaseResource() /// partial void CustomInit(); + /// /// Gets or sets operationResultInfoBaseResource operation /// - [JsonProperty(PropertyName = "operation")] - public OperationResultInfoBase Operation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public OperationResultInfoBase Operation {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatus.cs index a6f9a2a220b1..cf0edb2ff358 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatus.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,26 +23,38 @@ public OperationStatus() /// /// Initializes a new instance of the OperationStatus class. /// - /// ID of the operation. - /// Name of the operation. - /// Operation status. Possible values include: - /// 'Invalid', 'InProgress', 'Succeeded', 'Failed', 'Canceled' - /// Operation start time. Format: - /// ISO-8601. - /// Operation end time. Format: ISO-8601. - /// Error information related to this - /// operation. - /// Additional information associated with - /// this operation. + + /// ID of the operation. + /// + + /// Name of the operation. + /// + + /// Operation status. + /// Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', + /// 'Canceled' + + /// Operation start time. Format: ISO-8601. + /// + + /// Operation end time. Format: ISO-8601. + /// + + /// Error information related to this operation. + /// + + /// Additional information associated with this operation. + /// public OperationStatus(string id = default(string), string name = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), OperationStatusError error = default(OperationStatusError), OperationStatusExtendedInfo properties = default(OperationStatusExtendedInfo)) + { - Id = id; - Name = name; - Status = status; - StartTime = startTime; - EndTime = endTime; - Error = error; - Properties = properties; + this.Id = id; + this.Name = name; + this.Status = status; + this.StartTime = startTime; + this.EndTime = endTime; + this.Error = error; + this.Properties = properties; CustomInit(); } @@ -57,48 +63,47 @@ public OperationStatus() /// partial void CustomInit(); + /// - /// Gets or sets ID of the operation. + /// Gets or sets iD of the operation. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets name of the operation. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// - /// Gets or sets operation status. Possible values include: 'Invalid', - /// 'InProgress', 'Succeeded', 'Failed', 'Canceled' + /// Gets or sets operation status. Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', 'Canceled' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets operation start time. Format: ISO-8601. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets operation end time. Format: ISO-8601. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets error information related to this operation. /// - [JsonProperty(PropertyName = "error")] - public OperationStatusError Error { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public OperationStatusError Error {get; set; } /// /// Gets or sets additional information associated with this operation. /// - [JsonProperty(PropertyName = "properties")] - public OperationStatusExtendedInfo Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public OperationStatusExtendedInfo Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusError.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusError.cs index 47f83321c96b..b5492c278ad6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusError.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusError.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public OperationStatusError() /// /// Initializes a new instance of the OperationStatusError class. /// - /// Error code of the operation failure. - /// Error message displayed if the operation - /// failure. + + /// Error code of the operation failure. + /// + + /// Error message displayed if the operation failure. + /// public OperationStatusError(string code = default(string), string message = default(string)) + { - Code = code; - Message = message; + this.Code = code; + this.Message = message; CustomInit(); } @@ -44,17 +42,17 @@ public OperationStatusError() /// partial void CustomInit(); + /// /// Gets or sets error code of the operation failure. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } /// /// Gets or sets error message displayed if the operation failure. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusExtendedInfo.cs index ba7c29f70d49..c2655457c3a9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class OperationStatusExtendedInfo { /// - /// Initializes a new instance of the OperationStatusExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusExtendedInfo class. /// public OperationStatusExtendedInfo() { @@ -35,4 +28,4 @@ public OperationStatusExtendedInfo() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusJobExtendedInfo.cs index 9ba043e02247..f8d9264668c5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusJobExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class OperationStatusJobExtendedInfo : OperationStatusExtendedInfo { /// - /// Initializes a new instance of the OperationStatusJobExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusJobExtendedInfo class. /// public OperationStatusJobExtendedInfo() { @@ -29,14 +22,15 @@ public OperationStatusJobExtendedInfo() } /// - /// Initializes a new instance of the OperationStatusJobExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusJobExtendedInfo class. /// - /// ID of the job created for this protected - /// item. + + /// ID of the job created for this protected item. + /// public OperationStatusJobExtendedInfo(string jobId = default(string)) + { - JobId = jobId; + this.JobId = jobId; CustomInit(); } @@ -45,11 +39,11 @@ public OperationStatusJobExtendedInfo() /// partial void CustomInit(); + /// - /// Gets or sets ID of the job created for this protected item. + /// Gets or sets iD of the job created for this protected item. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusJobsExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusJobsExtendedInfo.cs index 89aa5d21446d..9df0491f8ceb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusJobsExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusJobsExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class OperationStatusJobsExtendedInfo : OperationStatusExtendedInfo { /// - /// Initializes a new instance of the OperationStatusJobsExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusJobsExtendedInfo class. /// public OperationStatusJobsExtendedInfo() { @@ -31,17 +22,19 @@ public OperationStatusJobsExtendedInfo() } /// - /// Initializes a new instance of the OperationStatusJobsExtendedInfo - /// class. + /// Initializes a new instance of the OperationStatusJobsExtendedInfo class. /// - /// IDs of the jobs created for the protected - /// item. - /// Stores all the failed jobs along with - /// the corresponding error codes. - public OperationStatusJobsExtendedInfo(IList jobIds = default(IList), IDictionary failedJobsError = default(IDictionary)) + + /// IDs of the jobs created for the protected item. + /// + + /// Stores all the failed jobs along with the corresponding error codes. + /// + public OperationStatusJobsExtendedInfo(System.Collections.Generic.IList jobIds = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary failedJobsError = default(System.Collections.Generic.IDictionary)) + { - JobIds = jobIds; - FailedJobsError = failedJobsError; + this.JobIds = jobIds; + this.FailedJobsError = failedJobsError; CustomInit(); } @@ -50,18 +43,18 @@ public OperationStatusJobsExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets iDs of the jobs created for the protected item. /// - [JsonProperty(PropertyName = "jobIds")] - public IList JobIds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobIds")] + public System.Collections.Generic.IList JobIds {get; set; } /// - /// Gets or sets stores all the failed jobs along with the - /// corresponding error codes. + /// Gets or sets stores all the failed jobs along with the corresponding error + /// codes. /// - [JsonProperty(PropertyName = "failedJobsError")] - public IDictionary FailedJobsError { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "failedJobsError")] + public System.Collections.Generic.IDictionary FailedJobsError {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusProvisionILRExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusProvisionILRExtendedInfo.cs index 93c4425ac725..5d747a176714 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusProvisionILRExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusProvisionILRExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class OperationStatusProvisionILRExtendedInfo : OperationStatusExtendedInfo { /// - /// Initializes a new instance of the - /// OperationStatusProvisionILRExtendedInfo class. + /// Initializes a new instance of the OperationStatusProvisionILRExtendedInfo class. /// public OperationStatusProvisionILRExtendedInfo() { @@ -29,14 +22,15 @@ public OperationStatusProvisionILRExtendedInfo() } /// - /// Initializes a new instance of the - /// OperationStatusProvisionILRExtendedInfo class. + /// Initializes a new instance of the OperationStatusProvisionILRExtendedInfo class. /// - /// Target details for file / folder - /// restore. + + /// Target details for file / folder restore. + /// public OperationStatusProvisionILRExtendedInfo(InstantItemRecoveryTarget recoveryTarget = default(InstantItemRecoveryTarget)) + { - RecoveryTarget = recoveryTarget; + this.RecoveryTarget = recoveryTarget; CustomInit(); } @@ -45,11 +39,11 @@ public OperationStatusProvisionILRExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets target details for file / folder restore. /// - [JsonProperty(PropertyName = "recoveryTarget")] - public InstantItemRecoveryTarget RecoveryTarget { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryTarget")] + public InstantItemRecoveryTarget RecoveryTarget {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusValidateOperationExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusValidateOperationExtendedInfo.cs index 2d7b80006b23..55562859edeb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusValidateOperationExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusValidateOperationExtendedInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class OperationStatusValidateOperationExtendedInfo : OperationStatusExtendedInfo { /// - /// Initializes a new instance of the - /// OperationStatusValidateOperationExtendedInfo class. + /// Initializes a new instance of the OperationStatusValidateOperationExtendedInfo class. /// public OperationStatusValidateOperationExtendedInfo() { @@ -29,14 +22,15 @@ public OperationStatusValidateOperationExtendedInfo() } /// - /// Initializes a new instance of the - /// OperationStatusValidateOperationExtendedInfo class. + /// Initializes a new instance of the OperationStatusValidateOperationExtendedInfo class. /// - /// Gets the validation - /// operation response + + /// Gets the validation operation response + /// public OperationStatusValidateOperationExtendedInfo(ValidateOperationResponse validateOperationResponse = default(ValidateOperationResponse)) + { - ValidateOperationResponse = validateOperationResponse; + this.ValidateOperationResponse = validateOperationResponse; CustomInit(); } @@ -45,11 +39,11 @@ public OperationStatusValidateOperationExtendedInfo() /// partial void CustomInit(); + /// - /// Gets the validation operation response + /// Gets or sets gets the validation operation response /// - [JsonProperty(PropertyName = "validateOperationResponse")] - public ValidateOperationResponse ValidateOperationResponse { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "validateOperationResponse")] + public ValidateOperationResponse ValidateOperationResponse {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusValues.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusValues.cs index deae35f3248e..2db1f63ed912 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusValues.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationStatusValues.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for OperationStatusValues. /// + + public static class OperationStatusValues { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class OperationStatusValues public const string Failed = "Failed"; public const string Canceled = "Canceled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationType.cs index 0172814ee483..8c70d94d60b7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for OperationType. /// + + public static class OperationType { public const string Invalid = "Invalid"; public const string Register = "Register"; public const string Reregister = "Reregister"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationWorkerResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationWorkerResponse.cs index 935178db42d5..036a8d3abd17 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationWorkerResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OperationWorkerResponse.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,27 +23,29 @@ public OperationWorkerResponse() /// /// Initializes a new instance of the OperationWorkerResponse class. /// + /// HTTP Status Code of the operation. - /// Possible values include: 'Continue', 'SwitchingProtocols', 'OK', - /// 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', - /// 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', - /// 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', - /// 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', - /// 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', - /// 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', + /// Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', + /// 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', + /// 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', + /// 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', + /// 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', + /// 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', /// 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', /// 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', /// 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', /// 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', /// 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - /// 'NotImplemented', 'BadGateway', 'ServiceUnavailable', - /// 'GatewayTimeout', 'HttpVersionNotSupported' - /// HTTP headers associated with this - /// operation. - public OperationWorkerResponse(HttpStatusCode? statusCode = default(HttpStatusCode?), IDictionary> headers = default(IDictionary>)) + /// 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', + /// 'HttpVersionNotSupported' + + /// HTTP headers associated with this operation. + /// + public OperationWorkerResponse(HttpStatusCode? statusCode = default(HttpStatusCode?), System.Collections.Generic.IDictionary> headers = default(System.Collections.Generic.IDictionary>)) + { - StatusCode = statusCode; - Headers = headers; + this.StatusCode = statusCode; + this.Headers = headers; CustomInit(); } @@ -60,31 +54,17 @@ public OperationWorkerResponse() /// partial void CustomInit(); + /// - /// Gets or sets HTTP Status Code of the operation. Possible values - /// include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', - /// 'Accepted', 'NonAuthoritativeInformation', 'NoContent', - /// 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', - /// 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', - /// 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', - /// 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', - /// 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', - /// 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', - /// 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', - /// 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', - /// 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', - /// 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', - /// 'NotImplemented', 'BadGateway', 'ServiceUnavailable', - /// 'GatewayTimeout', 'HttpVersionNotSupported' + /// Gets or sets hTTP Status Code of the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HttpVersionNotSupported' /// - [JsonProperty(PropertyName = "statusCode")] - public HttpStatusCode? StatusCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "statusCode")] + public HttpStatusCode? StatusCode {get; set; } /// - /// Gets or sets HTTP headers associated with this operation. + /// Gets or sets hTTP headers associated with this operation. /// - [JsonProperty(PropertyName = "headers")] - public IDictionary> Headers { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "headers")] + public System.Collections.Generic.IDictionary> Headers {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OverwriteOptions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OverwriteOptions.cs index eff5571d5360..fa8294fa0855 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OverwriteOptions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/OverwriteOptions.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for OverwriteOptions. /// + + public static class OverwriteOptions { public const string Invalid = "Invalid"; public const string FailOnConflict = "FailOnConflict"; public const string Overwrite = "Overwrite"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Page.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Page.cs index 120229a5943a..b96455f13bcc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Page.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Page.cs @@ -1,53 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; /// /// Defines a page in Azure responses. /// /// Type of the page content items - [JsonObject] - public class Page : IPage + [Newtonsoft.Json.JsonObject] + public class Page : Microsoft.Rest.Azure.IPage { - /// - /// Gets the link to the next page. - /// - [JsonProperty("nextLink")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("nextLink")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Page1.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Page1.cs index 131bec874574..cd2eedfc063f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Page1.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Page1.cs @@ -1,53 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; /// /// Defines a page in Azure responses. /// /// Type of the page content items - [JsonObject] - public class Page1 : IPage + [Newtonsoft.Json.JsonObject] + public class Page1 : Microsoft.Rest.Azure.IPage { - /// - /// Gets the link to the next page. - /// - [JsonProperty("")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PointInTimeRange.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PointInTimeRange.cs index 84416c51f2ad..7ad62ed0060c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PointInTimeRange.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PointInTimeRange.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,17 @@ public PointInTimeRange() /// /// Initializes a new instance of the PointInTimeRange class. /// - /// Start time of the time range for log - /// recovery. - /// End time of the time range for log - /// recovery. + + /// Start time of the time range for log recovery. + /// + + /// End time of the time range for log recovery. + /// public PointInTimeRange(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?)) + { - StartTime = startTime; - EndTime = endTime; + this.StartTime = startTime; + this.EndTime = endTime; CustomInit(); } @@ -45,17 +42,17 @@ public PointInTimeRange() /// partial void CustomInit(); + /// /// Gets or sets start time of the time range for log recovery. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets end time of the time range for log recovery. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PolicyType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PolicyType.cs index 0d6a54c09ecb..b7ae88d5be83 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PolicyType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PolicyType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for PolicyType. /// + + public static class PolicyType { public const string Invalid = "Invalid"; @@ -25,4 +22,4 @@ public static class PolicyType public const string SnapshotFull = "SnapshotFull"; public const string SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreBackupValidation.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreBackupValidation.cs index 9e2060d59eba..3323fd6c70ee 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreBackupValidation.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreBackupValidation.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,21 @@ public PreBackupValidation() /// /// Initializes a new instance of the PreBackupValidation class. /// - /// Status of protectable item, i.e. - /// InProgress,Succeeded,Failed. Possible values include: 'Invalid', - /// 'Success', 'Failed' - /// Error code of protectable item - /// Message corresponding to the error code for - /// the protectable item + + /// Status of protectable item, i.e. InProgress,Succeeded,Failed + /// Possible values include: 'Invalid', 'Success', 'Failed' + + /// Error code of protectable item + /// + + /// Message corresponding to the error code for the protectable item + /// public PreBackupValidation(string status = default(string), string code = default(string), string message = default(string)) + { - Status = status; - Code = code; - Message = message; + this.Status = status; + this.Code = code; + this.Message = message; CustomInit(); } @@ -48,26 +46,24 @@ public PreBackupValidation() /// partial void CustomInit(); + /// - /// Gets or sets status of protectable item, i.e. - /// InProgress,Succeeded,Failed. Possible values include: 'Invalid', - /// 'Success', 'Failed' + /// Gets or sets status of protectable item, i.e. InProgress,Succeeded,Failed Possible values include: 'Invalid', 'Success', 'Failed' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets error code of protectable item /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } /// - /// Gets or sets message corresponding to the error code for the - /// protectable item + /// Gets or sets message corresponding to the error code for the protectable + /// item /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreValidateEnableBackupRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreValidateEnableBackupRequest.cs index bef073f4e584..c2cc2201b64c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreValidateEnableBackupRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreValidateEnableBackupRequest.cs @@ -1,21 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Contract to validate if backup can be enabled on the given resource in - /// a given vault and given configuration. + /// Contract to validate if backup can be enabled on the given resource in a + /// given vault and given configuration. /// It will validate followings /// 1. Vault capacity /// 2. VM is already protected @@ -24,8 +18,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class PreValidateEnableBackupRequest { /// - /// Initializes a new instance of the PreValidateEnableBackupRequest - /// class. + /// Initializes a new instance of the PreValidateEnableBackupRequest class. /// public PreValidateEnableBackupRequest() { @@ -33,25 +26,30 @@ public PreValidateEnableBackupRequest() } /// - /// Initializes a new instance of the PreValidateEnableBackupRequest - /// class. + /// Initializes a new instance of the PreValidateEnableBackupRequest class. /// - /// ProtectedItem Type- VM, SqlDataBase, - /// AzureFileShare etc. Possible values include: 'Invalid', 'VM', - /// 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', - /// 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', - /// 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + + /// ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', /// 'SAPAseDatabase', 'SAPHanaDBInstance' - /// ARM Virtual Machine Id - /// ARM id of the Recovery Services Vault - /// Configuration of VM if any needs to be - /// validated like OS type etc + + /// ARM Virtual Machine Id + /// + + /// ARM id of the Recovery Services Vault + /// + + /// Configuration of VM if any needs to be validated like OS type etc + /// public PreValidateEnableBackupRequest(string resourceType = default(string), string resourceId = default(string), string vaultId = default(string), string properties = default(string)) + { - ResourceType = resourceType; - ResourceId = resourceId; - VaultId = vaultId; - Properties = properties; + this.ResourceType = resourceType; + this.ResourceId = resourceId; + this.VaultId = vaultId; + this.Properties = properties; CustomInit(); } @@ -60,35 +58,30 @@ public PreValidateEnableBackupRequest() /// partial void CustomInit(); + /// - /// Gets or sets protectedItem Type- VM, SqlDataBase, AzureFileShare - /// etc. Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' + /// Gets or sets protectedItem Type- VM, SqlDataBase, AzureFileShare etc Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "resourceType")] - public string ResourceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceType")] + public string ResourceType {get; set; } /// - /// Gets or sets ARM Virtual Machine Id + /// Gets or sets aRM Virtual Machine Id /// - [JsonProperty(PropertyName = "resourceId")] - public string ResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceId")] + public string ResourceId {get; set; } /// - /// Gets or sets ARM id of the Recovery Services Vault + /// Gets or sets aRM id of the Recovery Services Vault /// - [JsonProperty(PropertyName = "vaultId")] - public string VaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vaultId")] + public string VaultId {get; set; } /// - /// Gets or sets configuration of VM if any needs to be validated like - /// OS type etc + /// Gets or sets configuration of VM if any needs to be validated like OS type + /// etc /// - [JsonProperty(PropertyName = "properties")] - public string Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public string Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreValidateEnableBackupResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreValidateEnableBackupResponse.cs index 8d201e0d8044..14bce786c22e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreValidateEnableBackupResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PreValidateEnableBackupResponse.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class PreValidateEnableBackupResponse { /// - /// Initializes a new instance of the PreValidateEnableBackupResponse - /// class. + /// Initializes a new instance of the PreValidateEnableBackupResponse class. /// public PreValidateEnableBackupResponse() { @@ -28,29 +21,38 @@ public PreValidateEnableBackupResponse() } /// - /// Initializes a new instance of the PreValidateEnableBackupResponse - /// class. + /// Initializes a new instance of the PreValidateEnableBackupResponse class. /// - /// Validation Status. Possible values include: - /// 'Invalid', 'Succeeded', 'Failed' - /// Response error code - /// Response error message - /// Recommended action for user - /// Specifies the product specific - /// container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. - /// This is required - /// for portal - /// Specifies the product specific ds - /// name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for - /// portal + + /// Validation Status + /// Possible values include: 'Invalid', 'Succeeded', 'Failed' + + /// Response error code + /// + + /// Response error message + /// + + /// Recommended action for user + /// + + /// Specifies the product specific container name. E.g. + /// iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + /// for portal + /// + + /// Specifies the product specific ds name. E.g. + /// vm;iaasvmcontainer;rgname;vmname. This is required for portal + /// public PreValidateEnableBackupResponse(string status = default(string), string errorCode = default(string), string errorMessage = default(string), string recommendation = default(string), string containerName = default(string), string protectedItemName = default(string)) + { - Status = status; - ErrorCode = errorCode; - ErrorMessage = errorMessage; - Recommendation = recommendation; - ContainerName = containerName; - ProtectedItemName = protectedItemName; + this.Status = status; + this.ErrorCode = errorCode; + this.ErrorMessage = errorMessage; + this.Recommendation = recommendation; + this.ContainerName = containerName; + this.ProtectedItemName = protectedItemName; CustomInit(); } @@ -59,45 +61,44 @@ public PreValidateEnableBackupResponse() /// partial void CustomInit(); + /// - /// Gets or sets validation Status. Possible values include: 'Invalid', - /// 'Succeeded', 'Failed' + /// Gets or sets validation Status Possible values include: 'Invalid', 'Succeeded', 'Failed' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets response error code /// - [JsonProperty(PropertyName = "errorCode")] - public string ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public string ErrorCode {get; set; } /// /// Gets or sets response error message /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; set; } /// /// Gets or sets recommended action for user /// - [JsonProperty(PropertyName = "recommendation")] - public string Recommendation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendation")] + public string Recommendation {get; set; } /// /// Gets or sets specifies the product specific container name. E.g. /// iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required /// for portal /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets specifies the product specific ds name. E.g. /// vm;iaasvmcontainer;rgname;vmname. This is required for portal /// - [JsonProperty(PropertyName = "protectedItemName")] - public string ProtectedItemName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemName")] + public string ProtectedItemName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrepareDataMoveRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrepareDataMoveRequest.cs index ccaf37f9c844..b09731b35842 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrepareDataMoveRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrepareDataMoveRequest.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,22 +23,30 @@ public PrepareDataMoveRequest() /// /// Initializes a new instance of the PrepareDataMoveRequest class. /// - /// ARM Id of target vault - /// Target Region - /// DataMove Level. Possible values - /// include: 'Invalid', 'Vault', 'Container' + + /// ARM Id of target vault + /// + + /// Target Region + /// + + /// DataMove Level + /// Possible values include: 'Invalid', 'Vault', 'Container' + /// Source Container ArmIds - /// This needs to be populated only if DataMoveLevel is set to - /// container - /// Ignore the artifacts which are already - /// moved. - public PrepareDataMoveRequest(string targetResourceId, string targetRegion, string dataMoveLevel, IList sourceContainerArmIds = default(IList), bool? ignoreMoved = default(bool?)) + /// This needs to be populated only if DataMoveLevel is set to container + /// + + /// Ignore the artifacts which are already moved. + /// + public PrepareDataMoveRequest(string targetResourceId, string targetRegion, string dataMoveLevel, System.Collections.Generic.IList sourceContainerArmIds = default(System.Collections.Generic.IList), bool? ignoreMoved = default(bool?)) + { - TargetResourceId = targetResourceId; - TargetRegion = targetRegion; - DataMoveLevel = dataMoveLevel; - SourceContainerArmIds = sourceContainerArmIds; - IgnoreMoved = ignoreMoved; + this.TargetResourceId = targetResourceId; + this.TargetRegion = targetRegion; + this.DataMoveLevel = dataMoveLevel; + this.SourceContainerArmIds = sourceContainerArmIds; + this.IgnoreMoved = ignoreMoved; CustomInit(); } @@ -56,59 +55,61 @@ public PrepareDataMoveRequest() /// partial void CustomInit(); + /// - /// Gets or sets ARM Id of target vault + /// Gets or sets aRM Id of target vault /// - [JsonProperty(PropertyName = "targetResourceId")] - public string TargetResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceId")] + public string TargetResourceId {get; set; } /// /// Gets or sets target Region /// - [JsonProperty(PropertyName = "targetRegion")] - public string TargetRegion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetRegion")] + public string TargetRegion {get; set; } /// - /// Gets or sets dataMove Level. Possible values include: 'Invalid', - /// 'Vault', 'Container' + /// Gets or sets dataMove Level Possible values include: 'Invalid', 'Vault', 'Container' /// - [JsonProperty(PropertyName = "dataMoveLevel")] - public string DataMoveLevel { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataMoveLevel")] + public string DataMoveLevel {get; set; } /// /// Gets or sets source Container ArmIds - /// This needs to be populated only if DataMoveLevel is set to - /// container + /// This needs to be populated only if DataMoveLevel is set to container /// - [JsonProperty(PropertyName = "sourceContainerArmIds")] - public IList SourceContainerArmIds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceContainerArmIds")] + public System.Collections.Generic.IList SourceContainerArmIds {get; set; } /// /// Gets or sets ignore the artifacts which are already moved. /// - [JsonProperty(PropertyName = "ignoreMoved")] - public bool? IgnoreMoved { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "ignoreMoved")] + public bool? IgnoreMoved {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (TargetResourceId == null) + if (this.TargetResourceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetResourceId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetResourceId"); } - if (TargetRegion == null) + if (this.TargetRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetRegion"); } - if (DataMoveLevel == null) + if (this.DataMoveLevel == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DataMoveLevel"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DataMoveLevel"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrepareDataMoveResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrepareDataMoveResponse.cs index 022d41e4817a..d7f1278416fb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrepareDataMoveResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrepareDataMoveResponse.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,13 +24,17 @@ public PrepareDataMoveResponse() /// /// Initializes a new instance of the PrepareDataMoveResponse class. /// - /// Co-relationId for move - /// operation - /// Source Vault Properties - public PrepareDataMoveResponse(string correlationId = default(string), IDictionary sourceVaultProperties = default(IDictionary)) + + /// Co-relationId for move operation + /// + + /// Source Vault Properties + /// + public PrepareDataMoveResponse(string correlationId = default(string), System.Collections.Generic.IDictionary sourceVaultProperties = default(System.Collections.Generic.IDictionary)) + { - CorrelationId = correlationId; - SourceVaultProperties = sourceVaultProperties; + this.CorrelationId = correlationId; + this.SourceVaultProperties = sourceVaultProperties; CustomInit(); } @@ -47,17 +43,17 @@ public PrepareDataMoveResponse() /// partial void CustomInit(); + /// /// Gets or sets co-relationId for move operation /// - [JsonProperty(PropertyName = "correlationId")] - public string CorrelationId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "correlationId")] + public string CorrelationId {get; set; } /// /// Gets or sets source Vault Properties /// - [JsonProperty(PropertyName = "sourceVaultProperties")] - public IDictionary SourceVaultProperties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceVaultProperties")] + public System.Collections.Generic.IDictionary SourceVaultProperties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpoint.cs index d0d6c1d24919..66164d260be2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +24,13 @@ public PrivateEndpoint() /// /// Initializes a new instance of the PrivateEndpoint class. /// - /// Gets or sets id + + /// Gets or sets id + /// public PrivateEndpoint(string id = default(string)) + { - Id = id; + this.Id = id; CustomInit(); } @@ -42,11 +39,11 @@ public PrivateEndpoint() /// partial void CustomInit(); + /// - /// Gets or sets id + /// Gets or sets gets or sets id /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnection.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnection.cs index 3c05f11baaa2..250ddc23561f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnection.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnection.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,22 @@ public PrivateEndpointConnection() /// /// 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' - /// Gets or sets private endpoint - /// associated with the private endpoint connection - /// Gets or sets - /// private link service connection state + + /// Gets or sets provisioning state of the private endpoint connection + /// Possible values include: 'Succeeded', 'Deleting', 'Failed', 'Pending' + + /// Gets or sets private endpoint associated with the private endpoint + /// connection + /// + + /// Gets or sets private link service connection state + /// public PrivateEndpointConnection(string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState)) + { - ProvisioningState = provisioningState; - PrivateEndpoint = privateEndpoint; - PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + this.ProvisioningState = provisioningState; + this.PrivateEndpoint = privateEndpoint; + this.PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; CustomInit(); } @@ -49,26 +47,25 @@ public PrivateEndpointConnection() /// partial void CustomInit(); + /// - /// Gets or sets provisioning state of the private endpoint connection. - /// Possible values include: 'Succeeded', 'Deleting', 'Failed', - /// 'Pending' + /// Gets or sets gets or sets provisioning state of the private endpoint + /// connection Possible values include: 'Succeeded', 'Deleting', 'Failed', 'Pending' /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; set; } /// - /// Gets or sets private endpoint associated with the private endpoint - /// connection + /// Gets or sets gets or sets private endpoint associated with the private + /// endpoint connection /// - [JsonProperty(PropertyName = "privateEndpoint")] - public PrivateEndpoint PrivateEndpoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpoint")] + public PrivateEndpoint PrivateEndpoint {get; set; } /// - /// Gets or sets private link service connection state + /// Gets or sets gets or sets private link service connection state /// - [JsonProperty(PropertyName = "privateLinkServiceConnectionState")] - public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnectionResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnectionResource.cs index 635f1f0adb94..6dd39a362497 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnectionResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnectionResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class PrivateEndpointConnectionResource : Resource { /// - /// Initializes a new instance of the PrivateEndpointConnectionResource - /// class. + /// Initializes a new instance of the PrivateEndpointConnectionResource class. /// public PrivateEndpointConnectionResource() { @@ -30,24 +21,35 @@ public PrivateEndpointConnectionResource() } /// - /// Initializes a new instance of the PrivateEndpointConnectionResource - /// class. + /// Initializes a new instance of the PrivateEndpointConnectionResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// PrivateEndpointConnectionResource - /// properties - public PrivateEndpointConnectionResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), PrivateEndpointConnection properties = default(PrivateEndpointConnection)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// PrivateEndpointConnectionResource properties + /// + public PrivateEndpointConnectionResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), PrivateEndpointConnection properties = default(PrivateEndpointConnection)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -56,11 +58,11 @@ public PrivateEndpointConnectionResource() /// partial void CustomInit(); + /// /// Gets or sets privateEndpointConnectionResource properties /// - [JsonProperty(PropertyName = "properties")] - public PrivateEndpointConnection Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public PrivateEndpointConnection Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnectionStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnectionStatus.cs index afec61ab3d8e..559bfb3d95d3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnectionStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateEndpointConnectionStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for PrivateEndpointConnectionStatus. /// + + public static class PrivateEndpointConnectionStatus { public const string Pending = "Pending"; @@ -21,4 +18,4 @@ public static class PrivateEndpointConnectionStatus public const string Rejected = "Rejected"; public const string Disconnected = "Disconnected"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs index b12ab9d7ea59..83f98ec1fa97 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class PrivateLinkServiceConnectionState { /// - /// Initializes a new instance of the PrivateLinkServiceConnectionState - /// class. + /// Initializes a new instance of the PrivateLinkServiceConnectionState class. /// public PrivateLinkServiceConnectionState() { @@ -28,18 +21,23 @@ public PrivateLinkServiceConnectionState() } /// - /// Initializes a new instance of the PrivateLinkServiceConnectionState - /// class. + /// 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 + + /// 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 actionRequired = default(string)) + { - Status = status; - Description = description; - ActionRequired = actionRequired; + this.Status = status; + this.Description = description; + this.ActionRequired = actionRequired; CustomInit(); } @@ -48,24 +46,23 @@ public PrivateLinkServiceConnectionState() /// partial void CustomInit(); + /// - /// Gets or sets the status. Possible values include: 'Pending', - /// 'Approved', 'Rejected', 'Disconnected' + /// Gets or sets gets or sets the status Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// - /// Gets or sets description + /// Gets or sets gets or sets description /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } /// - /// Gets or sets actions required + /// Gets or sets gets or sets actions required /// - [JsonProperty(PropertyName = "actionRequired")] - public string ActionRequired { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "actionRequired")] + public string ActionRequired {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainer.cs index 75b206a3ed50..7f3c3b3c7463 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,21 +24,27 @@ public ProtectableContainer() /// /// Initializes a new instance of the ProtectableContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of health of the - /// container. - /// Fabric Id of the container such as ARM - /// Id. + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of health of the container. + /// + + /// Fabric Id of the container such as ARM Id. + /// public ProtectableContainer(string friendlyName = default(string), string backupManagementType = default(string), string healthStatus = default(string), string containerId = default(string)) + { - FriendlyName = friendlyName; - BackupManagementType = backupManagementType; - HealthStatus = healthStatus; - ContainerId = containerId; + this.FriendlyName = friendlyName; + this.BackupManagementType = backupManagementType; + this.HealthStatus = healthStatus; + this.ContainerId = containerId; CustomInit(); } @@ -53,32 +53,29 @@ public ProtectableContainer() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the container. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets type of backup management for the container. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets type of backup management for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// /// Gets or sets status of health of the container. /// - [JsonProperty(PropertyName = "healthStatus")] - public string HealthStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthStatus")] + public string HealthStatus {get; set; } /// /// Gets or sets fabric Id of the container such as ARM Id. /// - [JsonProperty(PropertyName = "containerId")] - public string ContainerId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "containerId")] + public string ContainerId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainerResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainerResource.cs index 70230fc2d285..665a02c215c1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainerResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainerResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ProtectableContainerResource : Resource { /// - /// Initializes a new instance of the ProtectableContainerResource - /// class. + /// Initializes a new instance of the ProtectableContainerResource class. /// public ProtectableContainerResource() { @@ -30,24 +21,35 @@ public ProtectableContainerResource() } /// - /// Initializes a new instance of the ProtectableContainerResource - /// class. + /// Initializes a new instance of the ProtectableContainerResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// ProtectableContainerResource - /// properties - public ProtectableContainerResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), ProtectableContainer properties = default(ProtectableContainer)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// ProtectableContainerResource properties + /// + public ProtectableContainerResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), ProtectableContainer properties = default(ProtectableContainer)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -56,11 +58,11 @@ public ProtectableContainerResource() /// partial void CustomInit(); + /// /// Gets or sets protectableContainerResource properties /// - [JsonProperty(PropertyName = "properties")] - public ProtectableContainer Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ProtectableContainer Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainerType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainerType.cs new file mode 100644 index 000000000000..270a779adb6a --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectableContainerType.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models +{ + + /// + /// Defines values for ProtectableContainerType. + /// + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum ProtectableContainerType + { + [System.Runtime.Serialization.EnumMember(Value = "Invalid")] + Invalid, + [System.Runtime.Serialization.EnumMember(Value = "Unknown")] + Unknown, + [System.Runtime.Serialization.EnumMember(Value = "IaasVMContainer")] + IaasVMContainer, + [System.Runtime.Serialization.EnumMember(Value = "IaasVMServiceContainer")] + IaasVMServiceContainer, + [System.Runtime.Serialization.EnumMember(Value = "DPMContainer")] + DPMContainer, + [System.Runtime.Serialization.EnumMember(Value = "AzureBackupServerContainer")] + AzureBackupServerContainer, + [System.Runtime.Serialization.EnumMember(Value = "MABContainer")] + MABContainer, + [System.Runtime.Serialization.EnumMember(Value = "Cluster")] + Cluster, + [System.Runtime.Serialization.EnumMember(Value = "AzureSqlContainer")] + AzureSqlContainer, + [System.Runtime.Serialization.EnumMember(Value = "Windows")] + Windows, + [System.Runtime.Serialization.EnumMember(Value = "VCenter")] + VCenter, + [System.Runtime.Serialization.EnumMember(Value = "VMAppContainer")] + VMAppContainer, + [System.Runtime.Serialization.EnumMember(Value = "SQLAGWorkLoadContainer")] + SqlagWorkLoadContainer, + [System.Runtime.Serialization.EnumMember(Value = "StorageContainer")] + StorageContainer, + [System.Runtime.Serialization.EnumMember(Value = "GenericContainer")] + GenericContainer, + [System.Runtime.Serialization.EnumMember(Value = "Microsoft.ClassicCompute/virtualMachines")] + MicrosoftClassicComputeVirtualMachines, + [System.Runtime.Serialization.EnumMember(Value = "Microsoft.Compute/virtualMachines")] + MicrosoftComputeVirtualMachines, + [System.Runtime.Serialization.EnumMember(Value = "AzureWorkloadContainer")] + AzureWorkloadContainer + } + internal static class ProtectableContainerTypeEnumExtension + { + internal static string ToSerializedValue(this ProtectableContainerType? value) + { + return value == null ? null : ((ProtectableContainerType)value).ToSerializedValue(); + } + internal static string ToSerializedValue(this ProtectableContainerType value) + { + switch( value ) + { + case ProtectableContainerType.Invalid: + return "Invalid"; + case ProtectableContainerType.Unknown: + return "Unknown"; + case ProtectableContainerType.IaasVMContainer: + return "IaasVMContainer"; + case ProtectableContainerType.IaasVMServiceContainer: + return "IaasVMServiceContainer"; + case ProtectableContainerType.DPMContainer: + return "DPMContainer"; + case ProtectableContainerType.AzureBackupServerContainer: + return "AzureBackupServerContainer"; + case ProtectableContainerType.MABContainer: + return "MABContainer"; + case ProtectableContainerType.Cluster: + return "Cluster"; + case ProtectableContainerType.AzureSqlContainer: + return "AzureSqlContainer"; + case ProtectableContainerType.Windows: + return "Windows"; + case ProtectableContainerType.VCenter: + return "VCenter"; + case ProtectableContainerType.VMAppContainer: + return "VMAppContainer"; + case ProtectableContainerType.SqlagWorkLoadContainer: + return "SQLAGWorkLoadContainer"; + case ProtectableContainerType.StorageContainer: + return "StorageContainer"; + case ProtectableContainerType.GenericContainer: + return "GenericContainer"; + case ProtectableContainerType.MicrosoftClassicComputeVirtualMachines: + return "Microsoft.ClassicCompute/virtualMachines"; + case ProtectableContainerType.MicrosoftComputeVirtualMachines: + return "Microsoft.Compute/virtualMachines"; + case ProtectableContainerType.AzureWorkloadContainer: + return "AzureWorkloadContainer"; + } + return null; + } + internal static ProtectableContainerType? ParseProtectableContainerType(this string value) + { + switch( value ) + { + case "Invalid": + return ProtectableContainerType.Invalid; + case "Unknown": + return ProtectableContainerType.Unknown; + case "IaasVMContainer": + return ProtectableContainerType.IaasVMContainer; + case "IaasVMServiceContainer": + return ProtectableContainerType.IaasVMServiceContainer; + case "DPMContainer": + return ProtectableContainerType.DPMContainer; + case "AzureBackupServerContainer": + return ProtectableContainerType.AzureBackupServerContainer; + case "MABContainer": + return ProtectableContainerType.MABContainer; + case "Cluster": + return ProtectableContainerType.Cluster; + case "AzureSqlContainer": + return ProtectableContainerType.AzureSqlContainer; + case "Windows": + return ProtectableContainerType.Windows; + case "VCenter": + return ProtectableContainerType.VCenter; + case "VMAppContainer": + return ProtectableContainerType.VMAppContainer; + case "SQLAGWorkLoadContainer": + return ProtectableContainerType.SqlagWorkLoadContainer; + case "StorageContainer": + return ProtectableContainerType.StorageContainer; + case "GenericContainer": + return ProtectableContainerType.GenericContainer; + case "Microsoft.ClassicCompute/virtualMachines": + return ProtectableContainerType.MicrosoftClassicComputeVirtualMachines; + case "Microsoft.Compute/virtualMachines": + return ProtectableContainerType.MicrosoftComputeVirtualMachines; + case "AzureWorkloadContainer": + return ProtectableContainerType.AzureWorkloadContainer; + } + return null; + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItem.cs index ffb3f124a8dd..23ef723acaa5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItem.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,66 +24,85 @@ public ProtectedItem() /// /// Initializes a new instance of the ProtectedItem class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Unique name of container - /// ARM ID of the resource to be backed - /// up. - /// ID of the backup policy with which this item - /// is backed up. - /// Timestamp when the last (latest) - /// backup copy was created for this backup item. - /// Name of the backup set the backup item - /// belongs to - /// Create mode to indicate recovery of - /// existing soft deleted data source or creation of new data source. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Unique name of container + /// + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the backup policy with which this item is backed up. + /// + + /// Timestamp when the last (latest) backup copy was created for this backup + /// item. + /// + + /// Name of the backup set the backup item belongs to + /// + + /// Create mode to indicate recovery of existing soft deleted data source or + /// creation of new data source. /// Possible values include: 'Invalid', 'Default', 'Recover' - /// Time for deferred deletion in - /// UTC - /// Flag to identify whether - /// the DS is scheduled for deferred delete - /// Time remaining before the - /// DS marked for deferred delete is permanently deleted - /// Flag to identify - /// whether the deferred deleted DS is to be purged soon - /// Flag to identify that deferred deleted DS - /// is to be moved into Pause state - /// ResourceGuardOperationRequests - /// on which LAC check will be performed - /// Flag to identify whether datasource - /// is protected in archive - /// Name of the policy used for - /// protection - /// Soft delete retention - /// period in days - public ProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?)) + + /// Time for deferred deletion in UTC + /// + + /// Flag to identify whether the DS is scheduled for deferred delete + /// + + /// Time remaining before the DS marked for deferred delete is permanently + /// deleted + /// + + /// Flag to identify whether the deferred deleted DS is to be purged soon + /// + + /// Flag to identify that deferred deleted DS is to be moved into Pause state + /// + + /// ResourceGuardOperationRequests on which LAC check will be performed + /// + + /// Flag to identify whether datasource is protected in archive + /// + + /// Name of the policy used for protection + /// + + /// Soft delete retention period in days + /// + public ProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUtc = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), bool? isArchiveEnabled = default(bool?), string policyName = default(string), int? softDeleteRetentionPeriod = default(int?)) + { - BackupManagementType = backupManagementType; - WorkloadType = workloadType; - ContainerName = containerName; - SourceResourceId = sourceResourceId; - PolicyId = policyId; - LastRecoveryPoint = lastRecoveryPoint; - BackupSetName = backupSetName; - CreateMode = createMode; - DeferredDeleteTimeInUTC = deferredDeleteTimeInUTC; - IsScheduledForDeferredDelete = isScheduledForDeferredDelete; - DeferredDeleteTimeRemaining = deferredDeleteTimeRemaining; - IsDeferredDeleteScheduleUpcoming = isDeferredDeleteScheduleUpcoming; - IsRehydrate = isRehydrate; - ResourceGuardOperationRequests = resourceGuardOperationRequests; - IsArchiveEnabled = isArchiveEnabled; - PolicyName = policyName; - SoftDeleteRetentionPeriod = softDeleteRetentionPeriod; + this.BackupManagementType = backupManagementType; + this.WorkloadType = workloadType; + this.ContainerName = containerName; + this.SourceResourceId = sourceResourceId; + this.PolicyId = policyId; + this.LastRecoveryPoint = lastRecoveryPoint; + this.BackupSetName = backupSetName; + this.CreateMode = createMode; + this.DeferredDeleteTimeInUtc = deferredDeleteTimeInUtc; + this.IsScheduledForDeferredDelete = isScheduledForDeferredDelete; + this.DeferredDeleteTimeRemaining = deferredDeleteTimeRemaining; + this.IsDeferredDeleteScheduleUpcoming = isDeferredDeleteScheduleUpcoming; + this.IsRehydrate = isRehydrate; + this.ResourceGuardOperationRequests = resourceGuardOperationRequests; + this.IsArchiveEnabled = isArchiveEnabled; + this.PolicyName = policyName; + this.SoftDeleteRetentionPeriod = softDeleteRetentionPeriod; CustomInit(); } @@ -100,124 +111,114 @@ public ProtectedItem() /// partial void CustomInit(); + /// - /// Gets type of backup management for the backed up item. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets type of backup management for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; private set; } /// - /// Gets type of workload this item represents. Possible values - /// include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', - /// 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; private set; } /// /// Gets or sets unique name of container /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// - /// Gets or sets ARM ID of the resource to be backed up. + /// Gets or sets aRM ID of the resource to be backed up. /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// - /// Gets or sets ID of the backup policy with which this item is backed - /// up. + /// Gets or sets iD of the backup policy with which this item is backed up. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// - /// Gets or sets timestamp when the last (latest) backup copy was - /// created for this backup item. + /// Gets or sets timestamp when the last (latest) backup copy was created for + /// this backup item. /// - [JsonProperty(PropertyName = "lastRecoveryPoint")] - public System.DateTime? LastRecoveryPoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRecoveryPoint")] + public System.DateTime? LastRecoveryPoint {get; set; } /// /// Gets or sets name of the backup set the backup item belongs to /// - [JsonProperty(PropertyName = "backupSetName")] - public string BackupSetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupSetName")] + public string BackupSetName {get; set; } /// - /// Gets or sets create mode to indicate recovery of existing soft - /// deleted data source or creation of new data source. Possible values - /// include: 'Invalid', 'Default', 'Recover' + /// Gets or sets create mode to indicate recovery of existing soft deleted data + /// source or creation of new data source. Possible values include: 'Invalid', 'Default', 'Recover' /// - [JsonProperty(PropertyName = "createMode")] - public string CreateMode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createMode")] + public string CreateMode {get; set; } /// /// Gets or sets time for deferred deletion in UTC /// - [JsonProperty(PropertyName = "deferredDeleteTimeInUTC")] - public System.DateTime? DeferredDeleteTimeInUTC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "deferredDeleteTimeInUTC")] + public System.DateTime? DeferredDeleteTimeInUtc {get; set; } /// - /// Gets or sets flag to identify whether the DS is scheduled for - /// deferred delete + /// Gets or sets flag to identify whether the DS is scheduled for deferred + /// delete /// - [JsonProperty(PropertyName = "isScheduledForDeferredDelete")] - public bool? IsScheduledForDeferredDelete { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isScheduledForDeferredDelete")] + public bool? IsScheduledForDeferredDelete {get; set; } /// - /// Gets or sets time remaining before the DS marked for deferred - /// delete is permanently deleted + /// Gets or sets time remaining before the DS marked for deferred delete is + /// permanently deleted /// - [JsonProperty(PropertyName = "deferredDeleteTimeRemaining")] - public string DeferredDeleteTimeRemaining { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "deferredDeleteTimeRemaining")] + public string DeferredDeleteTimeRemaining {get; set; } /// - /// Gets or sets flag to identify whether the deferred deleted DS is to - /// be purged soon + /// Gets or sets flag to identify whether the deferred deleted DS is to be + /// purged soon /// - [JsonProperty(PropertyName = "isDeferredDeleteScheduleUpcoming")] - public bool? IsDeferredDeleteScheduleUpcoming { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isDeferredDeleteScheduleUpcoming")] + public bool? IsDeferredDeleteScheduleUpcoming {get; set; } /// - /// Gets or sets flag to identify that deferred deleted DS is to be - /// moved into Pause state + /// Gets or sets flag to identify that deferred deleted DS is to be moved into + /// Pause state /// - [JsonProperty(PropertyName = "isRehydrate")] - public bool? IsRehydrate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isRehydrate")] + public bool? IsRehydrate {get; set; } /// - /// Gets or sets resourceGuardOperationRequests on which LAC check will - /// be performed + /// Gets or sets resourceGuardOperationRequests on which LAC check will be + /// performed /// - [JsonProperty(PropertyName = "resourceGuardOperationRequests")] - public IList ResourceGuardOperationRequests { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public System.Collections.Generic.IList ResourceGuardOperationRequests {get; set; } /// - /// Gets or sets flag to identify whether datasource is protected in - /// archive + /// Gets or sets flag to identify whether datasource is protected in archive /// - [JsonProperty(PropertyName = "isArchiveEnabled")] - public bool? IsArchiveEnabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isArchiveEnabled")] + public bool? IsArchiveEnabled {get; set; } /// /// Gets or sets name of the policy used for protection /// - [JsonProperty(PropertyName = "policyName")] - public string PolicyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyName")] + public string PolicyName {get; set; } /// /// Gets or sets soft delete retention period in days /// - [JsonProperty(PropertyName = "softDeleteRetentionPeriod")] - public int? SoftDeleteRetentionPeriod { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "softDeleteRetentionPeriod")] + public int? SoftDeleteRetentionPeriod {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemHealthStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemHealthStatus.cs index 7d2f8e1431de..7c0084b2aeca 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemHealthStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemHealthStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for ProtectedItemHealthStatus. /// + + public static class ProtectedItemHealthStatus { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class ProtectedItemHealthStatus public const string NotReachable = "NotReachable"; public const string IRPending = "IRPending"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemQueryObject.cs index d0247bde3c29..8f8b842c5d2a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,37 +23,51 @@ public ProtectedItemQueryObject() /// /// Initializes a new instance of the ProtectedItemQueryObject class. /// + /// Health State for the backed up item. - /// Possible values include: 'Passed', 'ActionRequired', - /// 'ActionSuggested', 'Invalid' - /// Backup management type for the - /// backed up item. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' + /// Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', + /// 'Invalid' + + /// Backup management type for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + /// Type of workload this item represents. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' - /// Backup policy name associated with the - /// backup item. - /// Name of the container. - /// Backup Engine name - /// Friendly name of protected item - /// Name of the fabric. - /// Name of the backup set. + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' + + /// Backup policy name associated with the backup item. + /// + + /// Name of the container. + /// + + /// Backup Engine name + /// + + /// Friendly name of protected item + /// + + /// Name of the fabric. + /// + + /// Name of the backup set. + /// public ProtectedItemQueryObject(string healthState = default(string), string backupManagementType = default(string), string itemType = default(string), string policyName = default(string), string containerName = default(string), string backupEngineName = default(string), string friendlyName = default(string), string fabricName = default(string), string backupSetName = default(string)) + { - HealthState = healthState; - BackupManagementType = backupManagementType; - ItemType = itemType; - PolicyName = policyName; - ContainerName = containerName; - BackupEngineName = backupEngineName; - FriendlyName = friendlyName; - FabricName = fabricName; - BackupSetName = backupSetName; + this.HealthState = healthState; + this.BackupManagementType = backupManagementType; + this.ItemType = itemType; + this.PolicyName = policyName; + this.ContainerName = containerName; + this.BackupEngineName = backupEngineName; + this.FriendlyName = friendlyName; + this.FabricName = fabricName; + this.BackupSetName = backupSetName; CustomInit(); } @@ -68,67 +76,59 @@ public ProtectedItemQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets health State for the backed up item. Possible values - /// include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' + /// Gets or sets health State for the backed up item. Possible values include: 'Passed', 'ActionRequired', 'ActionSuggested', 'Invalid' /// - [JsonProperty(PropertyName = "healthState")] - public string HealthState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthState")] + public string HealthState {get; set; } /// - /// Gets or sets backup management type for the backed up item. - /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets type of workload this item represents. Possible values - /// include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', - /// 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets or sets type of workload this item represents. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "itemType")] - public string ItemType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "itemType")] + public string ItemType {get; set; } /// /// Gets or sets backup policy name associated with the backup item. /// - [JsonProperty(PropertyName = "policyName")] - public string PolicyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyName")] + public string PolicyName {get; set; } /// /// Gets or sets name of the container. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets backup Engine name /// - [JsonProperty(PropertyName = "backupEngineName")] - public string BackupEngineName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupEngineName")] + public string BackupEngineName {get; set; } /// /// Gets or sets friendly name of protected item /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets name of the fabric. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// /// Gets or sets name of the backup set. /// - [JsonProperty(PropertyName = "backupSetName")] - public string BackupSetName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "backupSetName")] + public string BackupSetName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemResource.cs index d798dde1a3fd..929d2e44c429 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,20 +23,33 @@ public ProtectedItemResource() /// /// Initializes a new instance of the ProtectedItemResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// ProtectedItemResource properties - public ProtectedItemResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), ProtectedItem properties = default(ProtectedItem)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// ProtectedItemResource properties + /// + public ProtectedItemResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), ProtectedItem properties = default(ProtectedItem)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -53,11 +58,11 @@ public ProtectedItemResource() /// partial void CustomInit(); + /// /// Gets or sets protectedItemResource properties /// - [JsonProperty(PropertyName = "properties")] - public ProtectedItem Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ProtectedItem Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemState.cs index af85ed554dc8..8c45d11aed27 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectedItemState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for ProtectedItemState. /// + + public static class ProtectedItemState { public const string Invalid = "Invalid"; @@ -24,4 +21,4 @@ public static class ProtectedItemState public const string ProtectionPaused = "ProtectionPaused"; public const string BackupsSuspended = "BackupsSuspended"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionContainer.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionContainer.cs index 61de6aa91435..e91cc68b472b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionContainer.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -31,24 +25,31 @@ public ProtectionContainer() /// /// Initializes a new instance of the ProtectionContainer class. /// - /// Friendly name of the container. - /// Type of backup management for - /// the container. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Status of registration of the - /// container with the Recovery Services Vault. - /// Status of health of the - /// container. - /// Type of the protectable object - /// associated with this container + + /// Friendly name of the container. + /// + + /// Type of backup management for the container. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Status of registration of the container with the Recovery Services Vault. + /// + + /// Status of health of the container. + /// + + /// Type of the protectable object associated with this container + /// public ProtectionContainer(string friendlyName = default(string), string backupManagementType = default(string), string registrationStatus = default(string), string healthStatus = default(string), string protectableObjectType = default(string)) + { - FriendlyName = friendlyName; - BackupManagementType = backupManagementType; - RegistrationStatus = registrationStatus; - HealthStatus = healthStatus; - ProtectableObjectType = protectableObjectType; + this.FriendlyName = friendlyName; + this.BackupManagementType = backupManagementType; + this.RegistrationStatus = registrationStatus; + this.HealthStatus = healthStatus; + this.ProtectableObjectType = protectableObjectType; CustomInit(); } @@ -57,40 +58,36 @@ public ProtectionContainer() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the container. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets type of backup management for the container. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets type of backup management for the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets status of registration of the container with the - /// Recovery Services Vault. + /// Gets or sets status of registration of the container with the Recovery + /// Services Vault. /// - [JsonProperty(PropertyName = "registrationStatus")] - public string RegistrationStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "registrationStatus")] + public string RegistrationStatus {get; set; } /// /// Gets or sets status of health of the container. /// - [JsonProperty(PropertyName = "healthStatus")] - public string HealthStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthStatus")] + public string HealthStatus {get; set; } /// - /// Gets or sets type of the protectable object associated with this - /// container + /// Gets or sets type of the protectable object associated with this container /// - [JsonProperty(PropertyName = "protectableObjectType")] - public string ProtectableObjectType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableObjectType")] + public string ProtectableObjectType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionContainerResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionContainerResource.cs index bb174797790d..2e1800c984e8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionContainerResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionContainerResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ProtectionContainerResource : Resource { /// - /// Initializes a new instance of the ProtectionContainerResource - /// class. + /// Initializes a new instance of the ProtectionContainerResource class. /// public ProtectionContainerResource() { @@ -31,24 +22,35 @@ public ProtectionContainerResource() } /// - /// Initializes a new instance of the ProtectionContainerResource - /// class. + /// Initializes a new instance of the ProtectionContainerResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// ProtectionContainerResource - /// properties - public ProtectionContainerResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), ProtectionContainer properties = default(ProtectionContainer)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// ProtectionContainerResource properties + /// + public ProtectionContainerResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), ProtectionContainer properties = default(ProtectionContainer)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -57,11 +59,11 @@ public ProtectionContainerResource() /// partial void CustomInit(); + /// /// Gets or sets protectionContainerResource properties /// - [JsonProperty(PropertyName = "properties")] - public ProtectionContainer Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ProtectionContainer Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntent.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntent.cs index 63011297d4db..b23397091f28 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntent.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntent.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,26 +24,33 @@ public ProtectionIntent() /// /// Initializes a new instance of the ProtectionIntent class. /// - /// Type of backup management for - /// the backed up item. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// ARM ID of the resource to be backed - /// up. - /// ID of the item which is getting protected, In - /// case of Azure Vm , it is ProtectedItemId - /// ID of the backup policy with which this item - /// is backed up. + + /// Type of backup management for the backed up item. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// ARM ID of the resource to be backed up. + /// + + /// ID of the item which is getting protected, In case of Azure Vm , it is + /// ProtectedItemId + /// + + /// ID of the backup policy with which this item is backed up. + /// + /// Backup state of this backup item. /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' public ProtectionIntent(string backupManagementType = default(string), string sourceResourceId = default(string), string itemId = default(string), string policyId = default(string), string protectionState = default(string)) + { - BackupManagementType = backupManagementType; - SourceResourceId = sourceResourceId; - ItemId = itemId; - PolicyId = policyId; - ProtectionState = protectionState; + this.BackupManagementType = backupManagementType; + this.SourceResourceId = sourceResourceId; + this.ItemId = itemId; + this.PolicyId = policyId; + this.ProtectionState = protectionState; CustomInit(); } @@ -58,42 +59,36 @@ public ProtectionIntent() /// partial void CustomInit(); + /// - /// Gets or sets type of backup management for the backed up item. - /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets type of backup management for the backed up item. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets ARM ID of the resource to be backed up. + /// Gets or sets aRM ID of the resource to be backed up. /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// - /// Gets or sets ID of the item which is getting protected, In case of - /// Azure Vm , it is ProtectedItemId + /// Gets or sets iD of the item which is getting protected, In case of Azure Vm + /// , it is ProtectedItemId /// - [JsonProperty(PropertyName = "itemId")] - public string ItemId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "itemId")] + public string ItemId {get; set; } /// - /// Gets or sets ID of the backup policy with which this item is backed - /// up. + /// Gets or sets iD of the backup policy with which this item is backed up. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// - /// Gets or sets backup state of this backup item. Possible values - /// include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', - /// 'ProtectionFailed' + /// Gets or sets backup state of this backup item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', 'ProtectionFailed' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentItemType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentItemType.cs new file mode 100644 index 000000000000..404fb50d7a95 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentItemType.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models +{ + + /// + /// Defines values for ProtectionIntentItemType. + /// + + + public static class ProtectionIntentItemType + { + public const string Invalid = "Invalid"; + public const string AzureResourceItem = "AzureResourceItem"; + public const string RecoveryServiceVaultItem = "RecoveryServiceVaultItem"; + public const string AzureWorkloadContainerAutoProtectionIntent = "AzureWorkloadContainerAutoProtectionIntent"; + public const string AzureWorkloadAutoProtectionIntent = "AzureWorkloadAutoProtectionIntent"; + public const string AzureWorkloadSQLAutoProtectionIntent = "AzureWorkloadSQLAutoProtectionIntent"; + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentQueryObject.cs index 391a89122631..0a008a058b54 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ProtectionIntentQueryObject { /// - /// Initializes a new instance of the ProtectionIntentQueryObject - /// class. + /// Initializes a new instance of the ProtectionIntentQueryObject class. /// public ProtectionIntentQueryObject() { @@ -28,24 +21,30 @@ public ProtectionIntentQueryObject() } /// - /// Initializes a new instance of the ProtectionIntentQueryObject - /// class. + /// Initializes a new instance of the ProtectionIntentQueryObject class. /// - /// Backup management type for the - /// backed up item. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Type of workload this item represents. + + /// Backup management type for the backed up item + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Type of workload this item represents /// Possible values include: 'Invalid', 'SQLInstance', /// 'SQLAvailabilityGroupContainer' - /// Parent name of the intent - /// Item name of the intent + + /// Parent name of the intent + /// + + /// Item name of the intent + /// public ProtectionIntentQueryObject(string backupManagementType = default(string), string itemType = default(string), string parentName = default(string), string itemName = default(string)) + { - BackupManagementType = backupManagementType; - ItemType = itemType; - ParentName = parentName; - ItemName = itemName; + this.BackupManagementType = backupManagementType; + this.ItemType = itemType; + this.ParentName = parentName; + this.ItemName = itemName; CustomInit(); } @@ -54,33 +53,29 @@ public ProtectionIntentQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type for the backed up item. - /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type for the backed up item Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// - /// Gets or sets type of workload this item represents. Possible values - /// include: 'Invalid', 'SQLInstance', 'SQLAvailabilityGroupContainer' + /// Gets or sets type of workload this item represents Possible values include: 'Invalid', 'SQLInstance', 'SQLAvailabilityGroupContainer' /// - [JsonProperty(PropertyName = "itemType")] - public string ItemType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "itemType")] + public string ItemType {get; set; } /// /// Gets or sets parent name of the intent /// - [JsonProperty(PropertyName = "parentName")] - public string ParentName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "parentName")] + public string ParentName {get; set; } /// /// Gets or sets item name of the intent /// - [JsonProperty(PropertyName = "itemName")] - public string ItemName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "itemName")] + public string ItemName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentResource.cs index 53c515168e61..fc3df1a3c1b8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionIntentResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,21 +23,33 @@ public ProtectionIntentResource() /// /// Initializes a new instance of the ProtectionIntentResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// ProtectionIntentResource - /// properties - public ProtectionIntentResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), ProtectionIntent properties = default(ProtectionIntent)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// ProtectionIntentResource properties + /// + public ProtectionIntentResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), ProtectionIntent properties = default(ProtectionIntent)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -54,11 +58,11 @@ public ProtectionIntentResource() /// partial void CustomInit(); + /// /// Gets or sets protectionIntentResource properties /// - [JsonProperty(PropertyName = "properties")] - public ProtectionIntent Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ProtectionIntent Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicy.cs index d555be0adbbc..78010d89ae4a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicy.cs @@ -1,23 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Base class for backup policy. Workload-specific backup policies are - /// derived from this class. + /// Base class for backup policy. Workload-specific backup policies are derived + /// from this class. /// [Newtonsoft.Json.JsonObject("ProtectionPolicy")] public partial class ProtectionPolicy @@ -33,14 +25,17 @@ public ProtectionPolicy() /// /// Initializes a new instance of the ProtectionPolicy class. /// - /// Number of items associated with - /// this policy. - /// ResourceGuard - /// Operation Requests - public ProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList)) + + /// Number of items associated with this policy. + /// + + /// ResourceGuard Operation Requests + /// + public ProtectionPolicy(int? protectedItemsCount = default(int?), System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList)) + { - ProtectedItemsCount = protectedItemsCount; - ResourceGuardOperationRequests = resourceGuardOperationRequests; + this.ProtectedItemsCount = protectedItemsCount; + this.ResourceGuardOperationRequests = resourceGuardOperationRequests; CustomInit(); } @@ -49,17 +44,17 @@ public ProtectionPolicy() /// partial void CustomInit(); + /// /// Gets or sets number of items associated with this policy. /// - [JsonProperty(PropertyName = "protectedItemsCount")] - public int? ProtectedItemsCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemsCount")] + public int? ProtectedItemsCount {get; set; } /// /// Gets or sets resourceGuard Operation Requests /// - [JsonProperty(PropertyName = "resourceGuardOperationRequests")] - public IList ResourceGuardOperationRequests { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public System.Collections.Generic.IList ResourceGuardOperationRequests {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicyQueryObject.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicyQueryObject.cs index 6954c1049736..0613f06ea2f5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicyQueryObject.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicyQueryObject.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ProtectionPolicyQueryObject { /// - /// Initializes a new instance of the ProtectionPolicyQueryObject - /// class. + /// Initializes a new instance of the ProtectionPolicyQueryObject class. /// public ProtectionPolicyQueryObject() { @@ -28,25 +21,28 @@ public ProtectionPolicyQueryObject() } /// - /// Initializes a new instance of the ProtectionPolicyQueryObject - /// class. + /// Initializes a new instance of the ProtectionPolicyQueryObject class. /// - /// Backup management type for the - /// backup policy. Possible values include: 'Invalid', 'AzureIaasVM', - /// 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', - /// 'AzureWorkload', 'DefaultBackup' - /// Fabric name for filter + + /// Backup management type for the backup policy. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// Fabric name for filter + /// + /// Workload type for the backup policy. - /// Possible values include: 'Invalid', 'VM', 'FileFolder', - /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', - /// 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', - /// 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', - /// 'SAPHanaDBInstance' + /// Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', + /// 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', + /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', + /// 'SAPAseDatabase', 'SAPHanaDBInstance' public ProtectionPolicyQueryObject(string backupManagementType = default(string), string fabricName = default(string), string workloadType = default(string)) + { - BackupManagementType = backupManagementType; - FabricName = fabricName; - WorkloadType = workloadType; + this.BackupManagementType = backupManagementType; + this.FabricName = fabricName; + this.WorkloadType = workloadType; CustomInit(); } @@ -55,30 +51,23 @@ public ProtectionPolicyQueryObject() /// partial void CustomInit(); + /// - /// Gets or sets backup management type for the backup policy. Possible - /// values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', - /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', - /// 'DefaultBackup' + /// Gets or sets backup management type for the backup policy. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', 'DefaultBackup' /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// /// Gets or sets fabric name for filter /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// - /// Gets or sets workload type for the backup policy. Possible values - /// include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', - /// 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', - /// 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', - /// 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' + /// Gets or sets workload type for the backup policy. Possible values include: 'Invalid', 'VM', 'FileFolder', 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', 'SystemState', 'Client', 'GenericDataSource', 'SQLDataBase', 'AzureFileShare', 'SAPHanaDatabase', 'SAPAseDatabase', 'SAPHanaDBInstance' /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicyResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicyResource.cs index e1f68862dda3..b8f6b9894655 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicyResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionPolicyResource.cs @@ -1,23 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Base class for backup policy. Workload-specific backup policies are - /// derived from this class. + /// Base class for backup policy. Workload-specific backup policies are derived + /// from this class. /// public partial class ProtectionPolicyResource : Resource { @@ -32,21 +24,33 @@ public ProtectionPolicyResource() /// /// Initializes a new instance of the ProtectionPolicyResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// ProtectionPolicyResource - /// properties - public ProtectionPolicyResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), ProtectionPolicy properties = default(ProtectionPolicy)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// ProtectionPolicyResource properties + /// + public ProtectionPolicyResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), ProtectionPolicy properties = default(ProtectionPolicy)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -55,11 +59,11 @@ public ProtectionPolicyResource() /// partial void CustomInit(); + /// /// Gets or sets protectionPolicyResource properties /// - [JsonProperty(PropertyName = "properties")] - public ProtectionPolicy Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ProtectionPolicy Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionState.cs index 69573e5c941d..9f0bf6925e9e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for ProtectionState. /// + + public static class ProtectionState { public const string Invalid = "Invalid"; @@ -24,4 +21,4 @@ public static class ProtectionState public const string ProtectionPaused = "ProtectionPaused"; public const string BackupsSuspended = "BackupsSuspended"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionStatus.cs index a345b532ad13..42c03157f7ae 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProtectionStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for ProtectionStatus. /// + + public static class ProtectionStatus { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class ProtectionStatus public const string Protected = "Protected"; public const string ProtectionFailed = "ProtectionFailed"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProvisioningState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProvisioningState.cs index 3e41e51b99a6..8a6284e0719e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProvisioningState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ProvisioningState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for ProvisioningState. /// + + public static class ProvisioningState { public const string Succeeded = "Succeeded"; @@ -21,4 +18,4 @@ public static class ProvisioningState public const string Failed = "Failed"; public const string Pending = "Pending"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryMode.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryMode.cs index bfa826a823bc..148aadeb07fd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryMode.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for RecoveryMode. /// + + public static class RecoveryMode { public const string Invalid = "Invalid"; public const string FileRecovery = "FileRecovery"; public const string WorkloadRecovery = "WorkloadRecovery"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPoint.cs index fb3af785d448..a53149e0c4c5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPoint.cs @@ -1,21 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Base class for backup copies. Workload-specific backup copies are - /// derived from this class. + /// Base class for backup copies. Workload-specific backup copies are derived + /// from this class. /// [Newtonsoft.Json.JsonObject("RecoveryPoint")] public partial class RecoveryPoint @@ -35,4 +29,4 @@ public RecoveryPoint() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointDiskConfiguration.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointDiskConfiguration.cs index 0c9ed9db05e2..6729c410e057 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointDiskConfiguration.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointDiskConfiguration.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class RecoveryPointDiskConfiguration { /// - /// Initializes a new instance of the RecoveryPointDiskConfiguration - /// class. + /// Initializes a new instance of the RecoveryPointDiskConfiguration class. /// public RecoveryPointDiskConfiguration() { @@ -30,23 +21,27 @@ public RecoveryPointDiskConfiguration() } /// - /// Initializes a new instance of the RecoveryPointDiskConfiguration - /// class. + /// Initializes a new instance of the RecoveryPointDiskConfiguration class. /// - /// Number of disks - /// included in backup - /// Number of disks attached to - /// the VM - /// Information of disks included in - /// backup - /// Information of disks excluded from - /// backup - public RecoveryPointDiskConfiguration(int? numberOfDisksIncludedInBackup = default(int?), int? numberOfDisksAttachedToVm = default(int?), IList includedDiskList = default(IList), IList excludedDiskList = default(IList)) + + /// Number of disks included in backup + /// + + /// Number of disks attached to the VM + /// + + /// Information of disks included in backup + /// + + /// Information of disks excluded from backup + /// + public RecoveryPointDiskConfiguration(int? numberOfDisksIncludedInBackup = default(int?), int? numberOfDisksAttachedToVM = default(int?), System.Collections.Generic.IList includedDiskList = default(System.Collections.Generic.IList), System.Collections.Generic.IList excludedDiskList = default(System.Collections.Generic.IList)) + { - NumberOfDisksIncludedInBackup = numberOfDisksIncludedInBackup; - NumberOfDisksAttachedToVm = numberOfDisksAttachedToVm; - IncludedDiskList = includedDiskList; - ExcludedDiskList = excludedDiskList; + this.NumberOfDisksIncludedInBackup = numberOfDisksIncludedInBackup; + this.NumberOfDisksAttachedToVM = numberOfDisksAttachedToVM; + this.IncludedDiskList = includedDiskList; + this.ExcludedDiskList = excludedDiskList; CustomInit(); } @@ -55,29 +50,29 @@ public RecoveryPointDiskConfiguration() /// partial void CustomInit(); + /// /// Gets or sets number of disks included in backup /// - [JsonProperty(PropertyName = "numberOfDisksIncludedInBackup")] - public int? NumberOfDisksIncludedInBackup { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "numberOfDisksIncludedInBackup")] + public int? NumberOfDisksIncludedInBackup {get; set; } /// /// Gets or sets number of disks attached to the VM /// - [JsonProperty(PropertyName = "numberOfDisksAttachedToVm")] - public int? NumberOfDisksAttachedToVm { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "numberOfDisksAttachedToVm")] + public int? NumberOfDisksAttachedToVM {get; set; } /// /// Gets or sets information of disks included in backup /// - [JsonProperty(PropertyName = "includedDiskList")] - public IList IncludedDiskList { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "includedDiskList")] + public System.Collections.Generic.IList IncludedDiskList {get; set; } /// /// Gets or sets information of disks excluded from backup /// - [JsonProperty(PropertyName = "excludedDiskList")] - public IList ExcludedDiskList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "excludedDiskList")] + public System.Collections.Generic.IList ExcludedDiskList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointMoveReadinessInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointMoveReadinessInfo.cs index 11498a86a7f4..f59726e9560e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointMoveReadinessInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointMoveReadinessInfo.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; public partial class RecoveryPointMoveReadinessInfo { /// - /// Initializes a new instance of the RecoveryPointMoveReadinessInfo - /// class. + /// Initializes a new instance of the RecoveryPointMoveReadinessInfo class. /// public RecoveryPointMoveReadinessInfo() { @@ -25,13 +18,19 @@ public RecoveryPointMoveReadinessInfo() } /// - /// Initializes a new instance of the RecoveryPointMoveReadinessInfo - /// class. + /// Initializes a new instance of the RecoveryPointMoveReadinessInfo class. /// + + /// + /// + + /// + /// public RecoveryPointMoveReadinessInfo(bool? isReadyForMove = default(bool?), string additionalInfo = default(string)) + { - IsReadyForMove = isReadyForMove; - AdditionalInfo = additionalInfo; + this.IsReadyForMove = isReadyForMove; + this.AdditionalInfo = additionalInfo; CustomInit(); } @@ -40,15 +39,17 @@ public RecoveryPointMoveReadinessInfo() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "isReadyForMove")] - public bool? IsReadyForMove { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isReadyForMove")] + public bool? IsReadyForMove {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "additionalInfo")] - public string AdditionalInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")] + public string AdditionalInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointProperties.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointProperties.cs index cb3a4a9b7b88..fff0cb7548c3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,17 @@ public RecoveryPointProperties() /// /// Initializes a new instance of the RecoveryPointProperties class. /// - /// Expiry time of Recovery Point in - /// UTC. - /// Rule name tagged on Recovery Point that - /// governs life cycle + + /// Expiry time of Recovery Point in UTC. + /// + + /// Rule name tagged on Recovery Point that governs life cycle + /// public RecoveryPointProperties(string expiryTime = default(string), string ruleName = default(string)) + { - ExpiryTime = expiryTime; - RuleName = ruleName; + this.ExpiryTime = expiryTime; + this.RuleName = ruleName; CustomInit(); } @@ -45,18 +42,17 @@ public RecoveryPointProperties() /// partial void CustomInit(); + /// /// Gets or sets expiry time of Recovery Point in UTC. /// - [JsonProperty(PropertyName = "expiryTime")] - public string ExpiryTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "expiryTime")] + public string ExpiryTime {get; set; } /// - /// Gets or sets rule name tagged on Recovery Point that governs life - /// cycle + /// Gets or sets rule name tagged on Recovery Point that governs life cycle /// - [JsonProperty(PropertyName = "ruleName")] - public string RuleName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "ruleName")] + public string RuleName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointRehydrationInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointRehydrationInfo.cs index 57ec81a187a7..9a340069e552 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointRehydrationInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointRehydrationInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class RecoveryPointRehydrationInfo { /// - /// Initializes a new instance of the RecoveryPointRehydrationInfo - /// class. + /// Initializes a new instance of the RecoveryPointRehydrationInfo class. /// public RecoveryPointRehydrationInfo() { @@ -28,18 +21,20 @@ public RecoveryPointRehydrationInfo() } /// - /// Initializes a new instance of the RecoveryPointRehydrationInfo - /// class. + /// Initializes a new instance of the RecoveryPointRehydrationInfo class. /// - /// How long the rehydrated - /// RP should be kept - /// Should be ISO8601 Duration format e.g. "P7D" - /// Rehydration Priority. Possible - /// values include: 'Standard', 'High' + + /// How long the rehydrated RP should be kept + /// Should be ISO8601 Duration format e.g. "P7D" + /// + + /// Rehydration Priority + /// Possible values include: 'Standard', 'High' public RecoveryPointRehydrationInfo(string rehydrationRetentionDuration = default(string), string rehydrationPriority = default(string)) + { - RehydrationRetentionDuration = rehydrationRetentionDuration; - RehydrationPriority = rehydrationPriority; + this.RehydrationRetentionDuration = rehydrationRetentionDuration; + this.RehydrationPriority = rehydrationPriority; CustomInit(); } @@ -48,19 +43,18 @@ public RecoveryPointRehydrationInfo() /// partial void CustomInit(); + /// /// Gets or sets how long the rehydrated RP should be kept - /// Should be ISO8601 Duration format e.g. "P7D" + /// Should be ISO8601 Duration format e.g. "P7D" /// - [JsonProperty(PropertyName = "rehydrationRetentionDuration")] - public string RehydrationRetentionDuration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rehydrationRetentionDuration")] + public string RehydrationRetentionDuration {get; set; } /// - /// Gets or sets rehydration Priority. Possible values include: - /// 'Standard', 'High' + /// Gets or sets rehydration Priority Possible values include: 'Standard', 'High' /// - [JsonProperty(PropertyName = "rehydrationPriority")] - public string RehydrationPriority { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "rehydrationPriority")] + public string RehydrationPriority {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointResource.cs index 54fc59f12925..42e6287584fd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointResource.cs @@ -1,23 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Base class for backup copies. Workload-specific backup copies are - /// derived from this class. + /// Base class for backup copies. Workload-specific backup copies are derived + /// from this class. /// public partial class RecoveryPointResource : Resource { @@ -32,20 +24,33 @@ public RecoveryPointResource() /// /// Initializes a new instance of the RecoveryPointResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// RecoveryPointResource properties - public RecoveryPointResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), RecoveryPoint properties = default(RecoveryPoint)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// RecoveryPointResource properties + /// + public RecoveryPointResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), RecoveryPoint properties = default(RecoveryPoint)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -54,11 +59,11 @@ public RecoveryPointResource() /// partial void CustomInit(); + /// /// Gets or sets recoveryPointResource properties /// - [JsonProperty(PropertyName = "properties")] - public RecoveryPoint Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RecoveryPoint Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierInformation.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierInformation.cs index 17ee9be8d5f7..2cc4170432cd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierInformation.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierInformation.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class RecoveryPointTierInformation { /// - /// Initializes a new instance of the RecoveryPointTierInformation - /// class. + /// Initializes a new instance of the RecoveryPointTierInformation class. /// public RecoveryPointTierInformation() { @@ -30,20 +21,24 @@ public RecoveryPointTierInformation() } /// - /// Initializes a new instance of the RecoveryPointTierInformation - /// class. + /// Initializes a new instance of the RecoveryPointTierInformation class. /// - /// Recovery point tier type. Possible values - /// include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' - /// Recovery point tier status. Possible values - /// include: 'Invalid', 'Valid', 'Disabled', 'Deleted', + + /// Recovery point tier type. + /// Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + + /// Recovery point tier status. + /// Possible values include: 'Invalid', 'Valid', 'Disabled', 'Deleted', /// 'Rehydrated' - /// Recovery point tier status. - public RecoveryPointTierInformation(RecoveryPointTierType? type = default(RecoveryPointTierType?), RecoveryPointTierStatus? status = default(RecoveryPointTierStatus?), IDictionary extendedInfo = default(IDictionary)) + + /// Recovery point tier status. + /// + public RecoveryPointTierInformation(RecoveryPointTierType? type = default(RecoveryPointTierType?), RecoveryPointTierStatus? status = default(RecoveryPointTierStatus?), System.Collections.Generic.IDictionary extendedInfo = default(System.Collections.Generic.IDictionary)) + { - Type = type; - Status = status; - ExtendedInfo = extendedInfo; + this.Type = type; + this.Status = status; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -52,25 +47,23 @@ public RecoveryPointTierInformation() /// partial void CustomInit(); + /// - /// Gets or sets recovery point tier type. Possible values include: - /// 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + /// Gets or sets recovery point tier type. Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' /// - [JsonProperty(PropertyName = "type")] - public RecoveryPointTierType? Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public RecoveryPointTierType? Type {get; set; } /// - /// Gets or sets recovery point tier status. Possible values include: - /// 'Invalid', 'Valid', 'Disabled', 'Deleted', 'Rehydrated' + /// Gets or sets recovery point tier status. Possible values include: 'Invalid', 'Valid', 'Disabled', 'Deleted', 'Rehydrated' /// - [JsonProperty(PropertyName = "status")] - public RecoveryPointTierStatus? Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public RecoveryPointTierStatus? Status {get; set; } /// /// Gets or sets recovery point tier status. /// - [JsonProperty(PropertyName = "extendedInfo")] - public IDictionary ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public System.Collections.Generic.IDictionary ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierInformationV2.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierInformationV2.cs index dc3f086fe31b..e9110766d95d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierInformationV2.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierInformationV2.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class RecoveryPointTierInformationV2 : RecoveryPointTierInformation { /// - /// Initializes a new instance of the RecoveryPointTierInformationV2 - /// class. + /// Initializes a new instance of the RecoveryPointTierInformationV2 class. /// public RecoveryPointTierInformationV2() { @@ -29,17 +21,21 @@ public RecoveryPointTierInformationV2() } /// - /// Initializes a new instance of the RecoveryPointTierInformationV2 - /// class. + /// Initializes a new instance of the RecoveryPointTierInformationV2 class. /// - /// Recovery point tier type. Possible values - /// include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' - /// Recovery point tier status. Possible values - /// include: 'Invalid', 'Valid', 'Disabled', 'Deleted', + + /// Recovery point tier type. + /// Possible values include: 'Invalid', 'InstantRP', 'HardenedRP', 'ArchivedRP' + + /// Recovery point tier status. + /// Possible values include: 'Invalid', 'Valid', 'Disabled', 'Deleted', /// 'Rehydrated' - /// Recovery point tier status. - public RecoveryPointTierInformationV2(RecoveryPointTierType? type = default(RecoveryPointTierType?), RecoveryPointTierStatus? status = default(RecoveryPointTierStatus?), IDictionary extendedInfo = default(IDictionary)) - : base(type, status, extendedInfo) + + /// Recovery point tier status. + /// + public RecoveryPointTierInformationV2(RecoveryPointTierType? type = default(RecoveryPointTierType?), RecoveryPointTierStatus? status = default(RecoveryPointTierStatus?), System.Collections.Generic.IDictionary extendedInfo = default(System.Collections.Generic.IDictionary)) + + : base(type, status, extendedInfo) { CustomInit(); } @@ -50,4 +46,4 @@ public RecoveryPointTierInformationV2() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierStatus.cs index 9b061be0214c..647d27ae528f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierStatus.cs @@ -1,35 +1,28 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for RecoveryPointTierStatus. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum RecoveryPointTierStatus { - [EnumMember(Value = "Invalid")] + [System.Runtime.Serialization.EnumMember(Value = "Invalid")] Invalid, - [EnumMember(Value = "Valid")] + [System.Runtime.Serialization.EnumMember(Value = "Valid")] Valid, - [EnumMember(Value = "Disabled")] + [System.Runtime.Serialization.EnumMember(Value = "Disabled")] Disabled, - [EnumMember(Value = "Deleted")] + [System.Runtime.Serialization.EnumMember(Value = "Deleted")] Deleted, - [EnumMember(Value = "Rehydrated")] + [System.Runtime.Serialization.EnumMember(Value = "Rehydrated")] Rehydrated } internal static class RecoveryPointTierStatusEnumExtension @@ -38,7 +31,6 @@ internal static string ToSerializedValue(this RecoveryPointTierStatus? value) { return value == null ? null : ((RecoveryPointTierStatus)value).ToSerializedValue(); } - internal static string ToSerializedValue(this RecoveryPointTierStatus value) { switch( value ) @@ -56,7 +48,6 @@ internal static string ToSerializedValue(this RecoveryPointTierStatus value) } return null; } - internal static RecoveryPointTierStatus? ParseRecoveryPointTierStatus(this string value) { switch( value ) @@ -75,4 +66,4 @@ internal static string ToSerializedValue(this RecoveryPointTierStatus value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierType.cs index 8f4110892e4e..4e5eb5f88517 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryPointTierType.cs @@ -1,33 +1,26 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for RecoveryPointTierType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum RecoveryPointTierType { - [EnumMember(Value = "Invalid")] + [System.Runtime.Serialization.EnumMember(Value = "Invalid")] Invalid, - [EnumMember(Value = "InstantRP")] + [System.Runtime.Serialization.EnumMember(Value = "InstantRP")] InstantRP, - [EnumMember(Value = "HardenedRP")] + [System.Runtime.Serialization.EnumMember(Value = "HardenedRP")] HardenedRP, - [EnumMember(Value = "ArchivedRP")] + [System.Runtime.Serialization.EnumMember(Value = "ArchivedRP")] ArchivedRP } internal static class RecoveryPointTierTypeEnumExtension @@ -36,7 +29,6 @@ internal static string ToSerializedValue(this RecoveryPointTierType? value) { return value == null ? null : ((RecoveryPointTierType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this RecoveryPointTierType value) { switch( value ) @@ -52,7 +44,6 @@ internal static string ToSerializedValue(this RecoveryPointTierType value) } return null; } - internal static RecoveryPointTierType? ParseRecoveryPointTierType(this string value) { switch( value ) @@ -69,4 +60,4 @@ internal static string ToSerializedValue(this RecoveryPointTierType value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryType.cs index 389033fc6e6d..9775fa92fda8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RecoveryType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for RecoveryType. /// + + public static class RecoveryType { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class RecoveryType public const string RestoreDisks = "RestoreDisks"; public const string Offline = "Offline"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RehydrationPriority.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RehydrationPriority.cs index 2293fff697f7..1c62167d59b4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RehydrationPriority.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RehydrationPriority.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for RehydrationPriority. /// + + public static class RehydrationPriority { public const string Standard = "Standard"; public const string High = "High"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Resource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Resource.cs index cd7689bb516c..cfc6ab4c1c7f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Resource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Resource.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// ARM Resource. /// - public partial class Resource : IResource + public partial class Resource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the Resource class. @@ -33,23 +23,34 @@ public Resource() /// /// Initializes a new instance of the Resource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string)) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string)) + { - Id = id; - Name = name; - Type = type; - Location = location; - Tags = tags; - ETag = eTag; + this.Id = id; + this.Name = name; + this.Type = type; + this.Location = location; + this.Tags = tags; + this.ETag = eTag; CustomInit(); } @@ -58,42 +59,42 @@ public Resource() /// partial void CustomInit(); + /// /// Gets resource Id represents the complete path to the resource. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets resource name associated with the resource. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + 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; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets resource location. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets resource tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Gets or sets optional ETag. /// - [JsonProperty(PropertyName = "eTag")] - public string ETag { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "eTag")] + public string ETag {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardOperationDetail.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardOperationDetail.cs index a22abdf8ec3e..2efaaec7a2a9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardOperationDetail.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardOperationDetail.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; public partial class ResourceGuardOperationDetail { /// - /// Initializes a new instance of the ResourceGuardOperationDetail - /// class. + /// Initializes a new instance of the ResourceGuardOperationDetail class. /// public ResourceGuardOperationDetail() { @@ -25,13 +18,19 @@ public ResourceGuardOperationDetail() } /// - /// Initializes a new instance of the ResourceGuardOperationDetail - /// class. + /// Initializes a new instance of the ResourceGuardOperationDetail class. /// + + /// + /// + + /// + /// public ResourceGuardOperationDetail(string vaultCriticalOperation = default(string), string defaultResourceRequest = default(string)) + { - VaultCriticalOperation = vaultCriticalOperation; - DefaultResourceRequest = defaultResourceRequest; + this.VaultCriticalOperation = vaultCriticalOperation; + this.DefaultResourceRequest = defaultResourceRequest; CustomInit(); } @@ -40,15 +39,17 @@ public ResourceGuardOperationDetail() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "vaultCriticalOperation")] - public string VaultCriticalOperation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vaultCriticalOperation")] + public string VaultCriticalOperation {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "defaultResourceRequest")] - public string DefaultResourceRequest { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "defaultResourceRequest")] + public string DefaultResourceRequest {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardProxyBase.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardProxyBase.cs index 9f2b1a84170c..e31d34542a65 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardProxyBase.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardProxyBase.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class ResourceGuardProxyBase @@ -28,12 +20,25 @@ public ResourceGuardProxyBase() /// /// Initializes a new instance of the ResourceGuardProxyBase class. /// - public ResourceGuardProxyBase(string resourceGuardResourceId = default(string), IList resourceGuardOperationDetails = default(IList), string lastUpdatedTime = default(string), string description = default(string)) + + /// + /// + + /// + /// + + /// + /// + + /// + /// + public ResourceGuardProxyBase(string resourceGuardResourceId = default(string), System.Collections.Generic.IList resourceGuardOperationDetails = default(System.Collections.Generic.IList), string lastUpdatedTime = default(string), string description = default(string)) + { - ResourceGuardResourceId = resourceGuardResourceId; - ResourceGuardOperationDetails = resourceGuardOperationDetails; - LastUpdatedTime = lastUpdatedTime; - Description = description; + this.ResourceGuardResourceId = resourceGuardResourceId; + this.ResourceGuardOperationDetails = resourceGuardOperationDetails; + this.LastUpdatedTime = lastUpdatedTime; + this.Description = description; CustomInit(); } @@ -42,25 +47,29 @@ public ResourceGuardProxyBase() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "resourceGuardResourceId")] - public string ResourceGuardResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGuardResourceId")] + public string ResourceGuardResourceId {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "resourceGuardOperationDetails")] - public IList ResourceGuardOperationDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGuardOperationDetails")] + public System.Collections.Generic.IList ResourceGuardOperationDetails {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "lastUpdatedTime")] - public string LastUpdatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUpdatedTime")] + public string LastUpdatedTime {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardProxyBaseResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardProxyBaseResource.cs index 3363535a5ca6..29896f08f270 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardProxyBaseResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceGuardProxyBaseResource.cs @@ -1,25 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class ResourceGuardProxyBaseResource : Resource { /// - /// Initializes a new instance of the ResourceGuardProxyBaseResource - /// class. + /// Initializes a new instance of the ResourceGuardProxyBaseResource class. /// public ResourceGuardProxyBaseResource() { @@ -27,24 +18,35 @@ public ResourceGuardProxyBaseResource() } /// - /// Initializes a new instance of the ResourceGuardProxyBaseResource - /// class. + /// Initializes a new instance of the ResourceGuardProxyBaseResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// ResourceGuardProxyBaseResource - /// properties - public ResourceGuardProxyBaseResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), ResourceGuardProxyBase properties = default(ResourceGuardProxyBase)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// ResourceGuardProxyBaseResource properties + /// + public ResourceGuardProxyBaseResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), ResourceGuardProxyBase properties = default(ResourceGuardProxyBase)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -53,11 +55,11 @@ public ResourceGuardProxyBaseResource() /// partial void CustomInit(); + /// /// Gets or sets resourceGuardProxyBaseResource properties /// - [JsonProperty(PropertyName = "properties")] - public ResourceGuardProxyBase Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ResourceGuardProxyBase Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceHealthDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceHealthDetails.cs index f475dfd42096..9b33fc6cc6b1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceHealthDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceHealthDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,16 +23,25 @@ public ResourceHealthDetails() /// /// Initializes a new instance of the ResourceHealthDetails class. /// - /// Health Code - /// Health Title - /// Health Message - /// Health Recommended Actions - public ResourceHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), IList recommendations = default(IList)) + + /// Health Code + /// + + /// Health Title + /// + + /// Health Message + /// + + /// Health Recommended Actions + /// + public ResourceHealthDetails(int? code = default(int?), string title = default(string), string message = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - Code = code; - Title = title; - Message = message; - Recommendations = recommendations; + this.Code = code; + this.Title = title; + this.Message = message; + this.Recommendations = recommendations; CustomInit(); } @@ -49,29 +50,29 @@ public ResourceHealthDetails() /// partial void CustomInit(); + /// /// Gets health Code /// - [JsonProperty(PropertyName = "code")] - public int? Code { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public int? Code {get; private set; } /// /// Gets health Title /// - [JsonProperty(PropertyName = "title")] - public string Title { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "title")] + public string Title {get; private set; } /// /// Gets health Message /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } /// /// Gets health Recommended Actions /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceHealthStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceHealthStatus.cs index 8c14a42e9a72..c168bb9fcc8c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceHealthStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceHealthStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for ResourceHealthStatus. /// + + public static class ResourceHealthStatus { public const string Healthy = "Healthy"; @@ -23,4 +20,4 @@ public static class ResourceHealthStatus public const string PersistentUnhealthy = "PersistentUnhealthy"; public const string Invalid = "Invalid"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceList.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceList.cs index 3a01f95d5f6a..a46f6eaf9f3b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceList.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ResourceList.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,14 @@ public ResourceList() /// /// Initializes a new instance of the ResourceList class. /// - /// The uri to fetch the next page of resources. - /// Call ListNext() fetches next page of resources. + + /// The uri to fetch the next page of resources. Call ListNext() fetches next + /// page of resources. + /// public ResourceList(string nextLink = default(string)) + { - NextLink = nextLink; + this.NextLink = nextLink; CustomInit(); } @@ -42,12 +39,12 @@ public ResourceList() /// partial void CustomInit(); + /// - /// Gets or sets the uri to fetch the next page of resources. Call - /// ListNext() fetches next page of resources. + /// Gets or sets the uri to fetch the next page of resources. Call ListNext() + /// fetches next page of resources. /// - [JsonProperty(PropertyName = "nextLink")] - public string NextLink { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "nextLink")] + public string NextLink {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreFileSpecs.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreFileSpecs.cs index fa04c7e6ce72..421f97f63232 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreFileSpecs.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreFileSpecs.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,21 @@ public RestoreFileSpecs() /// /// Initializes a new instance of the RestoreFileSpecs class. /// - /// Source File/Folder path - /// Indicates what the Path variable stands - /// for - /// Destination folder path in target - /// FileShare + + /// Source File/Folder path + /// + + /// Indicates what the Path variable stands for + /// + + /// Destination folder path in target FileShare + /// public RestoreFileSpecs(string path = default(string), string fileSpecType = default(string), string targetFolderPath = default(string)) + { - Path = path; - FileSpecType = fileSpecType; - TargetFolderPath = targetFolderPath; + this.Path = path; + this.FileSpecType = fileSpecType; + this.TargetFolderPath = targetFolderPath; CustomInit(); } @@ -47,23 +46,23 @@ public RestoreFileSpecs() /// partial void CustomInit(); + /// /// Gets or sets source File/Folder path /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } /// /// Gets or sets indicates what the Path variable stands for /// - [JsonProperty(PropertyName = "fileSpecType")] - public string FileSpecType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fileSpecType")] + public string FileSpecType {get; set; } /// /// Gets or sets destination folder path in target FileShare /// - [JsonProperty(PropertyName = "targetFolderPath")] - public string TargetFolderPath { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetFolderPath")] + public string TargetFolderPath {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestorePointQueryType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestorePointQueryType.cs index 9641dfa036b4..bc3f5d5300bc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestorePointQueryType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestorePointQueryType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for RestorePointQueryType. /// + + public static class RestorePointQueryType { public const string Invalid = "Invalid"; @@ -26,4 +23,4 @@ public static class RestorePointQueryType public const string SnapshotFull = "SnapshotFull"; public const string SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestorePointType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestorePointType.cs index 383cec9cdd7d..f0fd7353927e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestorePointType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestorePointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for RestorePointType. /// + + public static class RestorePointType { public const string Invalid = "Invalid"; @@ -24,4 +21,4 @@ public static class RestorePointType public const string SnapshotFull = "SnapshotFull"; public const string SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequest.cs index 1b1ec9952596..6473750156a4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -35,4 +29,4 @@ public RestoreRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequestResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequestResource.cs index 0eddf6f7ee93..0f9c4c6b5c96 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequestResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequestResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,20 +24,33 @@ public RestoreRequestResource() /// /// Initializes a new instance of the RestoreRequestResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// RestoreRequestResource properties - public RestoreRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), RestoreRequest properties = default(RestoreRequest)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// RestoreRequestResource properties + /// + public RestoreRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), RestoreRequest properties = default(RestoreRequest)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -54,11 +59,11 @@ public RestoreRequestResource() /// partial void CustomInit(); + /// /// Gets or sets restoreRequestResource properties /// - [JsonProperty(PropertyName = "properties")] - public RestoreRequest Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RestoreRequest Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequestType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequestType.cs index e14ffbe19f5e..249496e06079 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequestType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RestoreRequestType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for RestoreRequestType. /// + + public static class RestoreRequestType { public const string Invalid = "Invalid"; public const string FullShareRestore = "FullShareRestore"; public const string ItemLevelRestore = "ItemLevelRestore"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionDuration.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionDuration.cs index 1d17732ec74f..cd7952c732f0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionDuration.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionDuration.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,20 @@ public RetentionDuration() /// /// Initializes a new instance of the RetentionDuration class. /// - /// Count of duration types. Retention duration is - /// obtained by the counting the duration type Count times. - /// For example, when Count = 3 and DurationType = Weeks, retention - /// duration will be three weeks. - /// Retention duration type of retention - /// policy. Possible values include: 'Invalid', 'Days', 'Weeks', - /// 'Months', 'Years' + + /// Count of duration types. Retention duration is obtained by the counting the + /// duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration + /// will be three weeks. + /// + + /// Retention duration type of retention policy. + /// Possible values include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' public RetentionDuration(int? count = default(int?), string durationType = default(string)) + { - Count = count; - DurationType = durationType; + this.Count = count; + this.DurationType = durationType; CustomInit(); } @@ -48,21 +45,20 @@ public RetentionDuration() /// partial void CustomInit(); + /// - /// Gets or sets count of duration types. Retention duration is - /// obtained by the counting the duration type Count times. - /// For example, when Count = 3 and DurationType = Weeks, retention - /// duration will be three weeks. + /// Gets or sets count of duration types. Retention duration is obtained by the + /// counting the duration type Count times. + /// For example, when Count = 3 and DurationType = Weeks, retention duration + /// will be three weeks. /// - [JsonProperty(PropertyName = "count")] - public int? Count { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "count")] + public int? Count {get; set; } /// - /// Gets or sets retention duration type of retention policy. Possible - /// values include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' + /// Gets or sets retention duration type of retention policy. Possible values include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' /// - [JsonProperty(PropertyName = "durationType")] - public string DurationType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "durationType")] + public string DurationType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionDurationType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionDurationType.cs index 632c6881fbe9..394eb26a21de 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionDurationType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionDurationType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for RetentionDurationType. /// + + public static class RetentionDurationType { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class RetentionDurationType public const string Months = "Months"; public const string Years = "Years"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionPolicy.cs index dd7d21c0561a..313aef4a657a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionPolicy.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public RetentionPolicy() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionScheduleFormat.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionScheduleFormat.cs index e61a2e019699..8bad79ac28e0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionScheduleFormat.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/RetentionScheduleFormat.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for RetentionScheduleFormat. /// + + public static class RetentionScheduleFormat { public const string Invalid = "Invalid"; public const string Daily = "Daily"; public const string Weekly = "Weekly"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectory.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectory.cs index b161a8939887..a622389cc717 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectory.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectory.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,21 @@ public SQLDataDirectory() /// /// Initializes a new instance of the SQLDataDirectory class. /// - /// Type of data directory mapping. Possible values - /// include: 'Invalid', 'Data', 'Log' - /// File path - /// Logical name of the file + + /// Type of data directory mapping + /// Possible values include: 'Invalid', 'Data', 'Log' + + /// File path + /// + + /// Logical name of the file + /// public SQLDataDirectory(string type = default(string), string path = default(string), string logicalName = default(string)) + { - Type = type; - Path = path; - LogicalName = logicalName; + this.Type = type; + this.Path = path; + this.LogicalName = logicalName; CustomInit(); } @@ -46,24 +46,23 @@ public SQLDataDirectory() /// partial void CustomInit(); + /// - /// Gets or sets type of data directory mapping. Possible values - /// include: 'Invalid', 'Data', 'Log' + /// Gets or sets type of data directory mapping Possible values include: 'Invalid', 'Data', 'Log' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Gets or sets file path /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } /// /// Gets or sets logical name of the file /// - [JsonProperty(PropertyName = "logicalName")] - public string LogicalName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "logicalName")] + public string LogicalName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectoryMapping.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectoryMapping.cs index 69053c0d3b73..728bd3c709ea 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectoryMapping.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectoryMapping.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,25 @@ public SQLDataDirectoryMapping() /// /// Initializes a new instance of the SQLDataDirectoryMapping class. /// - /// Type of data directory mapping. Possible - /// values include: 'Invalid', 'Data', 'Log' - /// Restore source logical name - /// path - /// Restore source path - /// Target path + + /// Type of data directory mapping + /// Possible values include: 'Invalid', 'Data', 'Log' + + /// Restore source logical name path + /// + + /// Restore source path + /// + + /// Target path + /// public SQLDataDirectoryMapping(string mappingType = default(string), string sourceLogicalName = default(string), string sourcePath = default(string), string targetPath = default(string)) + { - MappingType = mappingType; - SourceLogicalName = sourceLogicalName; - SourcePath = sourcePath; - TargetPath = targetPath; + this.MappingType = mappingType; + this.SourceLogicalName = sourceLogicalName; + this.SourcePath = sourcePath; + this.TargetPath = targetPath; CustomInit(); } @@ -49,30 +50,29 @@ public SQLDataDirectoryMapping() /// partial void CustomInit(); + /// - /// Gets or sets type of data directory mapping. Possible values - /// include: 'Invalid', 'Data', 'Log' + /// Gets or sets type of data directory mapping Possible values include: 'Invalid', 'Data', 'Log' /// - [JsonProperty(PropertyName = "mappingType")] - public string MappingType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mappingType")] + public string MappingType {get; set; } /// /// Gets or sets restore source logical name path /// - [JsonProperty(PropertyName = "sourceLogicalName")] - public string SourceLogicalName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceLogicalName")] + public string SourceLogicalName {get; set; } /// /// Gets or sets restore source path /// - [JsonProperty(PropertyName = "sourcePath")] - public string SourcePath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourcePath")] + public string SourcePath {get; set; } /// /// Gets or sets target path /// - [JsonProperty(PropertyName = "targetPath")] - public string TargetPath { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetPath")] + public string TargetPath {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectoryType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectoryType.cs index d1ca0439af69..70eefa71e852 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectoryType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SQLDataDirectoryType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for SQLDataDirectoryType. /// + + public static class SQLDataDirectoryType { public const string Invalid = "Invalid"; public const string Data = "Data"; public const string Log = "Log"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SchedulePolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SchedulePolicy.cs index 4cb8e042ce86..95916231f730 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SchedulePolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SchedulePolicy.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public SchedulePolicy() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ScheduleRunType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ScheduleRunType.cs index 14ff24041a5c..7b9a04f9347b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ScheduleRunType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ScheduleRunType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for ScheduleRunType. /// + + public static class ScheduleRunType { public const string Invalid = "Invalid"; @@ -21,4 +18,4 @@ public static class ScheduleRunType public const string Weekly = "Weekly"; public const string Hourly = "Hourly"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SecurityPinBase.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SecurityPinBase.cs index 9c878f898694..8f5a5a09ca74 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SecurityPinBase.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SecurityPinBase.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,11 +23,13 @@ public SecurityPinBase() /// /// Initializes a new instance of the SecurityPinBase class. /// - /// ResourceGuard - /// Operation Requests - public SecurityPinBase(IList resourceGuardOperationRequests = default(IList)) + + /// ResourceGuard Operation Requests + /// + public SecurityPinBase(System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList)) + { - ResourceGuardOperationRequests = resourceGuardOperationRequests; + this.ResourceGuardOperationRequests = resourceGuardOperationRequests; CustomInit(); } @@ -44,11 +38,11 @@ public SecurityPinBase() /// partial void CustomInit(); + /// /// Gets or sets resourceGuard Operation Requests /// - [JsonProperty(PropertyName = "resourceGuardOperationRequests")] - public IList ResourceGuardOperationRequests { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public System.Collections.Generic.IList ResourceGuardOperationRequests {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Settings.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Settings.cs index a59fed460b3c..5bbf78abd092 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Settings.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Settings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,23 @@ public Settings() /// /// Initializes a new instance of the Settings class. /// - /// TimeZone optional input as string. For - /// example: TimeZone = "Pacific Standard Time". - /// SQL compression flag - /// Workload compression flag. This has - /// been added so that 'isSqlCompression' - /// will be deprecated once clients upgrade to consider this - /// flag. + + /// TimeZone optional input as string. For example: TimeZone = "Pacific + /// Standard Time". + /// + + /// SQL compression flag + /// + + /// Workload compression flag. This has been added so that 'isSqlCompression' + /// will be deprecated once clients upgrade to consider this flag. + /// public Settings(string timeZone = default(string), bool? issqlcompression = default(bool?), bool? isCompression = default(bool?)) + { - TimeZone = timeZone; - Issqlcompression = issqlcompression; - IsCompression = isCompression; + this.TimeZone = timeZone; + this.Issqlcompression = issqlcompression; + this.IsCompression = isCompression; CustomInit(); } @@ -49,26 +48,26 @@ public Settings() /// partial void CustomInit(); + /// - /// Gets or sets timeZone optional input as string. For example: - /// TimeZone = "Pacific Standard Time". + /// Gets or sets timeZone optional input as string. For example: TimeZone = + /// "Pacific Standard Time". /// - [JsonProperty(PropertyName = "timeZone")] - public string TimeZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "timeZone")] + public string TimeZone {get; set; } /// - /// Gets or sets SQL compression flag + /// Gets or sets sQL compression flag /// - [JsonProperty(PropertyName = "issqlcompression")] - public bool? Issqlcompression { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "issqlcompression")] + public bool? Issqlcompression {get; set; } /// /// Gets or sets workload compression flag. This has been added so that - /// 'isSqlCompression' + /// 'isSqlCompression' /// will be deprecated once clients upgrade to consider this flag. /// - [JsonProperty(PropertyName = "isCompression")] - public bool? IsCompression { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isCompression")] + public bool? IsCompression {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleRetentionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleRetentionPolicy.cs index 5e8d0b2e1091..8825f4e56a8a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleRetentionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleRetentionPolicy.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +24,13 @@ public SimpleRetentionPolicy() /// /// Initializes a new instance of the SimpleRetentionPolicy class. /// - /// Retention duration of the - /// protection policy. + + /// Retention duration of the protection policy. + /// public SimpleRetentionPolicy(RetentionDuration retentionDuration = default(RetentionDuration)) + { - RetentionDuration = retentionDuration; + this.RetentionDuration = retentionDuration; CustomInit(); } @@ -43,11 +39,11 @@ public SimpleRetentionPolicy() /// partial void CustomInit(); + /// /// Gets or sets retention duration of the protection policy. /// - [JsonProperty(PropertyName = "retentionDuration")] - public RetentionDuration RetentionDuration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionDuration")] + public RetentionDuration RetentionDuration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleSchedulePolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleSchedulePolicy.cs index aad1a6a48f01..d5dd3762ad0d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleSchedulePolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleSchedulePolicy.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,23 +24,29 @@ public SimpleSchedulePolicy() /// /// Initializes a new instance of the SimpleSchedulePolicy class. /// - /// Frequency of the schedule - /// operation of this policy. Possible values include: 'Invalid', - /// 'Daily', 'Weekly', 'Hourly' - /// List of days of week this schedule - /// has to be run. - /// List of times of day this schedule - /// has to be run. - /// Hourly Schedule of this Policy - /// At every number weeks this - /// schedule has to be run. - public SimpleSchedulePolicy(string scheduleRunFrequency = default(string), IList scheduleRunDays = default(IList), IList scheduleRunTimes = default(IList), HourlySchedule hourlySchedule = default(HourlySchedule), int? scheduleWeeklyFrequency = default(int?)) + + /// Frequency of the schedule operation of this policy. + /// Possible values include: 'Invalid', 'Daily', 'Weekly', 'Hourly' + + /// List of days of week this schedule has to be run. + /// + + /// List of times of day this schedule has to be run. + /// + + /// Hourly Schedule of this Policy + /// + + /// At every number weeks this schedule has to be run. + /// + public SimpleSchedulePolicy(string scheduleRunFrequency = default(string), System.Collections.Generic.IList scheduleRunDays = default(System.Collections.Generic.IList), System.Collections.Generic.IList scheduleRunTimes = default(System.Collections.Generic.IList), HourlySchedule hourlySchedule = default(HourlySchedule), int? scheduleWeeklyFrequency = default(int?)) + { - ScheduleRunFrequency = scheduleRunFrequency; - ScheduleRunDays = scheduleRunDays; - ScheduleRunTimes = scheduleRunTimes; - HourlySchedule = hourlySchedule; - ScheduleWeeklyFrequency = scheduleWeeklyFrequency; + this.ScheduleRunFrequency = scheduleRunFrequency; + this.ScheduleRunDays = scheduleRunDays; + this.ScheduleRunTimes = scheduleRunTimes; + this.HourlySchedule = hourlySchedule; + this.ScheduleWeeklyFrequency = scheduleWeeklyFrequency; CustomInit(); } @@ -57,36 +55,35 @@ public SimpleSchedulePolicy() /// partial void CustomInit(); + /// - /// Gets or sets frequency of the schedule operation of this policy. - /// Possible values include: 'Invalid', 'Daily', 'Weekly', 'Hourly' + /// Gets or sets frequency of the schedule operation of this policy. Possible values include: 'Invalid', 'Daily', 'Weekly', 'Hourly' /// - [JsonProperty(PropertyName = "scheduleRunFrequency")] - public string ScheduleRunFrequency { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleRunFrequency")] + public string ScheduleRunFrequency {get; set; } /// /// Gets or sets list of days of week this schedule has to be run. /// - [JsonProperty(PropertyName = "scheduleRunDays")] - public IList ScheduleRunDays { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleRunDays")] + public System.Collections.Generic.IList ScheduleRunDays {get; set; } /// /// Gets or sets list of times of day this schedule has to be run. /// - [JsonProperty(PropertyName = "scheduleRunTimes")] - public IList ScheduleRunTimes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleRunTimes")] + public System.Collections.Generic.IList ScheduleRunTimes {get; set; } /// /// Gets or sets hourly Schedule of this Policy /// - [JsonProperty(PropertyName = "hourlySchedule")] - public HourlySchedule HourlySchedule { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hourlySchedule")] + public HourlySchedule HourlySchedule {get; set; } /// /// Gets or sets at every number weeks this schedule has to be run. /// - [JsonProperty(PropertyName = "scheduleWeeklyFrequency")] - public int? ScheduleWeeklyFrequency { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleWeeklyFrequency")] + public int? ScheduleWeeklyFrequency {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleSchedulePolicyV2.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleSchedulePolicyV2.cs index b85993ad43bb..b1b3904dfe98 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleSchedulePolicyV2.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SimpleSchedulePolicyV2.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,18 +24,25 @@ public SimpleSchedulePolicyV2() /// /// Initializes a new instance of the SimpleSchedulePolicyV2 class. /// - /// Frequency of the schedule - /// operation of this policy. Possible values include: 'Invalid', - /// 'Daily', 'Weekly', 'Hourly' - /// hourly schedule of this policy - /// Daily schedule of this policy - /// Weekly schedule of this policy + + /// Frequency of the schedule operation of this policy. + /// Possible values include: 'Invalid', 'Daily', 'Weekly', 'Hourly' + + /// hourly schedule of this policy + /// + + /// Daily schedule of this policy + /// + + /// Weekly schedule of this policy + /// public SimpleSchedulePolicyV2(string scheduleRunFrequency = default(string), HourlySchedule hourlySchedule = default(HourlySchedule), DailySchedule dailySchedule = default(DailySchedule), WeeklySchedule weeklySchedule = default(WeeklySchedule)) + { - ScheduleRunFrequency = scheduleRunFrequency; - HourlySchedule = hourlySchedule; - DailySchedule = dailySchedule; - WeeklySchedule = weeklySchedule; + this.ScheduleRunFrequency = scheduleRunFrequency; + this.HourlySchedule = hourlySchedule; + this.DailySchedule = dailySchedule; + this.WeeklySchedule = weeklySchedule; CustomInit(); } @@ -50,30 +51,29 @@ public SimpleSchedulePolicyV2() /// partial void CustomInit(); + /// - /// Gets or sets frequency of the schedule operation of this policy. - /// Possible values include: 'Invalid', 'Daily', 'Weekly', 'Hourly' + /// Gets or sets frequency of the schedule operation of this policy. Possible values include: 'Invalid', 'Daily', 'Weekly', 'Hourly' /// - [JsonProperty(PropertyName = "scheduleRunFrequency")] - public string ScheduleRunFrequency { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleRunFrequency")] + public string ScheduleRunFrequency {get; set; } /// /// Gets or sets hourly schedule of this policy /// - [JsonProperty(PropertyName = "hourlySchedule")] - public HourlySchedule HourlySchedule { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hourlySchedule")] + public HourlySchedule HourlySchedule {get; set; } /// /// Gets or sets daily schedule of this policy /// - [JsonProperty(PropertyName = "dailySchedule")] - public DailySchedule DailySchedule { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dailySchedule")] + public DailySchedule DailySchedule {get; set; } /// /// Gets or sets weekly schedule of this policy /// - [JsonProperty(PropertyName = "weeklySchedule")] - public WeeklySchedule WeeklySchedule { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "weeklySchedule")] + public WeeklySchedule WeeklySchedule {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SoftDeleteFeatureState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SoftDeleteFeatureState.cs index a5ca830adfb9..7d552465a395 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SoftDeleteFeatureState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SoftDeleteFeatureState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for SoftDeleteFeatureState. /// + + public static class SoftDeleteFeatureState { public const string Invalid = "Invalid"; public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/StorageType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/StorageType.cs index 683d69095d54..2db5fb6211e8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/StorageType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/StorageType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for StorageType. /// + + public static class StorageType { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class StorageType public const string ZoneRedundant = "ZoneRedundant"; public const string ReadAccessGeoZoneRedundant = "ReadAccessGeoZoneRedundant"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/StorageTypeState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/StorageTypeState.cs index 395e023dc188..85485555bfd8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/StorageTypeState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/StorageTypeState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for StorageTypeState. /// + + public static class StorageTypeState { public const string Invalid = "Invalid"; public const string Locked = "Locked"; public const string Unlocked = "Unlocked"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SubProtectionPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SubProtectionPolicy.cs index a50e6c80fbd1..e870b95d0fae 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SubProtectionPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SubProtectionPolicy.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,25 +23,28 @@ public SubProtectionPolicy() /// /// Initializes a new instance of the SubProtectionPolicy class. /// - /// Type of backup policy type. Possible - /// values include: 'Invalid', 'Full', 'Differential', 'Log', - /// 'CopyOnlyFull', 'Incremental', 'SnapshotFull', - /// 'SnapshotCopyOnlyFull' - /// Backup schedule specified as part of - /// backup policy. - /// Retention policy with the details on - /// backup copy retention ranges. - /// Tiering policy to automatically move - /// RPs to another tier. + + /// Type of backup policy type + /// Possible values include: 'Invalid', 'Full', 'Differential', 'Log', + /// 'CopyOnlyFull', 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + + /// Backup schedule specified as part of backup policy. + /// + + /// Retention policy with the details on backup copy retention ranges. + /// + + /// Tiering policy to automatically move RPs to another tier. /// Key is Target Tier, defined in RecoveryPointTierType enum. - /// Tiering policy specifies the criteria to move RP to the target - /// tier. - public SubProtectionPolicy(string policyType = default(string), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), IDictionary tieringPolicy = default(IDictionary)) + /// Tiering policy specifies the criteria to move RP to the target tier. + /// + public SubProtectionPolicy(string policyType = default(string), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), System.Collections.Generic.IDictionary tieringPolicy = default(System.Collections.Generic.IDictionary)) + { - PolicyType = policyType; - SchedulePolicy = schedulePolicy; - RetentionPolicy = retentionPolicy; - TieringPolicy = tieringPolicy; + this.PolicyType = policyType; + this.SchedulePolicy = schedulePolicy; + this.RetentionPolicy = retentionPolicy; + this.TieringPolicy = tieringPolicy; CustomInit(); } @@ -58,36 +53,32 @@ public SubProtectionPolicy() /// partial void CustomInit(); + /// - /// Gets or sets type of backup policy type. Possible values include: - /// 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull', - /// 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' + /// Gets or sets type of backup policy type Possible values include: 'Invalid', 'Full', 'Differential', 'Log', 'CopyOnlyFull', 'Incremental', 'SnapshotFull', 'SnapshotCopyOnlyFull' /// - [JsonProperty(PropertyName = "policyType")] - public string PolicyType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyType")] + public string PolicyType {get; set; } /// /// Gets or sets backup schedule specified as part of backup policy. /// - [JsonProperty(PropertyName = "schedulePolicy")] - public SchedulePolicy SchedulePolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "schedulePolicy")] + public SchedulePolicy SchedulePolicy {get; set; } /// - /// Gets or sets retention policy with the details on backup copy - /// retention ranges. + /// Gets or sets retention policy with the details on backup copy retention + /// ranges. /// - [JsonProperty(PropertyName = "retentionPolicy")] - public RetentionPolicy RetentionPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionPolicy")] + public RetentionPolicy RetentionPolicy {get; set; } /// - /// Gets or sets tiering policy to automatically move RPs to another - /// tier. + /// Gets or sets tiering policy to automatically move RPs to another tier. /// Key is Target Tier, defined in RecoveryPointTierType enum. - /// Tiering policy specifies the criteria to move RP to the target - /// tier. + /// Tiering policy specifies the criteria to move RP to the target tier. /// - [JsonProperty(PropertyName = "tieringPolicy")] - public IDictionary TieringPolicy { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tieringPolicy")] + public System.Collections.Generic.IDictionary TieringPolicy {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SupportStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SupportStatus.cs index ff1f47f4a3fa..5663979502f1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SupportStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/SupportStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for SupportStatus. /// + + public static class SupportStatus { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class SupportStatus public const string DefaultON = "DefaultON"; public const string NotSupported = "NotSupported"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TargetAFSRestoreInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TargetAFSRestoreInfo.cs index 09856dd55f26..88ee8ea96815 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TargetAFSRestoreInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TargetAFSRestoreInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public TargetAFSRestoreInfo() /// /// Initializes a new instance of the TargetAFSRestoreInfo class. /// - /// File share name - /// Target file share resource ARM - /// ID + + /// File share name + /// + + /// Target file share resource ARM ID + /// public TargetAFSRestoreInfo(string name = default(string), string targetResourceId = default(string)) + { - Name = name; - TargetResourceId = targetResourceId; + this.Name = name; + this.TargetResourceId = targetResourceId; CustomInit(); } @@ -44,17 +42,17 @@ public TargetAFSRestoreInfo() /// partial void CustomInit(); + /// /// Gets or sets file share name /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets target file share resource ARM ID /// - [JsonProperty(PropertyName = "targetResourceId")] - public string TargetResourceId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceId")] + public string TargetResourceId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TargetRestoreInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TargetRestoreInfo.cs index 579e093b0b60..5d0e613c5e58 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TargetRestoreInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TargetRestoreInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,21 +23,26 @@ public TargetRestoreInfo() /// /// Initializes a new instance of the TargetRestoreInfo class. /// - /// Can Overwrite if Target DataBase - /// already exists. Possible values include: 'Invalid', - /// 'FailOnConflict', 'Overwrite' - /// Resource Id name of the container in - /// which Target DataBase resides - /// Database name InstanceName/DataBaseName - /// for SQL or System/DbName for SAP Hana - /// Target directory - /// location for restore as files. + + /// Can Overwrite if Target DataBase already exists + /// Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' + + /// Resource Id name of the container in which Target DataBase resides + /// + + /// Database name InstanceName/DataBaseName for SQL or System/DbName for SAP + /// Hana + /// + + /// Target directory location for restore as files. + /// public TargetRestoreInfo(string overwriteOption = default(string), string containerId = default(string), string databaseName = default(string), string targetDirectoryForFileRestore = default(string)) + { - OverwriteOption = overwriteOption; - ContainerId = containerId; - DatabaseName = databaseName; - TargetDirectoryForFileRestore = targetDirectoryForFileRestore; + this.OverwriteOption = overwriteOption; + this.ContainerId = containerId; + this.DatabaseName = databaseName; + this.TargetDirectoryForFileRestore = targetDirectoryForFileRestore; CustomInit(); } @@ -52,32 +51,31 @@ public TargetRestoreInfo() /// partial void CustomInit(); + /// - /// Gets or sets can Overwrite if Target DataBase already exists. - /// Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' + /// Gets or sets can Overwrite if Target DataBase already exists Possible values include: 'Invalid', 'FailOnConflict', 'Overwrite' /// - [JsonProperty(PropertyName = "overwriteOption")] - public string OverwriteOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "overwriteOption")] + public string OverwriteOption {get; set; } /// - /// Gets or sets resource Id name of the container in which Target - /// DataBase resides + /// Gets or sets resource Id name of the container in which Target DataBase + /// resides /// - [JsonProperty(PropertyName = "containerId")] - public string ContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerId")] + public string ContainerId {get; set; } /// /// Gets or sets database name InstanceName/DataBaseName for SQL or /// System/DbName for SAP Hana /// - [JsonProperty(PropertyName = "databaseName")] - public string DatabaseName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "databaseName")] + public string DatabaseName {get; set; } /// /// Gets or sets target directory location for restore as files. /// - [JsonProperty(PropertyName = "targetDirectoryForFileRestore")] - public string TargetDirectoryForFileRestore { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDirectoryForFileRestore")] + public string TargetDirectoryForFileRestore {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TieringMode.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TieringMode.cs index a260a60711d7..fed26d8e151f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TieringMode.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TieringMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for TieringMode. /// + + public static class TieringMode { public const string Invalid = "Invalid"; @@ -21,4 +18,4 @@ public static class TieringMode public const string TierAfter = "TierAfter"; public const string DoNotTier = "DoNotTier"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TieringPolicy.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TieringPolicy.cs index 9019e160dee0..794a8386877c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TieringPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TieringPolicy.cs @@ -1,22 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// /// Tiering Policy for a target tier. - /// If the policy is not specified for a given target tier, service retains - /// the existing configured tiering policy for that tier + /// If the policy is not specified for a given target tier, service retains the + /// existing configured tiering policy for that tier /// public partial class TieringPolicy { @@ -31,27 +25,30 @@ public TieringPolicy() /// /// Initializes a new instance of the TieringPolicy class. /// - /// Tiering Mode to control automatic tiering - /// of recovery points. Supported values are: - /// 1. TierRecommended: Tier all recovery points recommended to be - /// tiered - /// 2. TierAfter: Tier all recovery points after a fixed period, as - /// specified in duration + durationType below. - /// 3. DoNotTier: Do not tier any recovery points. Possible values - /// include: 'Invalid', 'TierRecommended', 'TierAfter', + + /// Tiering Mode to control automatic tiering of recovery points. Supported + /// values are: + /// 1. TierRecommended: Tier all recovery points recommended to be tiered + /// 2. TierAfter: Tier all recovery points after a fixed period, as specified + /// in duration + durationType below. + /// 3. DoNotTier: Do not tier any recovery points + /// Possible values include: 'Invalid', 'TierRecommended', 'TierAfter', /// 'DoNotTier' - /// Number of days/weeks/months/years to retain - /// backups in current tier before tiering. - /// Used only if TieringMode is set to TierAfter - /// Retention duration type: - /// days/weeks/months/years - /// Used only if TieringMode is set to TierAfter. Possible values - /// include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' + + /// Number of days/weeks/months/years to retain backups in current tier before + /// tiering. + /// Used only if TieringMode is set to TierAfter + /// + + /// Retention duration type: days/weeks/months/years + /// Used only if TieringMode is set to TierAfter + /// Possible values include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' public TieringPolicy(string tieringMode = default(string), int? duration = default(int?), string durationType = default(string)) + { - TieringMode = tieringMode; - Duration = duration; - DurationType = durationType; + this.TieringMode = tieringMode; + this.Duration = duration; + this.DurationType = durationType; CustomInit(); } @@ -60,34 +57,31 @@ public TieringPolicy() /// partial void CustomInit(); + /// - /// Gets or sets tiering Mode to control automatic tiering of recovery - /// points. Supported values are: - /// 1. TierRecommended: Tier all recovery points recommended to be - /// tiered - /// 2. TierAfter: Tier all recovery points after a fixed period, as - /// specified in duration + durationType below. - /// 3. DoNotTier: Do not tier any recovery points. Possible values - /// include: 'Invalid', 'TierRecommended', 'TierAfter', 'DoNotTier' + /// Gets or sets tiering Mode to control automatic tiering of recovery points. + /// Supported values are: + /// 1. TierRecommended: Tier all recovery points recommended to be tiered + /// 2. TierAfter: Tier all recovery points after a fixed period, as specified + /// in duration + durationType below. + /// 3. DoNotTier: Do not tier any recovery points Possible values include: 'Invalid', 'TierRecommended', 'TierAfter', 'DoNotTier' /// - [JsonProperty(PropertyName = "tieringMode")] - public string TieringMode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tieringMode")] + public string TieringMode {get; set; } /// - /// Gets or sets number of days/weeks/months/years to retain backups in - /// current tier before tiering. + /// Gets or sets number of days/weeks/months/years to retain backups in current + /// tier before tiering. /// Used only if TieringMode is set to TierAfter /// - [JsonProperty(PropertyName = "duration")] - public int? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public int? Duration {get; set; } /// /// Gets or sets retention duration type: days/weeks/months/years - /// Used only if TieringMode is set to TierAfter. Possible values - /// include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' + /// Used only if TieringMode is set to TierAfter Possible values include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' /// - [JsonProperty(PropertyName = "durationType")] - public string DurationType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "durationType")] + public string DurationType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TokenInformation.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TokenInformation.cs index 948722fe7b46..293e3429cca7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TokenInformation.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TokenInformation.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,21 @@ public TokenInformation() /// /// Initializes a new instance of the TokenInformation class. /// - /// Token value. - /// Expiry time of token. - /// Security PIN - public TokenInformation(string token = default(string), long? expiryTimeInUtcTicks = default(long?), string securityPIN = default(string)) + + /// Token value. + /// + + /// Expiry time of token. + /// + + /// Security PIN + /// + public TokenInformation(string token = default(string), long? expiryTimeInUtcTicks = default(long?), string securityPin = default(string)) + { - Token = token; - ExpiryTimeInUtcTicks = expiryTimeInUtcTicks; - SecurityPIN = securityPIN; + this.Token = token; + this.ExpiryTimeInUtcTicks = expiryTimeInUtcTicks; + this.SecurityPin = securityPin; CustomInit(); } @@ -45,23 +46,23 @@ public TokenInformation() /// partial void CustomInit(); + /// /// Gets or sets token value. /// - [JsonProperty(PropertyName = "token")] - public string Token { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "token")] + public string Token {get; set; } /// /// Gets or sets expiry time of token. /// - [JsonProperty(PropertyName = "expiryTimeInUtcTicks")] - public long? ExpiryTimeInUtcTicks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "expiryTimeInUtcTicks")] + public long? ExpiryTimeInUtcTicks {get; set; } /// /// Gets or sets security PIN /// - [JsonProperty(PropertyName = "securityPIN")] - public string SecurityPIN { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "securityPIN")] + public string SecurityPin {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TriggerDataMoveRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TriggerDataMoveRequest.cs index 00e7dc56891d..8e757d52da1b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TriggerDataMoveRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/TriggerDataMoveRequest.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,21 +23,33 @@ public TriggerDataMoveRequest() /// /// Initializes a new instance of the TriggerDataMoveRequest class. /// - /// ARM Id of source vault - /// Source Region - /// DataMove Level. Possible values - /// include: 'Invalid', 'Vault', 'Container' - /// Correlation Id - /// Source Container ArmIds - /// Pause GC - public TriggerDataMoveRequest(string sourceResourceId, string sourceRegion, string dataMoveLevel, string correlationId, IList sourceContainerArmIds = default(IList), bool? pauseGC = default(bool?)) + + /// ARM Id of source vault + /// + + /// Source Region + /// + + /// DataMove Level + /// Possible values include: 'Invalid', 'Vault', 'Container' + + /// Correlation Id + /// + + /// Source Container ArmIds + /// + + /// Pause GC + /// + public TriggerDataMoveRequest(string sourceResourceId, string sourceRegion, string dataMoveLevel, string correlationId, System.Collections.Generic.IList sourceContainerArmIds = default(System.Collections.Generic.IList), bool? pauseGc = default(bool?)) + { - SourceResourceId = sourceResourceId; - SourceRegion = sourceRegion; - DataMoveLevel = dataMoveLevel; - CorrelationId = correlationId; - SourceContainerArmIds = sourceContainerArmIds; - PauseGC = pauseGC; + this.SourceResourceId = sourceResourceId; + this.SourceRegion = sourceRegion; + this.DataMoveLevel = dataMoveLevel; + this.CorrelationId = correlationId; + this.SourceContainerArmIds = sourceContainerArmIds; + this.PauseGc = pauseGc; CustomInit(); } @@ -55,67 +58,71 @@ public TriggerDataMoveRequest() /// partial void CustomInit(); + /// - /// Gets or sets ARM Id of source vault + /// Gets or sets aRM Id of source vault /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } /// /// Gets or sets source Region /// - [JsonProperty(PropertyName = "sourceRegion")] - public string SourceRegion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceRegion")] + public string SourceRegion {get; set; } /// - /// Gets or sets dataMove Level. Possible values include: 'Invalid', - /// 'Vault', 'Container' + /// Gets or sets dataMove Level Possible values include: 'Invalid', 'Vault', 'Container' /// - [JsonProperty(PropertyName = "dataMoveLevel")] - public string DataMoveLevel { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataMoveLevel")] + public string DataMoveLevel {get; set; } /// /// Gets or sets correlation Id /// - [JsonProperty(PropertyName = "correlationId")] - public string CorrelationId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "correlationId")] + public string CorrelationId {get; set; } /// /// Gets or sets source Container ArmIds /// - [JsonProperty(PropertyName = "sourceContainerArmIds")] - public IList SourceContainerArmIds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceContainerArmIds")] + public System.Collections.Generic.IList SourceContainerArmIds {get; set; } /// /// Gets or sets pause GC /// - [JsonProperty(PropertyName = "pauseGC")] - public bool? PauseGC { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "pauseGC")] + public bool? PauseGc {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (SourceResourceId == null) + if (this.SourceResourceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "SourceResourceId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SourceResourceId"); } - if (SourceRegion == null) + if (this.SourceRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "SourceRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SourceRegion"); } - if (DataMoveLevel == null) + if (this.DataMoveLevel == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DataMoveLevel"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DataMoveLevel"); } - if (CorrelationId == null) + if (this.CorrelationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "CorrelationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "CorrelationId"); } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Type.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Type.cs index 7101dd71f497..373f01cef98c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Type.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/Type.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for Type. /// + + public static class Type { public const string Invalid = "Invalid"; public const string BackupProtectedItemCountSummary = "BackupProtectedItemCountSummary"; public const string BackupProtectionContainerCountSummary = "BackupProtectionContainerCountSummary"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UnlockDeleteRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UnlockDeleteRequest.cs index 6d2ba6ffe666..ec7abbf22f5d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UnlockDeleteRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UnlockDeleteRequest.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,10 +23,17 @@ public UnlockDeleteRequest() /// /// Initializes a new instance of the UnlockDeleteRequest class. /// - public UnlockDeleteRequest(IList resourceGuardOperationRequests = default(IList), string resourceToBeDeleted = default(string)) + + /// + /// + + /// + /// + public UnlockDeleteRequest(System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string resourceToBeDeleted = default(string)) + { - ResourceGuardOperationRequests = resourceGuardOperationRequests; - ResourceToBeDeleted = resourceToBeDeleted; + this.ResourceGuardOperationRequests = resourceGuardOperationRequests; + this.ResourceToBeDeleted = resourceToBeDeleted; CustomInit(); } @@ -43,15 +42,17 @@ public UnlockDeleteRequest() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "resourceGuardOperationRequests")] - public IList ResourceGuardOperationRequests { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public System.Collections.Generic.IList ResourceGuardOperationRequests {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "resourceToBeDeleted")] - public string ResourceToBeDeleted { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceToBeDeleted")] + public string ResourceToBeDeleted {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UnlockDeleteResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UnlockDeleteResponse.cs index f24dd0464944..08b7f13c98d9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UnlockDeleteResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UnlockDeleteResponse.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public UnlockDeleteResponse() /// /// Initializes a new instance of the UnlockDeleteResponse class. /// - /// This is the time when unlock - /// delete privileges will get expired. + + /// This is the time when unlock delete privileges will get expired. + /// public UnlockDeleteResponse(string unlockDeleteExpiryTime = default(string)) + { - UnlockDeleteExpiryTime = unlockDeleteExpiryTime; + this.UnlockDeleteExpiryTime = unlockDeleteExpiryTime; CustomInit(); } @@ -42,12 +38,12 @@ public UnlockDeleteResponse() /// partial void CustomInit(); + /// - /// Gets or sets this is the time when unlock delete privileges will - /// get expired. + /// Gets or sets this is the time when unlock delete privileges will get + /// expired. /// - [JsonProperty(PropertyName = "unlockDeleteExpiryTime")] - public string UnlockDeleteExpiryTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "unlockDeleteExpiryTime")] + public string UnlockDeleteExpiryTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UsagesUnit.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UsagesUnit.cs index c4e811af798c..2be8c1ef4b8f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UsagesUnit.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/UsagesUnit.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for UsagesUnit. /// + + public static class UsagesUnit { public const string Count = "Count"; @@ -23,4 +20,4 @@ public static class UsagesUnit public const string CountPerSecond = "CountPerSecond"; public const string BytesPerSecond = "BytesPerSecond"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateIaasVMRestoreOperationRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateIaasVMRestoreOperationRequest.cs index 3ba235398557..f03a2e02d5c3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateIaasVMRestoreOperationRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateIaasVMRestoreOperationRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ValidateIaasVMRestoreOperationRequest : ValidateRestoreOperationRequest { /// - /// Initializes a new instance of the - /// ValidateIaasVMRestoreOperationRequest class. + /// Initializes a new instance of the ValidateIaasVMRestoreOperationRequest class. /// public ValidateIaasVMRestoreOperationRequest() { @@ -29,13 +22,14 @@ public ValidateIaasVMRestoreOperationRequest() } /// - /// Initializes a new instance of the - /// ValidateIaasVMRestoreOperationRequest class. + /// Initializes a new instance of the ValidateIaasVMRestoreOperationRequest class. /// - /// Sets restore request to be - /// validated + + /// Sets restore request to be validated + /// public ValidateIaasVMRestoreOperationRequest(RestoreRequest restoreRequest = default(RestoreRequest)) - : base(restoreRequest) + + : base(restoreRequest) { CustomInit(); } @@ -46,4 +40,4 @@ public ValidateIaasVMRestoreOperationRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationRequest.cs index 8237ae39db36..0100898a897e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public ValidateOperationRequest() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationResponse.cs index 31b5a85d5963..1c7a7428bcb2 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationResponse.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,10 +23,13 @@ public ValidateOperationResponse() /// /// Initializes a new instance of the ValidateOperationResponse class. /// - /// Gets the validation result - public ValidateOperationResponse(IList validationResults = default(IList)) + + /// Gets the validation result + /// + public ValidateOperationResponse(System.Collections.Generic.IList validationResults = default(System.Collections.Generic.IList)) + { - ValidationResults = validationResults; + this.ValidationResults = validationResults; CustomInit(); } @@ -43,11 +38,11 @@ public ValidateOperationResponse() /// partial void CustomInit(); + /// - /// Gets the validation result + /// Gets or sets gets the validation result /// - [JsonProperty(PropertyName = "validationResults")] - public IList ValidationResults { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "validationResults")] + public System.Collections.Generic.IList ValidationResults {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationsResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationsResponse.cs index 01ab2dc3109f..b1446f31547d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationsResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateOperationsResponse.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; public partial class ValidateOperationsResponse @@ -26,9 +20,13 @@ public ValidateOperationsResponse() /// /// Initializes a new instance of the ValidateOperationsResponse class. /// + + /// Base class for validate operation response. + /// public ValidateOperationsResponse(ValidateOperationResponse validateOperationResponse = default(ValidateOperationResponse)) + { - ValidateOperationResponse = validateOperationResponse; + this.ValidateOperationResponse = validateOperationResponse; CustomInit(); } @@ -37,10 +35,11 @@ public ValidateOperationsResponse() /// partial void CustomInit(); + /// + /// Gets or sets base class for validate operation response. /// - [JsonProperty(PropertyName = "validateOperationResponse")] - public ValidateOperationResponse ValidateOperationResponse { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "validateOperationResponse")] + public ValidateOperationResponse ValidateOperationResponse {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateRestoreOperationRequest.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateRestoreOperationRequest.cs index c9362ecd28d6..1666ccb5011e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateRestoreOperationRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidateRestoreOperationRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class ValidateRestoreOperationRequest : ValidateOperationRequest { /// - /// Initializes a new instance of the ValidateRestoreOperationRequest - /// class. + /// Initializes a new instance of the ValidateRestoreOperationRequest class. /// public ValidateRestoreOperationRequest() { @@ -29,14 +22,15 @@ public ValidateRestoreOperationRequest() } /// - /// Initializes a new instance of the ValidateRestoreOperationRequest - /// class. + /// Initializes a new instance of the ValidateRestoreOperationRequest class. /// - /// Sets restore request to be - /// validated + + /// Sets restore request to be validated + /// public ValidateRestoreOperationRequest(RestoreRequest restoreRequest = default(RestoreRequest)) + { - RestoreRequest = restoreRequest; + this.RestoreRequest = restoreRequest; CustomInit(); } @@ -45,11 +39,11 @@ public ValidateRestoreOperationRequest() /// partial void CustomInit(); + /// /// Gets or sets sets restore request to be validated /// - [JsonProperty(PropertyName = "restoreRequest")] - public RestoreRequest RestoreRequest { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreRequest")] + public RestoreRequest RestoreRequest {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidationStatus.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidationStatus.cs index fe8953b1117f..1d8accbbbb81 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidationStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/ValidationStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for ValidationStatus. /// + + public static class ValidationStatus { public const string Invalid = "Invalid"; public const string Succeeded = "Succeeded"; public const string Failed = "Failed"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJob.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJob.cs index 9f6f2e998a15..5bce1f83195b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJob.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJob.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,32 +24,49 @@ public VaultJob() /// /// Initializes a new instance of the VaultJob class. /// - /// Friendly name of the entity on - /// which the current job is executing. - /// Backup management type to - /// execute the current job. Possible values include: 'Invalid', - /// 'AzureIaasVM', 'MAB', 'DPM', 'AzureBackupServer', 'AzureSql', - /// 'AzureStorage', 'AzureWorkload', 'DefaultBackup' - /// The operation name. - /// Job status. - /// The start time. - /// The end time. - /// ActivityId of job. - /// Time elapsed during the execution of this - /// job. - /// Gets or sets the state/actions applicable - /// on this job like cancel/retry. - /// Error details on execution of this - /// job. - /// Additional information about the - /// job. - public VaultJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), IList actionsInfo = default(IList), IList errorDetails = default(IList), VaultJobExtendedInfo extendedInfo = default(VaultJobExtendedInfo)) - : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) + + /// Friendly name of the entity on which the current job is executing. + /// + + /// Backup management type to execute the current job. + /// Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM', + /// 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload', + /// 'DefaultBackup' + + /// The operation name. + /// + + /// Job status. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// ActivityId of job. + /// + + /// Time elapsed during the execution of this job. + /// + + /// Gets or sets the state/actions applicable on this job like cancel/retry. + /// + + /// Error details on execution of this job. + /// + + /// Additional information about the job. + /// + public VaultJob(string entityFriendlyName = default(string), string backupManagementType = default(string), string operation = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string activityId = default(string), System.TimeSpan? duration = default(System.TimeSpan?), System.Collections.Generic.IList actionsInfo = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorDetails = default(System.Collections.Generic.IList), VaultJobExtendedInfo extendedInfo = default(VaultJobExtendedInfo)) + + : base(entityFriendlyName, backupManagementType, operation, status, startTime, endTime, activityId) { - Duration = duration; - ActionsInfo = actionsInfo; - ErrorDetails = errorDetails; - ExtendedInfo = extendedInfo; + this.Duration = duration; + this.ActionsInfo = actionsInfo; + this.ErrorDetails = errorDetails; + this.ExtendedInfo = extendedInfo; CustomInit(); } @@ -66,30 +75,30 @@ public VaultJob() /// partial void CustomInit(); + /// /// Gets or sets time elapsed during the execution of this job. /// - [JsonProperty(PropertyName = "duration")] - public System.TimeSpan? Duration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "duration")] + public System.TimeSpan? Duration {get; set; } /// - /// Gets or sets the state/actions applicable on this job like + /// Gets or sets gets or sets the state/actions applicable on this job like /// cancel/retry. /// - [JsonProperty(PropertyName = "actionsInfo")] - public IList ActionsInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsInfo")] + public System.Collections.Generic.IList ActionsInfo {get; set; } /// /// Gets or sets error details on execution of this job. /// - [JsonProperty(PropertyName = "errorDetails")] - public IList ErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorDetails")] + public System.Collections.Generic.IList ErrorDetails {get; set; } /// /// Gets or sets additional information about the job. /// - [JsonProperty(PropertyName = "extendedInfo")] - public VaultJobExtendedInfo ExtendedInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedInfo")] + public VaultJobExtendedInfo ExtendedInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJobErrorInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJobErrorInfo.cs index 07e5c8a0f16f..60aaf1b5eeb5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJobErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJobErrorInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public VaultJobErrorInfo() /// /// Initializes a new instance of the VaultJobErrorInfo class. /// - /// Error code. - /// Localized error string. - /// List of localized recommendations for - /// above error code. - public VaultJobErrorInfo(int? errorCode = default(int?), string errorString = default(string), IList recommendations = default(IList)) + + /// Error code. + /// + + /// Localized error string. + /// + + /// List of localized recommendations for above error code. + /// + public VaultJobErrorInfo(int? errorCode = default(int?), string errorString = default(string), System.Collections.Generic.IList recommendations = default(System.Collections.Generic.IList)) + { - ErrorCode = errorCode; - ErrorString = errorString; - Recommendations = recommendations; + this.ErrorCode = errorCode; + this.ErrorString = errorString; + this.Recommendations = recommendations; CustomInit(); } @@ -48,24 +46,23 @@ public VaultJobErrorInfo() /// partial void CustomInit(); + /// /// Gets or sets error code. /// - [JsonProperty(PropertyName = "errorCode")] - public int? ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode {get; set; } /// /// Gets or sets localized error string. /// - [JsonProperty(PropertyName = "errorString")] - public string ErrorString { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorString")] + public string ErrorString {get; set; } /// - /// Gets or sets list of localized recommendations for above error - /// code. + /// Gets or sets list of localized recommendations for above error code. /// - [JsonProperty(PropertyName = "recommendations")] - public IList Recommendations { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendations")] + public System.Collections.Generic.IList Recommendations {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJobExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJobExtendedInfo.cs index 12a3c06154d3..d4690b6e747a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJobExtendedInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultJobExtendedInfo.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,10 +23,13 @@ public VaultJobExtendedInfo() /// /// Initializes a new instance of the VaultJobExtendedInfo class. /// - /// Job properties. - public VaultJobExtendedInfo(IDictionary propertyBag = default(IDictionary)) + + /// Job properties. + /// + public VaultJobExtendedInfo(System.Collections.Generic.IDictionary propertyBag = default(System.Collections.Generic.IDictionary)) + { - PropertyBag = propertyBag; + this.PropertyBag = propertyBag; CustomInit(); } @@ -43,11 +38,11 @@ public VaultJobExtendedInfo() /// partial void CustomInit(); + /// /// Gets or sets job properties. /// - [JsonProperty(PropertyName = "propertyBag")] - public IDictionary PropertyBag { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "propertyBag")] + public System.Collections.Generic.IDictionary PropertyBag {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultStorageConfigOperationResultResponse.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultStorageConfigOperationResultResponse.cs index 98936c971bbd..fc9b92d18f88 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultStorageConfigOperationResultResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/VaultStorageConfigOperationResultResponse.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models public partial class VaultStorageConfigOperationResultResponse { /// - /// Initializes a new instance of the - /// VaultStorageConfigOperationResultResponse class. + /// Initializes a new instance of the VaultStorageConfigOperationResultResponse class. /// public VaultStorageConfigOperationResultResponse() { @@ -35,4 +28,4 @@ public VaultStorageConfigOperationResultResponse() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeekOfMonth.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeekOfMonth.cs index 7da2d759c2d1..b3c3f8d6878f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeekOfMonth.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeekOfMonth.cs @@ -1,37 +1,30 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for WeekOfMonth. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum WeekOfMonth { - [EnumMember(Value = "First")] + [System.Runtime.Serialization.EnumMember(Value = "First")] First, - [EnumMember(Value = "Second")] + [System.Runtime.Serialization.EnumMember(Value = "Second")] Second, - [EnumMember(Value = "Third")] + [System.Runtime.Serialization.EnumMember(Value = "Third")] Third, - [EnumMember(Value = "Fourth")] + [System.Runtime.Serialization.EnumMember(Value = "Fourth")] Fourth, - [EnumMember(Value = "Last")] + [System.Runtime.Serialization.EnumMember(Value = "Last")] Last, - [EnumMember(Value = "Invalid")] + [System.Runtime.Serialization.EnumMember(Value = "Invalid")] Invalid } internal static class WeekOfMonthEnumExtension @@ -40,7 +33,6 @@ internal static string ToSerializedValue(this WeekOfMonth? value) { return value == null ? null : ((WeekOfMonth)value).ToSerializedValue(); } - internal static string ToSerializedValue(this WeekOfMonth value) { switch( value ) @@ -60,7 +52,6 @@ internal static string ToSerializedValue(this WeekOfMonth value) } return null; } - internal static WeekOfMonth? ParseWeekOfMonth(this string value) { switch( value ) @@ -81,4 +72,4 @@ internal static string ToSerializedValue(this WeekOfMonth value) return null; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklyRetentionFormat.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklyRetentionFormat.cs index 97aa49b76fc7..9ceb1f706fed 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklyRetentionFormat.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklyRetentionFormat.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,12 +23,17 @@ public WeeklyRetentionFormat() /// /// Initializes a new instance of the WeeklyRetentionFormat class. /// - /// List of days of the week. - /// List of weeks of month. - public WeeklyRetentionFormat(IList daysOfTheWeek = default(IList), IList weeksOfTheMonth = default(IList)) + + /// List of days of the week. + /// + + /// List of weeks of month. + /// + public WeeklyRetentionFormat(System.Collections.Generic.IList daysOfTheWeek = default(System.Collections.Generic.IList), System.Collections.Generic.IList weeksOfTheMonth = default(System.Collections.Generic.IList)) + { - DaysOfTheWeek = daysOfTheWeek; - WeeksOfTheMonth = weeksOfTheMonth; + this.DaysOfTheWeek = daysOfTheWeek; + this.WeeksOfTheMonth = weeksOfTheMonth; CustomInit(); } @@ -45,17 +42,17 @@ public WeeklyRetentionFormat() /// partial void CustomInit(); + /// /// Gets or sets list of days of the week. /// - [JsonProperty(PropertyName = "daysOfTheWeek")] - public IList DaysOfTheWeek { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "daysOfTheWeek")] + public System.Collections.Generic.IList DaysOfTheWeek {get; set; } /// /// Gets or sets list of weeks of month. /// - [JsonProperty(PropertyName = "weeksOfTheMonth")] - public IList WeeksOfTheMonth { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "weeksOfTheMonth")] + public System.Collections.Generic.IList WeeksOfTheMonth {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklyRetentionSchedule.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklyRetentionSchedule.cs index 2f1f7d573958..1cd1d4147910 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklyRetentionSchedule.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklyRetentionSchedule.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,17 +23,21 @@ public WeeklyRetentionSchedule() /// /// Initializes a new instance of the WeeklyRetentionSchedule class. /// - /// List of days of week for weekly - /// retention policy. - /// Retention times of retention - /// policy. - /// Retention duration of retention - /// Policy. - public WeeklyRetentionSchedule(IList daysOfTheWeek = default(IList), IList retentionTimes = default(IList), RetentionDuration retentionDuration = default(RetentionDuration)) + + /// List of days of week for weekly retention policy. + /// + + /// Retention times of retention policy. + /// + + /// Retention duration of retention Policy. + /// + public WeeklyRetentionSchedule(System.Collections.Generic.IList daysOfTheWeek = default(System.Collections.Generic.IList), System.Collections.Generic.IList retentionTimes = default(System.Collections.Generic.IList), RetentionDuration retentionDuration = default(RetentionDuration)) + { - DaysOfTheWeek = daysOfTheWeek; - RetentionTimes = retentionTimes; - RetentionDuration = retentionDuration; + this.DaysOfTheWeek = daysOfTheWeek; + this.RetentionTimes = retentionTimes; + this.RetentionDuration = retentionDuration; CustomInit(); } @@ -50,23 +46,23 @@ public WeeklyRetentionSchedule() /// partial void CustomInit(); + /// /// Gets or sets list of days of week for weekly retention policy. /// - [JsonProperty(PropertyName = "daysOfTheWeek")] - public IList DaysOfTheWeek { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "daysOfTheWeek")] + public System.Collections.Generic.IList DaysOfTheWeek {get; set; } /// /// Gets or sets retention times of retention policy. /// - [JsonProperty(PropertyName = "retentionTimes")] - public IList RetentionTimes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionTimes")] + public System.Collections.Generic.IList RetentionTimes {get; set; } /// /// Gets or sets retention duration of retention Policy. /// - [JsonProperty(PropertyName = "retentionDuration")] - public RetentionDuration RetentionDuration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionDuration")] + public RetentionDuration RetentionDuration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklySchedule.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklySchedule.cs index 23297eb9d625..c700106170f8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklySchedule.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WeeklySchedule.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class WeeklySchedule @@ -28,12 +20,17 @@ public WeeklySchedule() /// /// Initializes a new instance of the WeeklySchedule class. /// - /// List of times of day this schedule - /// has to be run. - public WeeklySchedule(IList scheduleRunDays = default(IList), IList scheduleRunTimes = default(IList)) + + /// + /// + + /// List of times of day this schedule has to be run. + /// + public WeeklySchedule(System.Collections.Generic.IList scheduleRunDays = default(System.Collections.Generic.IList), System.Collections.Generic.IList scheduleRunTimes = default(System.Collections.Generic.IList)) + { - ScheduleRunDays = scheduleRunDays; - ScheduleRunTimes = scheduleRunTimes; + this.ScheduleRunDays = scheduleRunDays; + this.ScheduleRunTimes = scheduleRunTimes; CustomInit(); } @@ -42,16 +39,17 @@ public WeeklySchedule() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "scheduleRunDays")] - public IList ScheduleRunDays { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleRunDays")] + public System.Collections.Generic.IList ScheduleRunDays {get; set; } /// /// Gets or sets list of times of day this schedule has to be run. /// - [JsonProperty(PropertyName = "scheduleRunTimes")] - public IList ScheduleRunTimes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleRunTimes")] + public System.Collections.Generic.IList ScheduleRunTimes {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadInquiryDetails.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadInquiryDetails.cs index 5565de8033ce..30f672c1b53e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadInquiryDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadInquiryDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,21 @@ public WorkloadInquiryDetails() /// /// Initializes a new instance of the WorkloadInquiryDetails class. /// - /// Type of the Workload such as SQL, Oracle - /// etc. - /// Contains the protectable item Count inside - /// this Container. - /// Inquiry validation such as - /// permissions and other backup validations. + + /// Type of the Workload such as SQL, Oracle etc. + /// + + /// Contains the protectable item Count inside this Container. + /// + + /// Inquiry validation such as permissions and other backup validations. + /// public WorkloadInquiryDetails(string type = default(string), long? itemCount = default(long?), InquiryValidation inquiryValidation = default(InquiryValidation)) + { - Type = type; - ItemCount = itemCount; - InquiryValidation = inquiryValidation; + this.Type = type; + this.ItemCount = itemCount; + this.InquiryValidation = inquiryValidation; CustomInit(); } @@ -48,25 +46,24 @@ public WorkloadInquiryDetails() /// partial void CustomInit(); + /// /// Gets or sets type of the Workload such as SQL, Oracle etc. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// - /// Gets or sets contains the protectable item Count inside this - /// Container. + /// Gets or sets contains the protectable item Count inside this Container. /// - [JsonProperty(PropertyName = "itemCount")] - public long? ItemCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "itemCount")] + public long? ItemCount {get; set; } /// - /// Gets or sets inquiry validation such as permissions and other - /// backup validations. + /// Gets or sets inquiry validation such as permissions and other backup + /// validations. /// - [JsonProperty(PropertyName = "inquiryValidation")] - public InquiryValidation InquiryValidation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "inquiryValidation")] + public InquiryValidation InquiryValidation {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItem.cs index 8ab4fc2c57ea..e2700a498ebe 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItem.cs @@ -1,21 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Base class for backup item. Workload-specific backup items are derived - /// from this class. + /// Base class for backup item. Workload-specific backup items are derived from + /// this class. /// [Newtonsoft.Json.JsonObject("WorkloadItem")] public partial class WorkloadItem @@ -31,21 +25,26 @@ public WorkloadItem() /// /// Initializes a new instance of the WorkloadItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' public WorkloadItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string)) + { - BackupManagementType = backupManagementType; - WorkloadType = workloadType; - FriendlyName = friendlyName; - ProtectionState = protectionState; + this.BackupManagementType = backupManagementType; + this.WorkloadType = workloadType; + this.FriendlyName = friendlyName; + this.ProtectionState = protectionState; CustomInit(); } @@ -54,31 +53,29 @@ public WorkloadItem() /// partial void CustomInit(); + /// /// Gets or sets type of backup management to backup an item. /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// /// Gets or sets type of workload for the backup management /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// /// Gets or sets friendly name of the backup item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets state of the back up item. Possible values include: - /// 'Invalid', 'NotProtected', 'Protecting', 'Protected', - /// 'ProtectionFailed' + /// Gets or sets state of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', 'ProtectionFailed' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItemResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItemResource.cs index 8e8beebf8ea3..4682c88c4bdc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItemResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItemResource.cs @@ -1,23 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Base class for backup item. Workload-specific backup items are derived - /// from this class. + /// Base class for backup item. Workload-specific backup items are derived from + /// this class. /// public partial class WorkloadItemResource : Resource { @@ -32,20 +24,33 @@ public WorkloadItemResource() /// /// Initializes a new instance of the WorkloadItemResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// WorkloadItemResource properties - public WorkloadItemResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), WorkloadItem properties = default(WorkloadItem)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// WorkloadItemResource properties + /// + public WorkloadItemResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), WorkloadItem properties = default(WorkloadItem)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -54,11 +59,11 @@ public WorkloadItemResource() /// partial void CustomInit(); + /// /// Gets or sets workloadItemResource properties /// - [JsonProperty(PropertyName = "properties")] - public WorkloadItem Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public WorkloadItem Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItemType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItemType.cs index a47101941de8..2b2c200e3aca 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItemType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadItemType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for WorkloadItemType. /// + + public static class WorkloadItemType { public const string Invalid = "Invalid"; @@ -25,4 +22,4 @@ public static class WorkloadItemType public const string SAPAseDatabase = "SAPAseDatabase"; public const string SAPHanaDBInstance = "SAPHanaDBInstance"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadProtectableItem.cs index 29685cdeb3ef..bb099535e8b5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadProtectableItem.cs @@ -1,21 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Base class for backup item. Workload-specific backup items are derived - /// from this class. + /// Base class for backup item. Workload-specific backup items are derived from + /// this class. /// [Newtonsoft.Json.JsonObject("WorkloadProtectableItem")] public partial class WorkloadProtectableItem @@ -31,21 +25,26 @@ public WorkloadProtectableItem() /// /// Initializes a new instance of the WorkloadProtectableItem class. /// - /// Type of backup management to - /// backup an item. - /// Type of workload for the backup - /// management - /// Friendly name of the backup - /// item. - /// State of the back up item. Possible - /// values include: 'Invalid', 'NotProtected', 'Protecting', + + /// Type of backup management to backup an item. + /// + + /// Type of workload for the backup management + /// + + /// Friendly name of the backup item. + /// + + /// State of the back up item. + /// Possible values include: 'Invalid', 'NotProtected', 'Protecting', /// 'Protected', 'ProtectionFailed' public WorkloadProtectableItem(string backupManagementType = default(string), string workloadType = default(string), string friendlyName = default(string), string protectionState = default(string)) + { - BackupManagementType = backupManagementType; - WorkloadType = workloadType; - FriendlyName = friendlyName; - ProtectionState = protectionState; + this.BackupManagementType = backupManagementType; + this.WorkloadType = workloadType; + this.FriendlyName = friendlyName; + this.ProtectionState = protectionState; CustomInit(); } @@ -54,31 +53,29 @@ public WorkloadProtectableItem() /// partial void CustomInit(); + /// /// Gets or sets type of backup management to backup an item. /// - [JsonProperty(PropertyName = "backupManagementType")] - public string BackupManagementType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupManagementType")] + public string BackupManagementType {get; set; } /// /// Gets or sets type of workload for the backup management /// - [JsonProperty(PropertyName = "workloadType")] - public string WorkloadType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadType")] + public string WorkloadType {get; set; } /// /// Gets or sets friendly name of the backup item. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets state of the back up item. Possible values include: - /// 'Invalid', 'NotProtected', 'Protecting', 'Protected', - /// 'ProtectionFailed' + /// Gets or sets state of the back up item. Possible values include: 'Invalid', 'NotProtected', 'Protecting', 'Protected', 'ProtectionFailed' /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadProtectableItemResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadProtectableItemResource.cs index ee5d9e90c4f7..9e2dcbc0ad1f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadProtectableItemResource.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadProtectableItemResource.cs @@ -1,29 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Base class for backup item. Workload-specific backup items are derived - /// from this class. + /// Base class for backup item. Workload-specific backup items are derived from + /// this class. /// public partial class WorkloadProtectableItemResource : Resource { /// - /// Initializes a new instance of the WorkloadProtectableItemResource - /// class. + /// Initializes a new instance of the WorkloadProtectableItemResource class. /// public WorkloadProtectableItemResource() { @@ -31,24 +22,35 @@ public WorkloadProtectableItemResource() } /// - /// Initializes a new instance of the WorkloadProtectableItemResource - /// class. + /// Initializes a new instance of the WorkloadProtectableItemResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Resource location. - /// Resource tags. - /// Optional ETag. - /// WorkloadProtectableItemResource - /// properties - public WorkloadProtectableItemResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), WorkloadProtectableItem properties = default(WorkloadProtectableItem)) - : base(id, name, type, location, tags, eTag) + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Resource location. + /// + + /// Resource tags. + /// + + /// Optional ETag. + /// + + /// WorkloadProtectableItemResource properties + /// + public WorkloadProtectableItemResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string eTag = default(string), WorkloadProtectableItem properties = default(WorkloadProtectableItem)) + + : base(id, name, type, location, tags, eTag) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -57,11 +59,11 @@ public WorkloadProtectableItemResource() /// partial void CustomInit(); + /// /// Gets or sets workloadProtectableItemResource properties /// - [JsonProperty(PropertyName = "properties")] - public WorkloadProtectableItem Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public WorkloadProtectableItem Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadType.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadType.cs index 20236448815e..d6312934ffa8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadType.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/WorkloadType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,13 +9,15 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for WorkloadType. /// + + public static class WorkloadType { public const string Invalid = "Invalid"; public const string VM = "VM"; public const string FileFolder = "FileFolder"; public const string AzureSqlDb = "AzureSqlDb"; - public const string SQLDB = "SQLDB"; + public const string Sqldb = "SQLDB"; public const string Exchange = "Exchange"; public const string Sharepoint = "Sharepoint"; public const string VMwareVM = "VMwareVM"; @@ -33,4 +30,4 @@ public static class WorkloadType public const string SAPAseDatabase = "SAPAseDatabase"; public const string SAPHanaDBInstance = "SAPHanaDBInstance"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/XcoolState.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/XcoolState.cs index ad291f75db70..91873a53f3e3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/XcoolState.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/XcoolState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// Defines values for XcoolState. /// + + public static class XcoolState { public const string Invalid = "Invalid"; public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/YearlyRetentionSchedule.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/YearlyRetentionSchedule.cs index 8a25b6169246..4a536b77dbef 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/YearlyRetentionSchedule.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Models/YearlyRetentionSchedule.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,27 +23,33 @@ public YearlyRetentionSchedule() /// /// Initializes a new instance of the YearlyRetentionSchedule class. /// - /// Retention schedule format - /// for yearly retention policy. Possible values include: 'Invalid', - /// 'Daily', 'Weekly' - /// List of months of year of yearly - /// retention policy. - /// Daily retention format for - /// yearly retention policy. - /// Weekly retention format for - /// yearly retention policy. - /// Retention times of retention - /// policy. - /// Retention duration of retention - /// Policy. - public YearlyRetentionSchedule(string retentionScheduleFormatType = default(string), IList monthsOfYear = default(IList), DailyRetentionFormat retentionScheduleDaily = default(DailyRetentionFormat), WeeklyRetentionFormat retentionScheduleWeekly = default(WeeklyRetentionFormat), IList retentionTimes = default(IList), RetentionDuration retentionDuration = default(RetentionDuration)) + + /// Retention schedule format for yearly retention policy. + /// Possible values include: 'Invalid', 'Daily', 'Weekly' + + /// List of months of year of yearly retention policy. + /// + + /// Daily retention format for yearly retention policy. + /// + + /// Weekly retention format for yearly retention policy. + /// + + /// Retention times of retention policy. + /// + + /// Retention duration of retention Policy. + /// + public YearlyRetentionSchedule(string retentionScheduleFormatType = default(string), System.Collections.Generic.IList monthsOfYear = default(System.Collections.Generic.IList), DailyRetentionFormat retentionScheduleDaily = default(DailyRetentionFormat), WeeklyRetentionFormat retentionScheduleWeekly = default(WeeklyRetentionFormat), System.Collections.Generic.IList retentionTimes = default(System.Collections.Generic.IList), RetentionDuration retentionDuration = default(RetentionDuration)) + { - RetentionScheduleFormatType = retentionScheduleFormatType; - MonthsOfYear = monthsOfYear; - RetentionScheduleDaily = retentionScheduleDaily; - RetentionScheduleWeekly = retentionScheduleWeekly; - RetentionTimes = retentionTimes; - RetentionDuration = retentionDuration; + this.RetentionScheduleFormatType = retentionScheduleFormatType; + this.MonthsOfYear = monthsOfYear; + this.RetentionScheduleDaily = retentionScheduleDaily; + this.RetentionScheduleWeekly = retentionScheduleWeekly; + this.RetentionTimes = retentionTimes; + this.RetentionDuration = retentionDuration; CustomInit(); } @@ -60,42 +58,41 @@ public YearlyRetentionSchedule() /// partial void CustomInit(); + /// - /// Gets or sets retention schedule format for yearly retention policy. - /// Possible values include: 'Invalid', 'Daily', 'Weekly' + /// Gets or sets retention schedule format for yearly retention policy. Possible values include: 'Invalid', 'Daily', 'Weekly' /// - [JsonProperty(PropertyName = "retentionScheduleFormatType")] - public string RetentionScheduleFormatType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionScheduleFormatType")] + public string RetentionScheduleFormatType {get; set; } /// /// Gets or sets list of months of year of yearly retention policy. /// - [JsonProperty(PropertyName = "monthsOfYear")] - public IList MonthsOfYear { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monthsOfYear")] + public System.Collections.Generic.IList MonthsOfYear {get; set; } /// /// Gets or sets daily retention format for yearly retention policy. /// - [JsonProperty(PropertyName = "retentionScheduleDaily")] - public DailyRetentionFormat RetentionScheduleDaily { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionScheduleDaily")] + public DailyRetentionFormat RetentionScheduleDaily {get; set; } /// /// Gets or sets weekly retention format for yearly retention policy. /// - [JsonProperty(PropertyName = "retentionScheduleWeekly")] - public WeeklyRetentionFormat RetentionScheduleWeekly { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionScheduleWeekly")] + public WeeklyRetentionFormat RetentionScheduleWeekly {get; set; } /// /// Gets or sets retention times of retention policy. /// - [JsonProperty(PropertyName = "retentionTimes")] - public IList RetentionTimes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionTimes")] + public System.Collections.Generic.IList RetentionTimes {get; set; } /// /// Gets or sets retention duration of retention Policy. /// - [JsonProperty(PropertyName = "retentionDuration")] - public RetentionDuration RetentionDuration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionDuration")] + public RetentionDuration RetentionDuration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationOperations.cs index bdd0d7478de2..57c272ed8471 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// OperationOperations operations. /// - internal partial class OperationOperations : IServiceOperations, IOperationOperations + internal partial class OperationOperations : Microsoft.Rest.IServiceOperations, IOperationOperations { /// /// Initializes a new instance of the OperationOperations class. @@ -36,13 +24,13 @@ internal partial class OperationOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal OperationOperations(RecoveryServicesBackupClient client) + internal OperationOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,15 +39,13 @@ internal OperationOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Validate operation for specified backed up item. This is a synchronous - /// operation. + /// Validate operation for specified backed up item. This is a synchronous operation. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource validate operation request @@ -70,13 +56,13 @@ internal OperationOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -85,76 +71,88 @@ internal OperationOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ValidateWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ValidateWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.SubscriptionId == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Validate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Validate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -166,61 +164,62 @@ internal OperationOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -230,9 +229,10 @@ internal OperationOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -243,24 +243,28 @@ internal OperationOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationOperationsExtensions.cs index 089b59a0cd67..49c84d53edf5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationOperationsExtensions.cs @@ -1,75 +1,55 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for OperationOperations. + /// Extension methods for OperationOperations /// public static partial class OperationOperationsExtensions { - /// - /// Validate operation for specified backed up item. This is a synchronous - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource validate operation request - /// - public static ValidateOperationsResponse Validate(this IOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters) - { - return operations.ValidateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } + /// + /// Validate operation for specified backed up item. This is a synchronous operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static ValidateOperationsResponse Validate(this IOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters) + { + return ((IOperationOperations)operations).ValidateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Validate operation for specified backed up item. This is a synchronous - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource validate operation request - /// - /// - /// The cancellation token. - /// - public static async Task ValidateAsync(this IOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Validate operation for specified backed up item. This is a synchronous operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateAsync(this IOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ValidateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ValidateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Operations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Operations.cs index 8fcf9ee3a356..a5fe2f5251a9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Operations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/Operations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// Operations operations. /// - internal partial class Operations : IServiceOperations, IOperations + internal partial class Operations : Microsoft.Rest.IServiceOperations, IOperations { /// /// Initializes a new instance of the Operations class. @@ -36,13 +24,13 @@ internal partial class Operations : IServiceOperations /// Thrown when a required parameter is null /// - internal Operations(RecoveryServicesBackupClient client) + internal Operations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -59,13 +47,13 @@ internal Operations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -74,54 +62,62 @@ internal Operations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.RecoveryServices/operations").ToString(); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -133,55 +129,56 @@ internal Operations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -191,9 +188,10 @@ internal Operations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -204,25 +202,29 @@ internal Operations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns the list of available operations. /// @@ -235,13 +237,13 @@ internal Operations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -250,51 +252,54 @@ internal Operations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -306,55 +311,56 @@ internal Operations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -364,9 +370,10 @@ internal Operations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -377,24 +384,28 @@ internal Operations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationsExtensions.cs index f9c88a1ae24b..1b0e0a0aee2e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/OperationsExtensions.cs @@ -1,87 +1,76 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for Operations. + /// Extension methods for Operations /// public static partial class OperationsExtensions { - /// - /// Returns the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } + /// + /// Returns the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IOperations operations) + { + return ((IOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Returns the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Returns the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Returns the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IOperations operations, string nextPageLink) + { + return ((IOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Returns the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IOperations operations, string nextPageLink) + /// + /// Returns the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Returns the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointConnectionOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointConnectionOperations.cs index ddfee88600a1..0f71256867d5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointConnectionOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointConnectionOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// PrivateEndpointConnectionOperations operations. /// - internal partial class PrivateEndpointConnectionOperations : IServiceOperations, IPrivateEndpointConnectionOperations + internal partial class PrivateEndpointConnectionOperations : Microsoft.Rest.IServiceOperations, IPrivateEndpointConnectionOperations { /// /// Initializes a new instance of the PrivateEndpointConnectionOperations class. @@ -36,13 +24,13 @@ internal partial class PrivateEndpointConnectionOperations : IServiceOperations< /// /// Thrown when a required parameter is null /// - internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client) + internal PrivateEndpointConnectionOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -69,13 +56,13 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// /// 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 /// /// @@ -84,77 +71,89 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -166,50 +165,51 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -219,9 +219,10 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -232,35 +233,37 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Approve or Reject Private Endpoint requests. This call is made by Backup - /// Admin. + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -269,16 +272,16 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// Request body for operation /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginPutWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPutWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -288,35 +291,32 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Approve or Reject Private Endpoint requests. This call is made by Backup - /// Admin. + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -330,13 +330,13 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// /// 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 /// /// @@ -345,82 +345,95 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginPutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginPutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPut", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPut", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -432,61 +445,62 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -496,9 +510,10 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -509,16 +524,16 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -527,25 +542,29 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Delete Private Endpoint requests. This call is made by Backup Admin. /// @@ -553,8 +572,7 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -565,10 +583,10 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -577,77 +595,89 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -659,55 +689,56 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -717,19 +748,24 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointConnectionOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointConnectionOperationsExtensions.cs index be7842580498..78bc2f445500 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointConnectionOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointConnectionOperationsExtensions.cs @@ -1,275 +1,235 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for PrivateEndpointConnectionOperations. + /// Extension methods for PrivateEndpointConnectionOperations /// public static partial class PrivateEndpointConnectionOperationsExtensions { - /// - /// Get Private Endpoint Connection. This call is made by Backup Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - public static PrivateEndpointConnectionResource Get(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName) - { - return operations.GetAsync(vaultName, resourceGroupName, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Get Private Endpoint Connection. This call is made by Backup Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Approve or Reject Private Endpoint requests. This call is made by Backup - /// Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// Request body for operation - /// - public static PrivateEndpointConnectionResource Put(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters) - { - return operations.PutAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Approve or Reject Private Endpoint requests. This call is made by Backup - /// Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// Request body for operation - /// - /// - /// The cancellation token. - /// - public static async Task PutAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PutWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete Private Endpoint requests. This call is made by Backup Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - public static void Delete(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName) - { - operations.DeleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName).GetAwaiter().GetResult(); - } + /// + /// Get Private Endpoint Connection. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + public static PrivateEndpointConnectionResource Get(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName) + { + return ((IPrivateEndpointConnectionOperations)operations).GetAsync(vaultName, resourceGroupName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } - /// - /// Delete Private Endpoint requests. This call is made by Backup Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Get Private Endpoint Connection. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) { - (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + public static PrivateEndpointConnectionResource Put(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters) + { + return ((IPrivateEndpointConnectionOperations)operations).PutAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult(); + } - /// - /// Approve or Reject Private Endpoint requests. This call is made by Backup - /// Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// Request body for operation - /// - public static PrivateEndpointConnectionResource BeginPut(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters) + /// + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PutAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PutWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginPutAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Delete Private Endpoint requests. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + public static void Delete(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName) + { + ((IPrivateEndpointConnectionOperations)operations).DeleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } - /// - /// Approve or Reject Private Endpoint requests. This call is made by Backup - /// Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// Request body for operation - /// - /// - /// The cancellation token. - /// - public static async Task BeginPutAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginPutWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete Private Endpoint requests. This call is made by Backup Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - public static void BeginDelete(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName) - { - operations.BeginDeleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName).GetAwaiter().GetResult(); - } + /// + /// Delete Private Endpoint requests. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + public static PrivateEndpointConnectionResource BeginPut(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters) + { + return ((IPrivateEndpointConnectionOperations)operations).BeginPutAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult(); + } - /// - /// Delete Private Endpoint requests. This call is made by Backup Admin. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPutAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, PrivateEndpointConnectionResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginPutWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) { - (await operations.BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Delete Private Endpoint requests. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + public static void BeginDelete(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName) + { + ((IPrivateEndpointConnectionOperations)operations).BeginDeleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + /// + /// Delete Private Endpoint requests. This call is made by Backup Admin. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IPrivateEndpointConnectionOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointOperations.cs index 3693642013b0..356c33eeda4a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// PrivateEndpointOperations operations. /// - internal partial class PrivateEndpointOperations : IServiceOperations, IPrivateEndpointOperations + internal partial class PrivateEndpointOperations : Microsoft.Rest.IServiceOperations, IPrivateEndpointOperations { /// /// Initializes a new instance of the PrivateEndpointOperations class. @@ -36,13 +24,13 @@ internal partial class PrivateEndpointOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal PrivateEndpointOperations(RecoveryServicesBackupClient client) + internal PrivateEndpointOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal PrivateEndpointOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// The name of the private endpoint connection. @@ -72,13 +59,13 @@ internal PrivateEndpointOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -87,83 +74,96 @@ internal PrivateEndpointOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetOperationStatus", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetOperationStatus", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -175,50 +175,51 @@ internal PrivateEndpointOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -228,9 +229,10 @@ internal PrivateEndpointOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -241,24 +243,28 @@ internal PrivateEndpointOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointOperationsExtensions.cs index 42f4bfcfd9bc..e82dcc105b88 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/PrivateEndpointOperationsExtensions.cs @@ -1,79 +1,67 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for PrivateEndpointOperations. + /// Extension methods for PrivateEndpointOperations /// public static partial class PrivateEndpointOperationsExtensions { - /// - /// Gets the operation status for a private endpoint connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// Operation id - /// - public static OperationStatus GetOperationStatus(this IPrivateEndpointOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId) - { - return operations.GetOperationStatusAsync(vaultName, resourceGroupName, privateEndpointConnectionName, operationId).GetAwaiter().GetResult(); - } + /// + /// Gets the operation status for a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// Operation id + /// + public static OperationStatus GetOperationStatus(this IPrivateEndpointOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId) + { + return ((IPrivateEndpointOperations)operations).GetOperationStatusAsync(vaultName, resourceGroupName, privateEndpointConnectionName, operationId).GetAwaiter().GetResult(); + } - /// - /// Gets the operation status for a private endpoint connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// Operation id - /// - /// - /// The cancellation token. - /// - public static async Task GetOperationStatusAsync(this IPrivateEndpointOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the operation status for a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// Operation id + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetOperationStatusAsync(this IPrivateEndpointOperations operations, string vaultName, string resourceGroupName, string privateEndpointConnectionName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetOperationStatusWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetOperationStatusWithHttpMessagesAsync(vaultName, resourceGroupName, privateEndpointConnectionName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectableContainersOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectableContainersOperations.cs index 182d62bc66e5..1df72238d651 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectableContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectableContainersOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectableContainersOperations operations. /// - internal partial class ProtectableContainersOperations : IServiceOperations, IProtectableContainersOperations + internal partial class ProtectableContainersOperations : Microsoft.Rest.IServiceOperations, IProtectableContainersOperations { /// /// Initializes a new instance of the ProtectableContainersOperations class. @@ -37,13 +24,13 @@ internal partial class ProtectableContainersOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ProtectableContainersOperations(RecoveryServicesBackupClient client) + internal ProtectableContainersOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,17 +41,17 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) /// /// Lists the containers that can be registered to Recovery Services Vault. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// - /// - /// - /// OData parameters to apply to the operation. + /// /// /// /// Headers that will be added to request. @@ -72,13 +59,13 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -87,86 +74,99 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsContainerQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsContainerQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsContainerQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -178,55 +178,56 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -236,9 +237,10 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -249,25 +251,29 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists the containers that can be registered to Recovery Services Vault. /// @@ -280,13 +286,13 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -295,51 +301,54 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -351,55 +360,56 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -409,9 +419,10 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -422,24 +433,28 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectableContainersOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectableContainersOperationsExtensions.cs index 0d8c4e0d984c..6ede77baee86 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectableContainersOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectableContainersOperationsExtensions.cs @@ -1,112 +1,100 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectableContainersOperations. + /// Extension methods for ProtectableContainersOperations /// public static partial class ProtectableContainersOperationsExtensions { - /// - /// Lists the containers that can be registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IProtectableContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(vaultName, resourceGroupName, fabricName, odataQuery).GetAwaiter().GetResult(); - } + /// + /// Lists the containers that can be registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage List(this IProtectableContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IProtectableContainersOperations)operations).ListAsync(vaultName, resourceGroupName, fabricName, odataQuery).GetAwaiter().GetResult(); + } - /// - /// Lists the containers that can be registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IProtectableContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the containers that can be registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IProtectableContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the containers that can be registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IProtectableContainersOperations operations, string nextPageLink) + { + return ((IProtectableContainersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Lists the containers that can be registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IProtectableContainersOperations operations, string nextPageLink) + /// + /// Lists the containers that can be registered to Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IProtectableContainersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Lists the containers that can be registered to Recovery Services Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IProtectableContainersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationResultsOperations.cs index 2b55708dd71e..1dce4312831f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ProtectedItemOperationResultsOperations operations. /// - internal partial class ProtectedItemOperationResultsOperations : IServiceOperations, IProtectedItemOperationResultsOperations + internal partial class ProtectedItemOperationResultsOperations : Microsoft.Rest.IServiceOperations, IProtectedItemOperationResultsOperations { /// /// Initializes a new instance of the ProtectedItemOperationResultsOperations class. @@ -36,13 +24,13 @@ internal partial class ProtectedItemOperationResultsOperations : IServiceOperati /// /// Thrown when a required parameter is null /// - internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient client) + internal ProtectedItemOperationResultsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient cl /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -70,8 +57,7 @@ internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient cl /// Backup item name whose details are to be fetched. /// /// - /// OperationID which represents the operation whose result needs to be - /// fetched. + /// OperationID which represents the operation whose result needs to be fetched. /// /// /// Headers that will be added to request. @@ -79,13 +65,13 @@ internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient cl /// /// 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 /// /// @@ -94,95 +80,110 @@ internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient cl /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -194,55 +195,56 @@ internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient cl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -252,9 +254,10 @@ internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient cl throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -265,24 +268,28 @@ internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient cl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationResultsOperationsExtensions.cs index 0f571a4271b2..6551fc441b8f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationResultsOperationsExtensions.cs @@ -1,93 +1,79 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectedItemOperationResultsOperations. + /// Extension methods for ProtectedItemOperationResultsOperations /// public static partial class ProtectedItemOperationResultsOperationsExtensions { - /// - /// Fetches the result of any operation on the backup item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Container name associated with the backup item. - /// - /// - /// Backup item name whose details are to be fetched. - /// - /// - /// OperationID which represents the operation whose result needs to be - /// fetched. - /// - public static ProtectedItemResource Get(this IProtectedItemOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId).GetAwaiter().GetResult(); - } + /// + /// Fetches the result of any operation on the backup item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Container name associated with the backup item. + /// + /// + /// Backup item name whose details are to be fetched. + /// + /// + /// OperationID which represents the operation whose result needs to be fetched. + /// + public static ProtectedItemResource Get(this IProtectedItemOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId) + { + return ((IProtectedItemOperationResultsOperations)operations).GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId).GetAwaiter().GetResult(); + } - /// - /// Fetches the result of any operation on the backup item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Container name associated with the backup item. - /// - /// - /// Backup item name whose details are to be fetched. - /// - /// - /// OperationID which represents the operation whose result needs to be - /// fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectedItemOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the result of any operation on the backup item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Container name associated with the backup item. + /// + /// + /// Backup item name whose details are to be fetched. + /// + /// + /// OperationID which represents the operation whose result needs to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectedItemOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationStatusesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationStatusesOperations.cs index 70ad6042349b..c402223e4d79 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationStatusesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationStatusesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ProtectedItemOperationStatusesOperations operations. /// - internal partial class ProtectedItemOperationStatusesOperations : IServiceOperations, IProtectedItemOperationStatusesOperations + internal partial class ProtectedItemOperationStatusesOperations : Microsoft.Rest.IServiceOperations, IProtectedItemOperationStatusesOperations { /// /// Initializes a new instance of the ProtectedItemOperationStatusesOperations class. @@ -36,13 +24,13 @@ internal partial class ProtectedItemOperationStatusesOperations : IServiceOperat /// /// Thrown when a required parameter is null /// - internal ProtectedItemOperationStatusesOperations(RecoveryServicesBackupClient client) + internal ProtectedItemOperationStatusesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,19 +39,15 @@ internal ProtectedItemOperationStatusesOperations(RecoveryServicesBackupClient c public RecoveryServicesBackupClient Client { get; private set; } /// - /// Fetches the status of an operation such as triggering a backup, restore. - /// The status can be in progress, completed - /// or failed. You can refer to the OperationStatus enum for all the possible - /// states of the operation. Some operations - /// create jobs. This method returns the list of jobs associated with the - /// operation. + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations + /// create jobs. This method returns the list of jobs associated with the operation. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -83,13 +67,13 @@ internal ProtectedItemOperationStatusesOperations(RecoveryServicesBackupClient c /// /// 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 /// /// @@ -98,95 +82,110 @@ internal ProtectedItemOperationStatusesOperations(RecoveryServicesBackupClient c /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -198,55 +197,56 @@ internal ProtectedItemOperationStatusesOperations(RecoveryServicesBackupClient c _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -256,9 +256,10 @@ internal ProtectedItemOperationStatusesOperations(RecoveryServicesBackupClient c throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -269,24 +270,28 @@ internal ProtectedItemOperationStatusesOperations(RecoveryServicesBackupClient c _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationStatusesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationStatusesOperationsExtensions.cs index bbf23d1cbb2e..89c3cfdf0051 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationStatusesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemOperationStatusesOperationsExtensions.cs @@ -1,101 +1,83 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectedItemOperationStatusesOperations. + /// Extension methods for ProtectedItemOperationStatusesOperations /// public static partial class ProtectedItemOperationStatusesOperationsExtensions { - /// - /// Fetches the status of an operation such as triggering a backup, restore. - /// The status can be in progress, completed - /// or failed. You can refer to the OperationStatus enum for all the possible - /// states of the operation. Some operations - /// create jobs. This method returns the list of jobs associated with the - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Container name associated with the backup item. - /// - /// - /// Backup item name whose details are to be fetched. - /// - /// - /// OperationID represents the operation whose status needs to be fetched. - /// - public static OperationStatus Get(this IProtectedItemOperationStatusesOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId).GetAwaiter().GetResult(); - } + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations + /// create jobs. This method returns the list of jobs associated with the operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Container name associated with the backup item. + /// + /// + /// Backup item name whose details are to be fetched. + /// + /// + /// OperationID represents the operation whose status needs to be fetched. + /// + public static OperationStatus Get(this IProtectedItemOperationStatusesOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId) + { + return ((IProtectedItemOperationStatusesOperations)operations).GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId).GetAwaiter().GetResult(); + } - /// - /// Fetches the status of an operation such as triggering a backup, restore. - /// The status can be in progress, completed - /// or failed. You can refer to the OperationStatus enum for all the possible - /// states of the operation. Some operations - /// create jobs. This method returns the list of jobs associated with the - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Container name associated with the backup item. - /// - /// - /// Backup item name whose details are to be fetched. - /// - /// - /// OperationID represents the operation whose status needs to be fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectedItemOperationStatusesOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations + /// create jobs. This method returns the list of jobs associated with the operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Container name associated with the backup item. + /// + /// + /// Backup item name whose details are to be fetched. + /// + /// + /// OperationID represents the operation whose status needs to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectedItemOperationStatusesOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemsOperations.cs index 12e1054f69cd..c85c8be144cf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectedItemsOperations operations. /// - internal partial class ProtectedItemsOperations : IServiceOperations, IProtectedItemsOperations + internal partial class ProtectedItemsOperations : Microsoft.Rest.IServiceOperations, IProtectedItemsOperations { /// /// Initializes a new instance of the ProtectedItemsOperations class. @@ -37,13 +24,13 @@ internal partial class ProtectedItemsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ProtectedItemsOperations(RecoveryServicesBackupClient client) + internal ProtectedItemsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,16 +39,17 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Provides the details of the backed up item. This is an asynchronous - /// operation. To know the status of the operation, + /// Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, /// call the GetItemOperationResult API. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -72,22 +60,19 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// Backed up item name whose details are to be fetched. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -96,98 +81,113 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _getProtectedItemQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_getProtectedItemQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_getProtectedItemQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -199,55 +199,56 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -257,9 +258,10 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -270,37 +272,38 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Enables backup of an item or to modifies the backup policy information of - /// an already backed up item. This is an - /// asynchronous operation. To know the status of the operation, call the - /// GetItemOperationResult API. + /// Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + /// asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -320,13 +323,13 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -335,94 +338,109 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -434,61 +452,62 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -498,9 +517,10 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -511,36 +531,38 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Used to disable backup of an item within a container. This is an - /// asynchronous operation. To know the status of the + /// Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the /// request, call the GetItemOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -557,10 +579,10 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -569,89 +591,103 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -663,55 +699,56 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -721,19 +758,24 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemsOperationsExtensions.cs index 1ac6b7fff393..750f67c6f47a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectedItemsOperationsExtensions.cs @@ -1,229 +1,196 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectedItemsOperations. + /// Extension methods for ProtectedItemsOperations /// public static partial class ProtectedItemsOperationsExtensions { - /// - /// Provides the details of the backed up item. This is an asynchronous - /// operation. To know the status of the operation, - /// call the GetItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Container name associated with the backed up item. - /// - /// - /// Backed up item name whose details are to be fetched. - /// - /// - /// OData parameters to apply to the operation. - /// - public static ProtectedItemResource Get(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Provides the details of the backed up item. This is an asynchronous - /// operation. To know the status of the operation, - /// call the GetItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Container name associated with the backed up item. - /// - /// - /// Backed up item name whose details are to be fetched. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Enables backup of an item or to modifies the backup policy information of - /// an already backed up item. This is an - /// asynchronous operation. To know the status of the operation, call the - /// GetItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Container name associated with the backup item. - /// - /// - /// Item name to be backed up. - /// - /// - /// resource backed up item - /// - public static ProtectedItemResource CreateOrUpdate(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters) - { - return operations.CreateOrUpdateAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Enables backup of an item or to modifies the backup policy information of - /// an already backed up item. This is an - /// asynchronous operation. To know the status of the operation, call the - /// GetItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Container name associated with the backup item. - /// - /// - /// Item name to be backed up. - /// - /// - /// resource backed up item - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Container name associated with the backed up item. + /// + /// + /// Backed up item name whose details are to be fetched. + /// + public static ProtectedItemResource Get(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IProtectedItemsOperations)operations).GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery).GetAwaiter().GetResult(); + } - /// - /// Used to disable backup of an item within a container. This is an - /// asynchronous operation. To know the status of the - /// request, call the GetItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Container name associated with the backed up item. - /// - /// - /// Backed up item to be deleted. - /// - public static void Delete(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName) + /// + /// Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Container name associated with the backed up item. + /// + /// + /// Backed up item name whose details are to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { - operations.DeleteAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + /// asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Container name associated with the backup item. + /// + /// + /// Item name to be backed up. + /// + public static ProtectedItemResource CreateOrUpdate(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters) + { + return ((IProtectedItemsOperations)operations).CreateOrUpdateAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters).GetAwaiter().GetResult(); + } - /// - /// Used to disable backup of an item within a container. This is an - /// asynchronous operation. To know the status of the - /// request, call the GetItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Container name associated with the backed up item. - /// - /// - /// Backed up item to be deleted. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + /// asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Container name associated with the backup item. + /// + /// + /// Item name to be backed up. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ProtectedItemResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, null, cancellationToken).ConfigureAwait(false)) { - (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the + /// request, call the GetItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Container name associated with the backed up item. + /// + /// + /// Backed up item to be deleted. + /// + public static void Delete(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName) + { + ((IProtectedItemsOperations)operations).DeleteAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName).GetAwaiter().GetResult(); + } + /// + /// Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the + /// request, call the GetItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Container name associated with the backed up item. + /// + /// + /// Backed up item to be deleted. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IProtectedItemsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerOperationResultsOperations.cs index bd46e2530e0d..419ee70d8bdd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerOperationResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ProtectionContainerOperationResultsOperations operations. /// - internal partial class ProtectionContainerOperationResultsOperations : IServiceOperations, IProtectionContainerOperationResultsOperations + internal partial class ProtectionContainerOperationResultsOperations : Microsoft.Rest.IServiceOperations, IProtectionContainerOperationResultsOperations { /// /// Initializes a new instance of the ProtectionContainerOperationResultsOperations class. @@ -36,13 +24,13 @@ internal partial class ProtectionContainerOperationResultsOperations : IServiceO /// /// Thrown when a required parameter is null /// - internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupClient client) + internal ProtectionContainerOperationResultsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupCli /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. @@ -67,8 +54,7 @@ internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupCli /// Container name whose information should be fetched. /// /// - /// Operation ID which represents the operation whose result needs to be - /// fetched. + /// Operation ID which represents the operation whose result needs to be fetched. /// /// /// Headers that will be added to request. @@ -76,13 +62,13 @@ internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupCli /// /// 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 /// /// @@ -91,89 +77,103 @@ internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupCli /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -185,55 +185,56 @@ internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupCli _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -243,9 +244,10 @@ internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupCli throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -256,24 +258,28 @@ internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupCli _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerOperationResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerOperationResultsOperationsExtensions.cs index 11fb97b0716c..6208aa8aca10 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerOperationResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerOperationResultsOperationsExtensions.cs @@ -1,87 +1,73 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectionContainerOperationResultsOperations. + /// Extension methods for ProtectionContainerOperationResultsOperations /// public static partial class ProtectionContainerOperationResultsOperationsExtensions { - /// - /// Fetches the result of any operation on the container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Container name whose information should be fetched. - /// - /// - /// Operation ID which represents the operation whose result needs to be - /// fetched. - /// - public static ProtectionContainerResource Get(this IProtectionContainerOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, fabricName, containerName, operationId).GetAwaiter().GetResult(); - } + /// + /// Fetches the result of any operation on the container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Container name whose information should be fetched. + /// + /// + /// Operation ID which represents the operation whose result needs to be fetched. + /// + public static ProtectionContainerResource Get(this IProtectionContainerOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string operationId) + { + return ((IProtectionContainerOperationResultsOperations)operations).GetAsync(vaultName, resourceGroupName, fabricName, containerName, operationId).GetAwaiter().GetResult(); + } - /// - /// Fetches the result of any operation on the container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Container name whose information should be fetched. - /// - /// - /// Operation ID which represents the operation whose result needs to be - /// fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectionContainerOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the result of any operation on the container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Container name whose information should be fetched. + /// + /// + /// Operation ID which represents the operation whose result needs to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectionContainerOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerRefreshOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerRefreshOperationResultsOperations.cs index 88c4a58053da..6b8c1236c64a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerRefreshOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerRefreshOperationResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ProtectionContainerRefreshOperationResultsOperations operations. /// - internal partial class ProtectionContainerRefreshOperationResultsOperations : IServiceOperations, IProtectionContainerRefreshOperationResultsOperations + internal partial class ProtectionContainerRefreshOperationResultsOperations : Microsoft.Rest.IServiceOperations, IProtectionContainerRefreshOperationResultsOperations { /// /// Initializes a new instance of the ProtectionContainerRefreshOperationResultsOperations class. @@ -36,13 +24,13 @@ internal partial class ProtectionContainerRefreshOperationResultsOperations : IS /// /// Thrown when a required parameter is null /// - internal ProtectionContainerRefreshOperationResultsOperations(RecoveryServicesBackupClient client) + internal ProtectionContainerRefreshOperationResultsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,22 +39,19 @@ internal ProtectionContainerRefreshOperationResultsOperations(RecoveryServicesBa public RecoveryServicesBackupClient Client { get; private set; } /// - /// Provides the result of the refresh operation triggered by the BeginRefresh - /// operation. + /// Provides the result of the refresh operation triggered by the BeginRefresh operation. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. /// /// - /// Operation ID associated with the operation whose result needs to be - /// fetched. + /// Operation ID associated with the operation whose result needs to be fetched. /// /// /// Headers that will be added to request. @@ -74,10 +59,10 @@ internal ProtectionContainerRefreshOperationResultsOperations(RecoveryServicesBa /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -86,83 +71,96 @@ internal ProtectionContainerRefreshOperationResultsOperations(RecoveryServicesBa /// /// A response object containing the response body and response headers. /// - public async Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -174,55 +172,56 @@ internal ProtectionContainerRefreshOperationResultsOperations(RecoveryServicesBa _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -232,19 +231,24 @@ internal ProtectionContainerRefreshOperationResultsOperations(RecoveryServicesBa throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerRefreshOperationResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerRefreshOperationResultsOperationsExtensions.cs index bc77e5181c92..c28b71658ddc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerRefreshOperationResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainerRefreshOperationResultsOperationsExtensions.cs @@ -1,80 +1,64 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectionContainerRefreshOperationResultsOperations. + /// Extension methods for ProtectionContainerRefreshOperationResultsOperations /// public static partial class ProtectionContainerRefreshOperationResultsOperationsExtensions { - /// - /// Provides the result of the refresh operation triggered by the BeginRefresh - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Operation ID associated with the operation whose result needs to be - /// fetched. - /// - public static void Get(this IProtectionContainerRefreshOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string operationId) - { - operations.GetAsync(vaultName, resourceGroupName, fabricName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Provides the result of the refresh operation triggered by the BeginRefresh - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Operation ID associated with the operation whose result needs to be - /// fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectionContainerRefreshOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Provides the result of the refresh operation triggered by the BeginRefresh operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Operation ID associated with the operation whose result needs to be fetched. + /// + public static void Get(this IProtectionContainerRefreshOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string operationId) + { + ((IProtectionContainerRefreshOperationResultsOperations)operations).GetAsync(vaultName, resourceGroupName, fabricName, operationId).GetAwaiter().GetResult(); + } + /// + /// Provides the result of the refresh operation triggered by the BeginRefresh operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Operation ID associated with the operation whose result needs to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectionContainerRefreshOperationResultsOperations operations, string vaultName, string resourceGroupName, string fabricName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainersOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainersOperations.cs index bb00cd47dbcd..34fac7b10c10 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainersOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ProtectionContainersOperations operations. /// - internal partial class ProtectionContainersOperations : IServiceOperations, IProtectionContainersOperations + internal partial class ProtectionContainersOperations : Microsoft.Rest.IServiceOperations, IProtectionContainersOperations { /// /// Initializes a new instance of the ProtectionContainersOperations class. @@ -37,13 +24,13 @@ internal partial class ProtectionContainersOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ProtectionContainersOperations(RecoveryServicesBackupClient client) + internal ProtectionContainersOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,15 +39,13 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Gets details of the specific container registered to your Recovery Services - /// Vault. + /// Gets details of the specific container registered to your Recovery Services Vault. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the fabric where the container belongs. @@ -74,13 +59,13 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -89,83 +74,96 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -177,55 +175,56 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -235,9 +234,10 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -248,37 +248,39 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Registers the container with Recovery Services vault. - /// This is an asynchronous operation. To track the operation status, use - /// location header to call get latest status of + /// This is an asynchronous operation. To track the operation status, use location header to call get latest status of /// the operation. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the container. @@ -295,13 +297,13 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -310,88 +312,102 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> RegisterWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, ProtectionContainerResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RegisterWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, ProtectionContainerResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Register", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Register", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -403,61 +419,62 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -467,9 +484,10 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -480,44 +498,44 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Unregisters the given container from your Recovery Services Vault. This is - /// an asynchronous operation. To determine - /// whether the backend service has finished processing the request, call Get - /// Container Operation Result API. + /// Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine + /// whether the backend service has finished processing the request, call Get Container Operation Result API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Name of the fabric where the container belongs. /// /// - /// Name of the container which needs to be unregistered from the Recovery - /// Services Vault. + /// Name of the container which needs to be unregistered from the Recovery Services Vault. /// /// /// Headers that will be added to request. @@ -525,10 +543,10 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -537,83 +555,96 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task UnregisterWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task UnregisterWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Unregister", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Unregister", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -625,55 +656,56 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -683,33 +715,36 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Inquires all the protectable items under the given container. + /// This is an async operation and the results should be tracked using location header or Azure-async-url. /// - /// - /// This is an async operation and the results should be tracked using location - /// header or Azure-async-url. - /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric Name associated with the container. @@ -717,19 +752,16 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) /// /// Name of the container in which inquiry needs to be triggered. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -738,92 +770,106 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task InquireWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task InquireWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Inquire", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Inquire", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsContainersInquiryQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsContainersInquiryQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsContainersInquiryQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -835,55 +881,56 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -893,49 +940,51 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Discovers all the containers in the subscription that can be backed up to - /// Recovery Services Vault. This is an - /// asynchronous operation. To know the status of the operation, call - /// GetRefreshOperationResult API. + /// Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an + /// asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated the container. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -944,86 +993,99 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task RefreshWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task RefreshWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Refresh", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Refresh", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsRefreshContainersQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsRefreshContainersQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsRefreshContainersQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1035,55 +1097,56 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1093,19 +1156,24 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainersOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainersOperationsExtensions.cs index 483d4ce0ba1b..9e9d83500cb8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainersOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionContainersOperationsExtensions.cs @@ -1,329 +1,276 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectionContainersOperations. + /// Extension methods for ProtectionContainersOperations /// public static partial class ProtectionContainersOperationsExtensions { - /// - /// Gets details of the specific container registered to your Recovery Services - /// Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the fabric where the container belongs. - /// - /// - /// Name of the container whose details need to be fetched. - /// - public static ProtectionContainerResource Get(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName) - { - return operations.GetAsync(vaultName, resourceGroupName, fabricName, containerName).GetAwaiter().GetResult(); - } - - /// - /// Gets details of the specific container registered to your Recovery Services - /// Vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the fabric where the container belongs. - /// - /// - /// Name of the container whose details need to be fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Registers the container with Recovery Services vault. - /// This is an asynchronous operation. To track the operation status, use - /// location header to call get latest status of - /// the operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Name of the container to be registered. - /// - /// - /// Request body for operation - /// - public static ProtectionContainerResource Register(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, ProtectionContainerResource parameters) - { - return operations.RegisterAsync(vaultName, resourceGroupName, fabricName, containerName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Registers the container with Recovery Services vault. - /// This is an asynchronous operation. To track the operation status, use - /// location header to call get latest status of - /// the operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the container. - /// - /// - /// Name of the container to be registered. - /// - /// - /// Request body for operation - /// - /// - /// The cancellation token. - /// - public static async Task RegisterAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, ProtectionContainerResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RegisterWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Unregisters the given container from your Recovery Services Vault. This is - /// an asynchronous operation. To determine - /// whether the backend service has finished processing the request, call Get - /// Container Operation Result API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the fabric where the container belongs. - /// - /// - /// Name of the container which needs to be unregistered from the Recovery - /// Services Vault. - /// - public static void Unregister(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName) - { - operations.UnregisterAsync(vaultName, resourceGroupName, fabricName, containerName).GetAwaiter().GetResult(); - } + /// + /// Gets details of the specific container registered to your Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the fabric where the container belongs. + /// + /// + /// Name of the container whose details need to be fetched. + /// + public static ProtectionContainerResource Get(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName) + { + return ((IProtectionContainersOperations)operations).GetAsync(vaultName, resourceGroupName, fabricName, containerName).GetAwaiter().GetResult(); + } - /// - /// Unregisters the given container from your Recovery Services Vault. This is - /// an asynchronous operation. To determine - /// whether the backend service has finished processing the request, call Get - /// Container Operation Result API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Name of the fabric where the container belongs. - /// - /// - /// Name of the container which needs to be unregistered from the Recovery - /// Services Vault. - /// - /// - /// The cancellation token. - /// - public static async Task UnregisterAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets details of the specific container registered to your Recovery Services Vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the fabric where the container belongs. + /// + /// + /// Name of the container whose details need to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, null, cancellationToken).ConfigureAwait(false)) { - (await operations.UnregisterWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Registers the container with Recovery Services vault. + /// This is an asynchronous operation. To track the operation status, use location header to call get latest status of + /// the operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Name of the container to be registered. + /// + public static ProtectionContainerResource Register(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, ProtectionContainerResource parameters) + { + return ((IProtectionContainersOperations)operations).RegisterAsync(vaultName, resourceGroupName, fabricName, containerName, parameters).GetAwaiter().GetResult(); + } - /// - /// Inquires all the protectable items under the given container. - /// - /// - /// This is an async operation and the results should be tracked using location - /// header or Azure-async-url. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric Name associated with the container. - /// - /// - /// Name of the container in which inquiry needs to be triggered. - /// - /// - /// OData parameters to apply to the operation. - /// - public static void Inquire(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, ODataQuery odataQuery = default(ODataQuery)) + /// + /// Registers the container with Recovery Services vault. + /// This is an asynchronous operation. To track the operation status, use location header to call get latest status of + /// the operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the container. + /// + /// + /// Name of the container to be registered. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RegisterAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, ProtectionContainerResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RegisterWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, parameters, null, cancellationToken).ConfigureAwait(false)) { - operations.InquireAsync(vaultName, resourceGroupName, fabricName, containerName, odataQuery).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine + /// whether the backend service has finished processing the request, call Get Container Operation Result API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the fabric where the container belongs. + /// + /// + /// Name of the container which needs to be unregistered from the Recovery Services Vault. + /// + public static void Unregister(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName) + { + ((IProtectionContainersOperations)operations).UnregisterAsync(vaultName, resourceGroupName, fabricName, containerName).GetAwaiter().GetResult(); + } - /// - /// Inquires all the protectable items under the given container. - /// - /// - /// This is an async operation and the results should be tracked using location - /// header or Azure-async-url. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric Name associated with the container. - /// - /// - /// Name of the container in which inquiry needs to be triggered. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task InquireAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.InquireWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, odataQuery, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine + /// whether the backend service has finished processing the request, call Get Container Operation Result API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Name of the fabric where the container belongs. + /// + /// + /// Name of the container which needs to be unregistered from the Recovery Services Vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UnregisterAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.UnregisterWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// This is an async operation and the results should be tracked using location header or Azure-async-url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric Name associated with the container. + /// + /// + /// Name of the container in which inquiry needs to be triggered. + /// + public static void Inquire(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + ((IProtectionContainersOperations)operations).InquireAsync(vaultName, resourceGroupName, fabricName, containerName, odataQuery).GetAwaiter().GetResult(); + } - /// - /// Discovers all the containers in the subscription that can be backed up to - /// Recovery Services Vault. This is an - /// asynchronous operation. To know the status of the operation, call - /// GetRefreshOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated the container. - /// - /// - /// OData parameters to apply to the operation. - /// - public static void Refresh(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, ODataQuery odataQuery = default(ODataQuery)) - { - operations.RefreshAsync(vaultName, resourceGroupName, fabricName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Discovers all the containers in the subscription that can be backed up to - /// Recovery Services Vault. This is an - /// asynchronous operation. To know the status of the operation, call - /// GetRefreshOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated the container. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task RefreshAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RefreshWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, odataQuery, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// This is an async operation and the results should be tracked using location header or Azure-async-url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric Name associated with the container. + /// + /// + /// Name of the container in which inquiry needs to be triggered. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task InquireAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.InquireWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, odataQuery, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an + /// asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated the container. + /// + public static void Refresh(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + ((IProtectionContainersOperations)operations).RefreshAsync(vaultName, resourceGroupName, fabricName, odataQuery).GetAwaiter().GetResult(); + } + /// + /// Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an + /// asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated the container. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RefreshAsync(this IProtectionContainersOperations operations, string vaultName, string resourceGroupName, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.RefreshWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, odataQuery, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionIntentOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionIntentOperations.cs index 6bf6f535276e..9ecc4d737d6d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionIntentOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionIntentOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ProtectionIntentOperations operations. /// - internal partial class ProtectionIntentOperations : IServiceOperations, IProtectionIntentOperations + internal partial class ProtectionIntentOperations : Microsoft.Rest.IServiceOperations, IProtectionIntentOperations { /// /// Initializes a new instance of the ProtectionIntentOperations class. @@ -36,13 +24,13 @@ internal partial class ProtectionIntentOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ProtectionIntentOperations(RecoveryServicesBackupClient client) + internal ProtectionIntentOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -68,13 +56,13 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -83,70 +71,81 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ValidateWithHttpMessagesAsync(string azureRegion, PreValidateEnableBackupRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ValidateWithHttpMessagesAsync(string azureRegion, PreValidateEnableBackupRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (azureRegion == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (azureRegion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "azureRegion"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("azureRegion", azureRegion); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Validate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Validate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection").ToString(); _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -158,61 +157,62 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -222,9 +222,10 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -235,36 +236,38 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Provides the details of the protection intent up item. This is an - /// asynchronous operation. To know the status of the operation, + /// Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation, /// call the GetItemOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -278,13 +281,13 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -293,83 +296,96 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (intentObjectName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "intentObjectName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "intentObjectName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("intentObjectName", intentObjectName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{intentObjectName}", System.Uri.EscapeDataString(intentObjectName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -381,55 +397,56 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -439,9 +456,10 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -452,35 +470,37 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Create Intent for Enabling backup of an item. This is a synchronous - /// operation. + /// Create Intent for Enabling backup of an item. This is a synchronous operation. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backup item. @@ -497,13 +517,13 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -512,88 +532,102 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, ProtectionIntentResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, ProtectionIntentResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (intentObjectName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "intentObjectName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "intentObjectName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("intentObjectName", intentObjectName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{intentObjectName}", System.Uri.EscapeDataString(intentObjectName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -605,61 +639,62 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -669,9 +704,10 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -682,25 +718,29 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Used to remove intent from an item /// @@ -708,8 +748,7 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the intent. @@ -723,10 +762,10 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -735,83 +774,96 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string intentObjectName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (intentObjectName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "intentObjectName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "intentObjectName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("intentObjectName", intentObjectName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{intentObjectName}", System.Uri.EscapeDataString(intentObjectName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -823,55 +875,56 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.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)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -881,19 +934,24 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionIntentOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionIntentOperationsExtensions.cs index d9ca4cee41fd..ce09f950df7b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionIntentOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionIntentOperationsExtensions.cs @@ -1,242 +1,207 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectionIntentOperations. + /// Extension methods for ProtectionIntentOperations /// public static partial class ProtectionIntentOperationsExtensions { - /// - /// It will validate followings - /// 1. Vault capacity - /// 2. VM is already protected - /// 3. Any VM related configuration passed in properties. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Enable backup validation request on Virtual Machine - /// - public static PreValidateEnableBackupResponse Validate(this IProtectionIntentOperations operations, string azureRegion, PreValidateEnableBackupRequest parameters) - { - return operations.ValidateAsync(azureRegion, parameters).GetAwaiter().GetResult(); - } - - /// - /// It will validate followings - /// 1. Vault capacity - /// 2. VM is already protected - /// 3. Any VM related configuration passed in properties. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure region to hit Api - /// - /// - /// Enable backup validation request on Virtual Machine - /// - /// - /// The cancellation token. - /// - public static async Task ValidateAsync(this IProtectionIntentOperations operations, string azureRegion, PreValidateEnableBackupRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ValidateWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Provides the details of the protection intent up item. This is an - /// asynchronous operation. To know the status of the operation, - /// call the GetItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Backed up item name whose details are to be fetched. - /// - public static ProtectionIntentResource Get(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName) - { - return operations.GetAsync(vaultName, resourceGroupName, fabricName, intentObjectName).GetAwaiter().GetResult(); - } - - /// - /// Provides the details of the protection intent up item. This is an - /// asynchronous operation. To know the status of the operation, - /// call the GetItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Backed up item name whose details are to be fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, intentObjectName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create Intent for Enabling backup of an item. This is a synchronous - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Intent object name. - /// - /// - /// resource backed up item - /// - public static ProtectionIntentResource CreateOrUpdate(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName, ProtectionIntentResource parameters) - { - return operations.CreateOrUpdateAsync(vaultName, resourceGroupName, fabricName, intentObjectName, parameters).GetAwaiter().GetResult(); - } + /// + /// It will validate followings + /// 1. Vault capacity + /// 2. VM is already protected + /// 3. Any VM related configuration passed in properties. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + public static PreValidateEnableBackupResponse Validate(this IProtectionIntentOperations operations, string azureRegion, PreValidateEnableBackupRequest parameters) + { + return ((IProtectionIntentOperations)operations).ValidateAsync(azureRegion, parameters).GetAwaiter().GetResult(); + } - /// - /// Create Intent for Enabling backup of an item. This is a synchronous - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backup item. - /// - /// - /// Intent object name. - /// - /// - /// resource backed up item - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName, ProtectionIntentResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// It will validate followings + /// 1. Vault capacity + /// 2. VM is already protected + /// 3. Any VM related configuration passed in properties. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Azure region to hit Api + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateAsync(this IProtectionIntentOperations operations, string azureRegion, PreValidateEnableBackupRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ValidateWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, intentObjectName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Backed up item name whose details are to be fetched. + /// + public static ProtectionIntentResource Get(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName) + { + return ((IProtectionIntentOperations)operations).GetAsync(vaultName, resourceGroupName, fabricName, intentObjectName).GetAwaiter().GetResult(); + } - /// - /// Used to remove intent from an item - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the intent. - /// - /// - /// Intent to be deleted. - /// - public static void Delete(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName) + /// + /// Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation, + /// call the GetItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Backed up item name whose details are to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, intentObjectName, null, cancellationToken).ConfigureAwait(false)) { - operations.DeleteAsync(vaultName, resourceGroupName, fabricName, intentObjectName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Create Intent for Enabling backup of an item. This is a synchronous operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Intent object name. + /// + public static ProtectionIntentResource CreateOrUpdate(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName, ProtectionIntentResource parameters) + { + return ((IProtectionIntentOperations)operations).CreateOrUpdateAsync(vaultName, resourceGroupName, fabricName, intentObjectName, parameters).GetAwaiter().GetResult(); + } - /// - /// Used to remove intent from an item - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the intent. - /// - /// - /// Intent to be deleted. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Create Intent for Enabling backup of an item. This is a synchronous operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backup item. + /// + /// + /// Intent object name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName, ProtectionIntentResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, intentObjectName, parameters, null, cancellationToken).ConfigureAwait(false)) { - (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, intentObjectName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Used to remove intent from an item + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the intent. + /// + /// + /// Intent to be deleted. + /// + public static void Delete(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName) + { + ((IProtectionIntentOperations)operations).DeleteAsync(vaultName, resourceGroupName, fabricName, intentObjectName).GetAwaiter().GetResult(); + } + /// + /// Used to remove intent from an item + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the intent. + /// + /// + /// Intent to be deleted. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IProtectionIntentOperations operations, string vaultName, string resourceGroupName, string fabricName, string intentObjectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, intentObjectName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPoliciesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPoliciesOperations.cs index 7748c907902a..3ba29a723553 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPoliciesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPoliciesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ProtectionPoliciesOperations operations. /// - internal partial class ProtectionPoliciesOperations : IServiceOperations, IProtectionPoliciesOperations + internal partial class ProtectionPoliciesOperations : Microsoft.Rest.IServiceOperations, IProtectionPoliciesOperations { /// /// Initializes a new instance of the ProtectionPoliciesOperations class. @@ -36,13 +24,13 @@ internal partial class ProtectionPoliciesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) + internal ProtectionPoliciesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,17 +39,14 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Provides the details of the backup policies associated to Recovery Services - /// Vault. This is an asynchronous - /// operation. Status of the operation can be fetched using - /// GetPolicyOperationResult API. + /// Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous + /// operation. Status of the operation can be fetched using GetPolicyOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Backup policy information to be fetched. @@ -72,13 +57,13 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -87,77 +72,89 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (policyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "policyName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("policyName", policyName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -169,55 +166,56 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -227,9 +225,10 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -240,36 +239,38 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates or modifies a backup policy. This is an asynchronous operation. - /// Status of the operation can be fetched + /// Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched /// using GetPolicyOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Backup policy to be created. @@ -283,13 +284,13 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -298,82 +299,95 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, ProtectionPolicyResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, ProtectionPolicyResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (policyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "policyName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("policyName", policyName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -385,61 +399,62 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -449,9 +464,10 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -462,64 +478,64 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes specified backup policy from your Recovery Services Vault. This is - /// an asynchronous operation. Status of the + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the /// operation can be fetched using GetProtectionPolicyOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Backup policy to be deleted. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Deletes specified backup policy from your Recovery Services Vault. This is - /// an asynchronous operation. Status of the + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the /// operation can be fetched using GetProtectionPolicyOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Backup policy to be deleted. @@ -530,10 +546,10 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -542,77 +558,89 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (policyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "policyName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("policyName", policyName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -624,55 +652,56 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -682,19 +711,24 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPoliciesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPoliciesOperationsExtensions.cs index 4f5a9387d7b3..cadfc0cae45c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPoliciesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPoliciesOperationsExtensions.cs @@ -1,235 +1,198 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectionPoliciesOperations. + /// Extension methods for ProtectionPoliciesOperations /// public static partial class ProtectionPoliciesOperationsExtensions { - /// - /// Provides the details of the backup policies associated to Recovery Services - /// Vault. This is an asynchronous - /// operation. Status of the operation can be fetched using - /// GetPolicyOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy information to be fetched. - /// - public static ProtectionPolicyResource Get(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName) - { - return operations.GetAsync(vaultName, resourceGroupName, policyName).GetAwaiter().GetResult(); - } - - /// - /// Provides the details of the backup policies associated to Recovery Services - /// Vault. This is an asynchronous - /// operation. Status of the operation can be fetched using - /// GetPolicyOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy information to be fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or modifies a backup policy. This is an asynchronous operation. - /// Status of the operation can be fetched - /// using GetPolicyOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy to be created. - /// - /// - /// resource backup policy - /// - public static ProtectionPolicyResource CreateOrUpdate(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, ProtectionPolicyResource parameters) - { - return operations.CreateOrUpdateAsync(vaultName, resourceGroupName, policyName, parameters).GetAwaiter().GetResult(); - } + /// + /// Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous + /// operation. Status of the operation can be fetched using GetPolicyOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy information to be fetched. + /// + public static ProtectionPolicyResource Get(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName) + { + return ((IProtectionPoliciesOperations)operations).GetAsync(vaultName, resourceGroupName, policyName).GetAwaiter().GetResult(); + } - /// - /// Creates or modifies a backup policy. This is an asynchronous operation. - /// Status of the operation can be fetched - /// using GetPolicyOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy to be created. - /// - /// - /// resource backup policy - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, ProtectionPolicyResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous + /// operation. Status of the operation can be fetched using GetPolicyOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy information to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched + /// using GetPolicyOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy to be created. + /// + public static ProtectionPolicyResource CreateOrUpdate(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, ProtectionPolicyResource parameters) + { + return ((IProtectionPoliciesOperations)operations).CreateOrUpdateAsync(vaultName, resourceGroupName, policyName, parameters).GetAwaiter().GetResult(); + } - /// - /// Deletes specified backup policy from your Recovery Services Vault. This is - /// an asynchronous operation. Status of the - /// operation can be fetched using GetProtectionPolicyOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy to be deleted. - /// - public static void Delete(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName) + /// + /// Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched + /// using GetPolicyOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy to be created. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, ProtectionPolicyResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, parameters, null, cancellationToken).ConfigureAwait(false)) { - operations.DeleteAsync(vaultName, resourceGroupName, policyName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy to be deleted. + /// + public static void Delete(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName) + { + ((IProtectionPoliciesOperations)operations).DeleteAsync(vaultName, resourceGroupName, policyName).GetAwaiter().GetResult(); + } - /// - /// Deletes specified backup policy from your Recovery Services Vault. This is - /// an asynchronous operation. Status of the - /// operation can be fetched using GetProtectionPolicyOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy to be deleted. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deletes specified backup policy from your Recovery Services Vault. This is - /// an asynchronous operation. Status of the - /// operation can be fetched using GetProtectionPolicyOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy to be deleted. - /// - public static void BeginDelete(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName) - { - operations.BeginDeleteAsync(vaultName, resourceGroupName, policyName).GetAwaiter().GetResult(); - } - - /// - /// Deletes specified backup policy from your Recovery Services Vault. This is - /// an asynchronous operation. Status of the - /// operation can be fetched using GetProtectionPolicyOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy to be deleted. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy to be deleted. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy to be deleted. + /// + public static void BeginDelete(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName) + { + ((IProtectionPoliciesOperations)operations).BeginDeleteAsync(vaultName, resourceGroupName, policyName).GetAwaiter().GetResult(); + } + /// + /// Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the + /// operation can be fetched using GetProtectionPolicyOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy to be deleted. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IProtectionPoliciesOperations operations, string vaultName, string resourceGroupName, string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationResultsOperations.cs index 18438d7f80e8..d34541aec1af 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ProtectionPolicyOperationResultsOperations operations. /// - internal partial class ProtectionPolicyOperationResultsOperations : IServiceOperations, IProtectionPolicyOperationResultsOperations + internal partial class ProtectionPolicyOperationResultsOperations : Microsoft.Rest.IServiceOperations, IProtectionPolicyOperationResultsOperations { /// /// Initializes a new instance of the ProtectionPolicyOperationResultsOperations class. @@ -36,13 +24,13 @@ internal partial class ProtectionPolicyOperationResultsOperations : IServiceOper /// /// Thrown when a required parameter is null /// - internal ProtectionPolicyOperationResultsOperations(RecoveryServicesBackupClient client) + internal ProtectionPolicyOperationResultsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,15 +45,13 @@ internal ProtectionPolicyOperationResultsOperations(RecoveryServicesBackupClient /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// - /// Backup policy name whose operation's result needs to be fetched. + /// Backup policy name whose operation's result needs to be fetched. /// /// - /// Operation ID which represents the operation whose result needs to be - /// fetched. + /// Operation ID which represents the operation whose result needs to be fetched. /// /// /// Headers that will be added to request. @@ -73,13 +59,13 @@ internal ProtectionPolicyOperationResultsOperations(RecoveryServicesBackupClient /// /// 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 /// /// @@ -88,83 +74,96 @@ internal ProtectionPolicyOperationResultsOperations(RecoveryServicesBackupClient /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (policyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "policyName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("policyName", policyName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -176,55 +175,56 @@ internal ProtectionPolicyOperationResultsOperations(RecoveryServicesBackupClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -234,9 +234,10 @@ internal ProtectionPolicyOperationResultsOperations(RecoveryServicesBackupClient throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -247,24 +248,28 @@ internal ProtectionPolicyOperationResultsOperations(RecoveryServicesBackupClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationResultsOperationsExtensions.cs index 6f3741c1b787..17693b6eca04 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationResultsOperationsExtensions.cs @@ -1,81 +1,67 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectionPolicyOperationResultsOperations. + /// Extension methods for ProtectionPolicyOperationResultsOperations /// public static partial class ProtectionPolicyOperationResultsOperationsExtensions { - /// - /// Provides the result of an operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy name whose operation's result needs to be fetched. - /// - /// - /// Operation ID which represents the operation whose result needs to be - /// fetched. - /// - public static ProtectionPolicyResource Get(this IProtectionPolicyOperationResultsOperations operations, string vaultName, string resourceGroupName, string policyName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, policyName, operationId).GetAwaiter().GetResult(); - } + /// + /// Provides the result of an operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy name whose operation's result needs to be fetched. + /// + /// + /// Operation ID which represents the operation whose result needs to be fetched. + /// + public static ProtectionPolicyResource Get(this IProtectionPolicyOperationResultsOperations operations, string vaultName, string resourceGroupName, string policyName, string operationId) + { + return ((IProtectionPolicyOperationResultsOperations)operations).GetAsync(vaultName, resourceGroupName, policyName, operationId).GetAwaiter().GetResult(); + } - /// - /// Provides the result of an operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy name whose operation's result needs to be fetched. - /// - /// - /// Operation ID which represents the operation whose result needs to be - /// fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectionPolicyOperationResultsOperations operations, string vaultName, string resourceGroupName, string policyName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides the result of an operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy name whose operation's result needs to be fetched. + /// + /// + /// Operation ID which represents the operation whose result needs to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectionPolicyOperationResultsOperations operations, string vaultName, string resourceGroupName, string policyName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationStatusesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationStatusesOperations.cs index fc7276a29f7b..52ef276abfc6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationStatusesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationStatusesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ProtectionPolicyOperationStatusesOperations operations. /// - internal partial class ProtectionPolicyOperationStatusesOperations : IServiceOperations, IProtectionPolicyOperationStatusesOperations + internal partial class ProtectionPolicyOperationStatusesOperations : Microsoft.Rest.IServiceOperations, IProtectionPolicyOperationStatusesOperations { /// /// Initializes a new instance of the ProtectionPolicyOperationStatusesOperations class. @@ -36,13 +24,13 @@ internal partial class ProtectionPolicyOperationStatusesOperations : IServiceOpe /// /// Thrown when a required parameter is null /// - internal ProtectionPolicyOperationStatusesOperations(RecoveryServicesBackupClient client) + internal ProtectionPolicyOperationStatusesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,26 +39,21 @@ internal ProtectionPolicyOperationStatusesOperations(RecoveryServicesBackupClien public RecoveryServicesBackupClient Client { get; private set; } /// - /// Provides the status of the asynchronous operations like backup, restore. - /// The status can be in progress, completed - /// or failed. You can refer to the Operation Status enum for all the possible - /// states of an operation. Some operations - /// create jobs. This method returns the list of jobs associated with - /// operation. + /// Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed + /// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs associated with operation. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// - /// Backup policy name whose operation's status needs to be fetched. + /// Backup policy name whose operation's status needs to be fetched. /// /// - /// Operation ID which represents an operation whose status needs to be - /// fetched. + /// Operation ID which represents an operation whose status needs to be fetched. /// /// /// Headers that will be added to request. @@ -78,13 +61,13 @@ internal ProtectionPolicyOperationStatusesOperations(RecoveryServicesBackupClien /// /// 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 /// /// @@ -93,83 +76,96 @@ internal ProtectionPolicyOperationStatusesOperations(RecoveryServicesBackupClien /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string policyName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (policyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "policyName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("policyName", policyName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -181,55 +177,56 @@ internal ProtectionPolicyOperationStatusesOperations(RecoveryServicesBackupClien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -239,9 +236,10 @@ internal ProtectionPolicyOperationStatusesOperations(RecoveryServicesBackupClien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -252,24 +250,28 @@ internal ProtectionPolicyOperationStatusesOperations(RecoveryServicesBackupClien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationStatusesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationStatusesOperationsExtensions.cs index f61cecb94bd4..8b9fc8e7803a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationStatusesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ProtectionPolicyOperationStatusesOperationsExtensions.cs @@ -1,91 +1,71 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ProtectionPolicyOperationStatusesOperations. + /// Extension methods for ProtectionPolicyOperationStatusesOperations /// public static partial class ProtectionPolicyOperationStatusesOperationsExtensions { - /// - /// Provides the status of the asynchronous operations like backup, restore. - /// The status can be in progress, completed - /// or failed. You can refer to the Operation Status enum for all the possible - /// states of an operation. Some operations - /// create jobs. This method returns the list of jobs associated with - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy name whose operation's status needs to be fetched. - /// - /// - /// Operation ID which represents an operation whose status needs to be - /// fetched. - /// - public static OperationStatus Get(this IProtectionPolicyOperationStatusesOperations operations, string vaultName, string resourceGroupName, string policyName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, policyName, operationId).GetAwaiter().GetResult(); - } + /// + /// Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed + /// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs associated with operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy name whose operation's status needs to be fetched. + /// + /// + /// Operation ID which represents an operation whose status needs to be fetched. + /// + public static OperationStatus Get(this IProtectionPolicyOperationStatusesOperations operations, string vaultName, string resourceGroupName, string policyName, string operationId) + { + return ((IProtectionPolicyOperationStatusesOperations)operations).GetAsync(vaultName, resourceGroupName, policyName, operationId).GetAwaiter().GetResult(); + } - /// - /// Provides the status of the asynchronous operations like backup, restore. - /// The status can be in progress, completed - /// or failed. You can refer to the Operation Status enum for all the possible - /// states of an operation. Some operations - /// create jobs. This method returns the list of jobs associated with - /// operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Backup policy name whose operation's status needs to be fetched. - /// - /// - /// Operation ID which represents an operation whose status needs to be - /// fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IProtectionPolicyOperationStatusesOperations operations, string vaultName, string resourceGroupName, string policyName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed + /// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations + /// create jobs. This method returns the list of jobs associated with operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Backup policy name whose operation's status needs to be fetched. + /// + /// + /// Operation ID which represents an operation whose status needs to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IProtectionPolicyOperationStatusesOperations operations, string vaultName, string resourceGroupName, string policyName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, policyName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsOperations.cs index e8296da72d87..0e7aa2c7b5f3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// RecoveryPointsOperations operations. /// - internal partial class RecoveryPointsOperations : IServiceOperations, IRecoveryPointsOperations + internal partial class RecoveryPointsOperations : Microsoft.Rest.IServiceOperations, IRecoveryPointsOperations { /// /// Initializes a new instance of the RecoveryPointsOperations class. @@ -37,13 +24,13 @@ internal partial class RecoveryPointsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal RecoveryPointsOperations(RecoveryServicesBackupClient client) + internal RecoveryPointsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -54,12 +41,14 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) /// /// Lists the backup copies for the backed up item. /// + /// + /// + /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up item. @@ -70,22 +59,19 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) /// /// Backed up item whose backup copies are to be fetched. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -94,98 +80,113 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _bmsrpQueryObject = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_bmsrpQueryObject)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_bmsrpQueryObject); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -197,55 +198,56 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -255,9 +257,10 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -268,37 +271,38 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Provides the information of the backed up data identified using - /// RecoveryPointID. This is an asynchronous operation. - /// To know the status of the operation, call the - /// GetProtectedItemOperationResult API. + /// Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. + /// To know the status of the operation, call the GetProtectedItemOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with backed up item. @@ -318,13 +322,13 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -333,95 +337,110 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + if (recoveryPointId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPointId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); tracingParameters.Add("recoveryPointId", recoveryPointId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); _url = _url.Replace("{recoveryPointId}", System.Uri.EscapeDataString(recoveryPointId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -433,55 +452,56 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -491,9 +511,10 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -504,25 +525,29 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists the backup copies for the backed up item. /// @@ -535,13 +560,13 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -550,51 +575,54 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -606,55 +634,56 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -664,9 +693,10 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -677,24 +707,28 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs index e6ecbe1a9930..c9fc7f3681ae 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs @@ -1,198 +1,177 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for RecoveryPointsOperations. + /// Extension methods for RecoveryPointsOperations /// public static partial class RecoveryPointsOperationsExtensions { - /// - /// Lists the backup copies for the backed up item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Container name associated with the backed up item. - /// - /// - /// Backed up item whose backup copies are to be fetched. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Lists the backup copies for the backed up item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up item. - /// - /// - /// Container name associated with the backed up item. - /// - /// - /// Backed up item whose backup copies are to be fetched. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Container name associated with the backed up item. + /// + /// + /// Backed up item whose backup copies are to be fetched. + /// + public static Microsoft.Rest.Azure.IPage List(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IRecoveryPointsOperations)operations).ListAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery).GetAwaiter().GetResult(); + } - /// - /// Provides the information of the backed up data identified using - /// RecoveryPointID. This is an asynchronous operation. - /// To know the status of the operation, call the - /// GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with backed up item. - /// - /// - /// Container name associated with backed up item. - /// - /// - /// Backed up item name whose backup data needs to be fetched. - /// - /// - /// RecoveryPointID represents the backed up data to be fetched. - /// - public static RecoveryPointResource Get(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId) + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up item. + /// + /// + /// Container name associated with the backed up item. + /// + /// + /// Backed up item whose backup copies are to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. + /// To know the status of the operation, call the GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with backed up item. + /// + /// + /// Container name associated with backed up item. + /// + /// + /// Backed up item name whose backup data needs to be fetched. + /// + /// + /// RecoveryPointID represents the backed up data to be fetched. + /// + public static RecoveryPointResource Get(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId) + { + return ((IRecoveryPointsOperations)operations).GetAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId).GetAwaiter().GetResult(); + } - /// - /// Provides the information of the backed up data identified using - /// RecoveryPointID. This is an asynchronous operation. - /// To know the status of the operation, call the - /// GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with backed up item. - /// - /// - /// Container name associated with backed up item. - /// - /// - /// Backed up item name whose backup data needs to be fetched. - /// - /// - /// RecoveryPointID represents the backed up data to be fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. + /// To know the status of the operation, call the GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with backed up item. + /// + /// + /// Container name associated with backed up item. + /// + /// + /// Backed up item name whose backup data needs to be fetched. + /// + /// + /// RecoveryPointID represents the backed up data to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IRecoveryPointsOperations operations, string nextPageLink) + { + return ((IRecoveryPointsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Lists the backup copies for the backed up item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IRecoveryPointsOperations operations, string nextPageLink) + /// + /// Lists the backup copies for the backed up item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IRecoveryPointsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Lists the backup copies for the backed up item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IRecoveryPointsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsRecommendedForMoveOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsRecommendedForMoveOperations.cs index 98d3ec3b3b25..5683f4439ffc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsRecommendedForMoveOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsRecommendedForMoveOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// RecoveryPointsRecommendedForMoveOperations operations. /// - internal partial class RecoveryPointsRecommendedForMoveOperations : IServiceOperations, IRecoveryPointsRecommendedForMoveOperations + internal partial class RecoveryPointsRecommendedForMoveOperations : Microsoft.Rest.IServiceOperations, IRecoveryPointsRecommendedForMoveOperations { /// /// Initializes a new instance of the RecoveryPointsRecommendedForMoveOperations class. @@ -36,13 +24,13 @@ internal partial class RecoveryPointsRecommendedForMoveOperations : IServiceOper /// /// Thrown when a required parameter is null /// - internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient client) + internal RecoveryPointsRecommendedForMoveOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,19 +45,21 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// + /// /// /// + /// /// /// /// Gets the class type. /// - /// + /// /// List of Recovery Points excluded from Move /// /// @@ -78,13 +68,13 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient /// /// 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 /// /// @@ -93,96 +83,110 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string objectType = default(string), IList excludedRPList = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string objectType = default(string), System.Collections.Generic.IList excludedRpList = default(System.Collections.Generic.IList), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + ListRecoveryPointsRecommendedForMoveRequest parameters = new ListRecoveryPointsRecommendedForMoveRequest(); - if (objectType != null || excludedRPList != null) + if(objectType != null||excludedRpList != null) { parameters.ObjectType = objectType; - parameters.ExcludedRPList = excludedRPList; + parameters.ExcludedRpList = excludedRpList; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -194,61 +198,62 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -258,9 +263,10 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -271,25 +277,29 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists the recovery points recommended for move to another tier /// @@ -302,13 +312,13 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient /// /// 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 /// /// @@ -317,51 +327,54 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -373,55 +386,56 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -431,9 +445,10 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -444,24 +459,28 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsRecommendedForMoveOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsRecommendedForMoveOperationsExtensions.cs index 04ecc49e852f..aa94b8925ea6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsRecommendedForMoveOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryPointsRecommendedForMoveOperationsExtensions.cs @@ -1,127 +1,106 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for RecoveryPointsRecommendedForMoveOperations. + /// Extension methods for RecoveryPointsRecommendedForMoveOperations /// public static partial class RecoveryPointsRecommendedForMoveOperationsExtensions { - /// - /// Lists the recovery points recommended for move to another tier - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// - /// - /// - /// - /// Gets the class type. - /// - /// - /// List of Recovery Points excluded from Move - /// - public static IPage List(this IRecoveryPointsRecommendedForMoveOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string objectType = default(string), IList excludedRPList = default(IList)) - { - return operations.ListAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, objectType, excludedRPList).GetAwaiter().GetResult(); - } + /// + /// Lists the recovery points recommended for move to another tier + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage List(this IRecoveryPointsRecommendedForMoveOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string objectType = default(string), System.Collections.Generic.IList excludedRpList = default(System.Collections.Generic.IList)) + { + return ((IRecoveryPointsRecommendedForMoveOperations)operations).ListAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, objectType, excludedRpList).GetAwaiter().GetResult(); + } - /// - /// Lists the recovery points recommended for move to another tier - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// - /// - /// - /// - /// Gets the class type. - /// - /// - /// List of Recovery Points excluded from Move - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IRecoveryPointsRecommendedForMoveOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string objectType = default(string), IList excludedRPList = default(IList), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the recovery points recommended for move to another tier + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IRecoveryPointsRecommendedForMoveOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string objectType = default(string), System.Collections.Generic.IList excludedRpList = default(System.Collections.Generic.IList), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, objectType, excludedRpList, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, objectType, excludedRPList, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the recovery points recommended for move to another tier + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IRecoveryPointsRecommendedForMoveOperations operations, string nextPageLink) + { + return ((IRecoveryPointsRecommendedForMoveOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Lists the recovery points recommended for move to another tier - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IRecoveryPointsRecommendedForMoveOperations operations, string nextPageLink) + /// + /// Lists the recovery points recommended for move to another tier + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IRecoveryPointsRecommendedForMoveOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Lists the recovery points recommended for move to another tier - /// - /// - /// 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 IRecoveryPointsRecommendedForMoveOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryServicesBackupClient.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryServicesBackupClient.cs index 2c880f32563e..b8148f84b59f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryServicesBackupClient.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryServicesBackupClient.cs @@ -1,323 +1,258 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - public partial class RecoveryServicesBackupClient : ServiceClient, IRecoveryServicesBackupClient, IAzureClient + public partial class RecoveryServicesBackupClient : Microsoft.Rest.ServiceClient, IRecoveryServicesBackupClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// - /// The subscription Id. + /// The API version to use for this operation. /// - public string SubscriptionId { get; set; } + public string ApiVersion { get; private set; } /// - /// Client Api Version. + /// The subscription Id. /// - public string ApiVersion { get; private set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// 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; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// 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. + /// 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; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IBackupResourceStorageConfigsNonCRROperations. + /// Gets the IBackupResourceStorageConfigsNonCrrOperations /// - public virtual IBackupResourceStorageConfigsNonCRROperations BackupResourceStorageConfigsNonCRR { get; private set; } - + public virtual IBackupResourceStorageConfigsNonCrrOperations BackupResourceStorageConfigsNonCrr { get; private set; } /// - /// Gets the IProtectionIntentOperations. + /// Gets the IProtectionIntentOperations /// public virtual IProtectionIntentOperations ProtectionIntent { get; private set; } - /// - /// Gets the IBackupStatusOperations. + /// Gets the IBackupStatusOperations /// public virtual IBackupStatusOperations BackupStatus { get; private set; } - /// - /// Gets the IFeatureSupportOperations. + /// Gets the IFeatureSupportOperations /// public virtual IFeatureSupportOperations FeatureSupport { get; private set; } - /// - /// Gets the IBackupProtectionIntentOperations. + /// Gets the IBackupProtectionIntentOperations /// public virtual IBackupProtectionIntentOperations BackupProtectionIntent { get; private set; } - /// - /// Gets the IBackupUsageSummariesOperations. + /// Gets the IBackupUsageSummariesOperations /// public virtual IBackupUsageSummariesOperations BackupUsageSummaries { get; private set; } - /// - /// Gets the IOperations. + /// Gets the IOperations /// public virtual IOperations Operations { get; private set; } - /// - /// Gets the IBackupResourceVaultConfigsOperations. + /// Gets the IBackupResourceVaultConfigsOperations /// public virtual IBackupResourceVaultConfigsOperations BackupResourceVaultConfigs { get; private set; } - /// - /// Gets the IBackupResourceEncryptionConfigsOperations. + /// Gets the IBackupResourceEncryptionConfigsOperations /// public virtual IBackupResourceEncryptionConfigsOperations BackupResourceEncryptionConfigs { get; private set; } - /// - /// Gets the IPrivateEndpointConnectionOperations. + /// Gets the IPrivateEndpointConnectionOperations /// public virtual IPrivateEndpointConnectionOperations PrivateEndpointConnection { get; private set; } - /// - /// Gets the IPrivateEndpointOperations. + /// Gets the IPrivateEndpointOperations /// public virtual IPrivateEndpointOperations PrivateEndpoint { get; private set; } - /// - /// Gets the IBMSPrepareDataMoveOperationResultOperations. + /// Gets the IBmsPrepareDataMoveOperationResultOperations /// - public virtual IBMSPrepareDataMoveOperationResultOperations BMSPrepareDataMoveOperationResult { get; private set; } - + public virtual IBmsPrepareDataMoveOperationResultOperations BmsPrepareDataMoveOperationResult { get; private set; } /// - /// Gets the IProtectedItemsOperations. + /// Gets the IProtectedItemsOperations /// public virtual IProtectedItemsOperations ProtectedItems { get; private set; } - /// - /// Gets the IProtectedItemOperationResultsOperations. + /// Gets the IProtectedItemOperationResultsOperations /// public virtual IProtectedItemOperationResultsOperations ProtectedItemOperationResults { get; private set; } - /// - /// Gets the IRecoveryPointsOperations. + /// Gets the IRecoveryPointsOperations /// public virtual IRecoveryPointsOperations RecoveryPoints { get; private set; } - /// - /// Gets the IRestoresOperations. + /// Gets the IRestoresOperations /// public virtual IRestoresOperations Restores { get; private set; } - /// - /// Gets the IBackupPoliciesOperations. + /// Gets the IBackupPoliciesOperations /// public virtual IBackupPoliciesOperations BackupPolicies { get; private set; } - /// - /// Gets the IProtectionPoliciesOperations. + /// Gets the IProtectionPoliciesOperations /// public virtual IProtectionPoliciesOperations ProtectionPolicies { get; private set; } - /// - /// Gets the IProtectionPolicyOperationResultsOperations. + /// Gets the IProtectionPolicyOperationResultsOperations /// public virtual IProtectionPolicyOperationResultsOperations ProtectionPolicyOperationResults { get; private set; } - /// - /// Gets the IBackupJobsOperations. + /// Gets the IBackupJobsOperations /// public virtual IBackupJobsOperations BackupJobs { get; private set; } - /// - /// Gets the IJobDetailsOperations. + /// Gets the IJobDetailsOperations /// public virtual IJobDetailsOperations JobDetails { get; private set; } - /// - /// Gets the IJobCancellationsOperations. + /// Gets the IJobCancellationsOperations /// public virtual IJobCancellationsOperations JobCancellations { get; private set; } - /// - /// Gets the IJobOperationResultsOperations. + /// Gets the IJobOperationResultsOperations /// public virtual IJobOperationResultsOperations JobOperationResults { get; private set; } - /// - /// Gets the IExportJobsOperationResultsOperations. + /// Gets the IExportJobsOperationResultsOperations /// public virtual IExportJobsOperationResultsOperations ExportJobsOperationResults { get; private set; } - /// - /// Gets the IJobsOperations. + /// Gets the IJobsOperations /// public virtual IJobsOperations Jobs { get; private set; } - /// - /// Gets the IBackupProtectedItemsOperations. + /// Gets the IBackupProtectedItemsOperations /// public virtual IBackupProtectedItemsOperations BackupProtectedItems { get; private set; } - /// - /// Gets the IOperationOperations. + /// Gets the IOperationOperations /// public virtual IOperationOperations Operation { get; private set; } - /// - /// Gets the IValidateOperationOperations. + /// Gets the IValidateOperationOperations /// public virtual IValidateOperationOperations ValidateOperation { get; private set; } - /// - /// Gets the IValidateOperationResultsOperations. + /// Gets the IValidateOperationResultsOperations /// public virtual IValidateOperationResultsOperations ValidateOperationResults { get; private set; } - /// - /// Gets the IValidateOperationStatusesOperations. + /// Gets the IValidateOperationStatusesOperations /// public virtual IValidateOperationStatusesOperations ValidateOperationStatuses { get; private set; } - /// - /// Gets the IBackupEnginesOperations. + /// Gets the IBackupEnginesOperations /// public virtual IBackupEnginesOperations BackupEngines { get; private set; } - /// - /// Gets the IProtectionContainerRefreshOperationResultsOperations. + /// Gets the IProtectionContainerRefreshOperationResultsOperations /// public virtual IProtectionContainerRefreshOperationResultsOperations ProtectionContainerRefreshOperationResults { get; private set; } - /// - /// Gets the IProtectableContainersOperations. + /// Gets the IProtectableContainersOperations /// public virtual IProtectableContainersOperations ProtectableContainers { get; private set; } - /// - /// Gets the IProtectionContainersOperations. + /// Gets the IProtectionContainersOperations /// public virtual IProtectionContainersOperations ProtectionContainers { get; private set; } - /// - /// Gets the IBackupWorkloadItemsOperations. + /// Gets the IBackupWorkloadItemsOperations /// public virtual IBackupWorkloadItemsOperations BackupWorkloadItems { get; private set; } - /// - /// Gets the IProtectionContainerOperationResultsOperations. + /// Gets the IProtectionContainerOperationResultsOperations /// public virtual IProtectionContainerOperationResultsOperations ProtectionContainerOperationResults { get; private set; } - /// - /// Gets the IBackupsOperations. + /// Gets the IBackupsOperations /// public virtual IBackupsOperations Backups { get; private set; } - /// - /// Gets the IProtectedItemOperationStatusesOperations. + /// Gets the IProtectedItemOperationStatusesOperations /// public virtual IProtectedItemOperationStatusesOperations ProtectedItemOperationStatuses { get; private set; } - /// - /// Gets the IItemLevelRecoveryConnectionsOperations. + /// Gets the IItemLevelRecoveryConnectionsOperations /// public virtual IItemLevelRecoveryConnectionsOperations ItemLevelRecoveryConnections { get; private set; } - /// - /// Gets the IBackupOperationResultsOperations. + /// Gets the IBackupOperationResultsOperations /// public virtual IBackupOperationResultsOperations BackupOperationResults { get; private set; } - /// - /// Gets the IBackupOperationStatusesOperations. + /// Gets the IBackupOperationStatusesOperations /// public virtual IBackupOperationStatusesOperations BackupOperationStatuses { get; private set; } - /// - /// Gets the IProtectionPolicyOperationStatusesOperations. + /// Gets the IProtectionPolicyOperationStatusesOperations /// public virtual IProtectionPolicyOperationStatusesOperations ProtectionPolicyOperationStatuses { get; private set; } - /// - /// Gets the IBackupProtectableItemsOperations. + /// Gets the IBackupProtectableItemsOperations /// public virtual IBackupProtectableItemsOperations BackupProtectableItems { get; private set; } - /// - /// Gets the IBackupProtectionContainersOperations. + /// Gets the IBackupProtectionContainersOperations /// public virtual IBackupProtectionContainersOperations BackupProtectionContainers { get; private set; } - /// - /// Gets the IDeletedProtectionContainersOperations. + /// Gets the IDeletedProtectionContainersOperations /// public virtual IDeletedProtectionContainersOperations DeletedProtectionContainers { get; private set; } - /// - /// Gets the ISecurityPINsOperations. + /// Gets the ISecurityPiNsOperations /// - public virtual ISecurityPINsOperations SecurityPINs { get; private set; } - + public virtual ISecurityPiNsOperations SecurityPiNs { get; private set; } /// - /// Gets the IRecoveryPointsRecommendedForMoveOperations. + /// Gets the IRecoveryPointsRecommendedForMoveOperations /// public virtual IRecoveryPointsRecommendedForMoveOperations RecoveryPointsRecommendedForMove { get; private set; } - /// - /// Gets the IResourceGuardProxiesOperations. + /// Gets the IResourceGuardProxiesOperations /// public virtual IResourceGuardProxiesOperations ResourceGuardProxies { get; private set; } - /// - /// Gets the IResourceGuardProxyOperations. + /// Gets the IResourceGuardProxyOperations /// public virtual IResourceGuardProxyOperations ResourceGuardProxy { get; private set; } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// @@ -326,24 +261,22 @@ public partial class RecoveryServicesBackupClient : ServiceClient /// /// True: will dispose the provided httpClient on calling RecoveryServicesBackupClient.Dispose(). False: will not dispose provided httpClient - protected RecoveryServicesBackupClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected RecoveryServicesBackupClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected RecoveryServicesBackupClient(params DelegatingHandler[] handlers) : base(handlers) + protected RecoveryServicesBackupClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the RecoveryServicesBackupClient class. + /// Initializes a new instance of the RecoveryServicesBackupClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -351,11 +284,10 @@ protected RecoveryServicesBackupClient(params DelegatingHandler[] handlers) : ba /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected RecoveryServicesBackupClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected RecoveryServicesBackupClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// @@ -368,15 +300,14 @@ protected RecoveryServicesBackupClient(HttpClientHandler rootHandler, params Del /// /// Thrown when a required parameter is null /// - protected RecoveryServicesBackupClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected RecoveryServicesBackupClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// @@ -392,15 +323,15 @@ protected RecoveryServicesBackupClient(System.Uri baseUri, params DelegatingHand /// /// Thrown when a required parameter is null /// - protected RecoveryServicesBackupClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected RecoveryServicesBackupClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// @@ -413,23 +344,23 @@ protected RecoveryServicesBackupClient(System.Uri baseUri, HttpClientHandler roo /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public RecoveryServicesBackupClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -440,23 +371,23 @@ public RecoveryServicesBackupClient(ServiceClientCredentials credentials, params /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public RecoveryServicesBackupClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -468,26 +399,26 @@ public RecoveryServicesBackupClient(ServiceClientCredentials credentials, HttpCl /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public RecoveryServicesBackupClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -496,7 +427,7 @@ public RecoveryServicesBackupClient(ServiceClientCredentials credentials, HttpCl /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public RecoveryServicesBackupClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -506,33 +437,30 @@ public RecoveryServicesBackupClient(System.Uri baseUri, ServiceClientCredentials { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesBackupClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public RecoveryServicesBackupClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public RecoveryServicesBackupClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -542,144 +470,185 @@ public RecoveryServicesBackupClient(System.Uri baseUri, ServiceClientCredentials { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - BackupResourceStorageConfigsNonCRR = new BackupResourceStorageConfigsNonCRROperations(this); - ProtectionIntent = new ProtectionIntentOperations(this); - BackupStatus = new BackupStatusOperations(this); - FeatureSupport = new FeatureSupportOperations(this); - BackupProtectionIntent = new BackupProtectionIntentOperations(this); - BackupUsageSummaries = new BackupUsageSummariesOperations(this); - Operations = new Operations(this); - BackupResourceVaultConfigs = new BackupResourceVaultConfigsOperations(this); - BackupResourceEncryptionConfigs = new BackupResourceEncryptionConfigsOperations(this); - PrivateEndpointConnection = new PrivateEndpointConnectionOperations(this); - PrivateEndpoint = new PrivateEndpointOperations(this); - BMSPrepareDataMoveOperationResult = new BMSPrepareDataMoveOperationResultOperations(this); - ProtectedItems = new ProtectedItemsOperations(this); - ProtectedItemOperationResults = new ProtectedItemOperationResultsOperations(this); - RecoveryPoints = new RecoveryPointsOperations(this); - Restores = new RestoresOperations(this); - BackupPolicies = new BackupPoliciesOperations(this); - ProtectionPolicies = new ProtectionPoliciesOperations(this); - ProtectionPolicyOperationResults = new ProtectionPolicyOperationResultsOperations(this); - BackupJobs = new BackupJobsOperations(this); - JobDetails = new JobDetailsOperations(this); - JobCancellations = new JobCancellationsOperations(this); - JobOperationResults = new JobOperationResultsOperations(this); - ExportJobsOperationResults = new ExportJobsOperationResultsOperations(this); - Jobs = new JobsOperations(this); - BackupProtectedItems = new BackupProtectedItemsOperations(this); - Operation = new OperationOperations(this); - ValidateOperation = new ValidateOperationOperations(this); - ValidateOperationResults = new ValidateOperationResultsOperations(this); - ValidateOperationStatuses = new ValidateOperationStatusesOperations(this); - BackupEngines = new BackupEnginesOperations(this); - ProtectionContainerRefreshOperationResults = new ProtectionContainerRefreshOperationResultsOperations(this); - ProtectableContainers = new ProtectableContainersOperations(this); - ProtectionContainers = new ProtectionContainersOperations(this); - BackupWorkloadItems = new BackupWorkloadItemsOperations(this); - ProtectionContainerOperationResults = new ProtectionContainerOperationResultsOperations(this); - Backups = new BackupsOperations(this); - ProtectedItemOperationStatuses = new ProtectedItemOperationStatusesOperations(this); - ItemLevelRecoveryConnections = new ItemLevelRecoveryConnectionsOperations(this); - BackupOperationResults = new BackupOperationResultsOperations(this); - BackupOperationStatuses = new BackupOperationStatusesOperations(this); - ProtectionPolicyOperationStatuses = new ProtectionPolicyOperationStatusesOperations(this); - BackupProtectableItems = new BackupProtectableItemsOperations(this); - BackupProtectionContainers = new BackupProtectionContainersOperations(this); - DeletedProtectionContainers = new DeletedProtectionContainersOperations(this); - SecurityPINs = new SecurityPINsOperations(this); - RecoveryPointsRecommendedForMove = new RecoveryPointsRecommendedForMoveOperations(this); - ResourceGuardProxies = new ResourceGuardProxiesOperations(this); - ResourceGuardProxy = new ResourceGuardProxyOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2023-01-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.BackupResourceStorageConfigsNonCrr = new BackupResourceStorageConfigsNonCrrOperations(this); + this.ProtectionIntent = new ProtectionIntentOperations(this); + this.BackupStatus = new BackupStatusOperations(this); + this.FeatureSupport = new FeatureSupportOperations(this); + this.BackupProtectionIntent = new BackupProtectionIntentOperations(this); + this.BackupUsageSummaries = new BackupUsageSummariesOperations(this); + this.Operations = new Operations(this); + this.BackupResourceVaultConfigs = new BackupResourceVaultConfigsOperations(this); + this.BackupResourceEncryptionConfigs = new BackupResourceEncryptionConfigsOperations(this); + this.PrivateEndpointConnection = new PrivateEndpointConnectionOperations(this); + this.PrivateEndpoint = new PrivateEndpointOperations(this); + this.BmsPrepareDataMoveOperationResult = new BmsPrepareDataMoveOperationResultOperations(this); + this.ProtectedItems = new ProtectedItemsOperations(this); + this.ProtectedItemOperationResults = new ProtectedItemOperationResultsOperations(this); + this.RecoveryPoints = new RecoveryPointsOperations(this); + this.Restores = new RestoresOperations(this); + this.BackupPolicies = new BackupPoliciesOperations(this); + this.ProtectionPolicies = new ProtectionPoliciesOperations(this); + this.ProtectionPolicyOperationResults = new ProtectionPolicyOperationResultsOperations(this); + this.BackupJobs = new BackupJobsOperations(this); + this.JobDetails = new JobDetailsOperations(this); + this.JobCancellations = new JobCancellationsOperations(this); + this.JobOperationResults = new JobOperationResultsOperations(this); + this.ExportJobsOperationResults = new ExportJobsOperationResultsOperations(this); + this.Jobs = new JobsOperations(this); + this.BackupProtectedItems = new BackupProtectedItemsOperations(this); + this.Operation = new OperationOperations(this); + this.ValidateOperation = new ValidateOperationOperations(this); + this.ValidateOperationResults = new ValidateOperationResultsOperations(this); + this.ValidateOperationStatuses = new ValidateOperationStatusesOperations(this); + this.BackupEngines = new BackupEnginesOperations(this); + this.ProtectionContainerRefreshOperationResults = new ProtectionContainerRefreshOperationResultsOperations(this); + this.ProtectableContainers = new ProtectableContainersOperations(this); + this.ProtectionContainers = new ProtectionContainersOperations(this); + this.BackupWorkloadItems = new BackupWorkloadItemsOperations(this); + this.ProtectionContainerOperationResults = new ProtectionContainerOperationResultsOperations(this); + this.Backups = new BackupsOperations(this); + this.ProtectedItemOperationStatuses = new ProtectedItemOperationStatusesOperations(this); + this.ItemLevelRecoveryConnections = new ItemLevelRecoveryConnectionsOperations(this); + this.BackupOperationResults = new BackupOperationResultsOperations(this); + this.BackupOperationStatuses = new BackupOperationStatusesOperations(this); + this.ProtectionPolicyOperationStatuses = new ProtectionPolicyOperationStatusesOperations(this); + this.BackupProtectableItems = new BackupProtectableItemsOperations(this); + this.BackupProtectionContainers = new BackupProtectionContainersOperations(this); + this.DeletedProtectionContainers = new DeletedProtectionContainersOperations(this); + this.SecurityPiNs = new SecurityPiNsOperations(this); + this.RecoveryPointsRecommendedForMove = new RecoveryPointsRecommendedForMoveOperations(this); + this.ResourceGuardProxies = new ResourceGuardProxiesOperations(this); + this.ResourceGuardProxy = new ResourceGuardProxyOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2023-01-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - DeserializationSettings = new JsonSerializerSettings + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("schedulePolicyType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("schedulePolicyType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("retentionPolicyType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("retentionPolicyType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("jobType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("jobType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("protectedItemType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("protectedItemType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("backupManagementType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("backupManagementType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("featureType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("featureType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("protectionIntentItemType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("protectionIntentItemType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("backupEngineType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("backupEngineType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("protectableContainerType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("protectableContainerType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("containerType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("containerType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("workloadItemType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("workloadItemType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("protectableItemType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("protectableItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("featureType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("featureType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectionIntentItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectionIntentItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectedItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectedItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("backupManagementType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("backupManagementType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("jobType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("jobType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("backupEngineType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("backupEngineType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectableContainerType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectableContainerType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("containerType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("containerType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("workloadItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("workloadItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectableItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectableItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("schedulePolicyType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("schedulePolicyType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("retentionPolicyType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("retentionPolicyType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectedItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectedItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectedItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectedItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("objectType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("objectType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("containerType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("containerType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("containerType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("containerType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectableItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectableItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("containerType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("containerType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("workloadItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("workloadItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectableItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectableItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectionIntentItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectionIntentItemType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("protectionIntentItemType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("protectionIntentItemType")); CustomInitialize(); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } /// /// Fetches operation status for data move operation on vault @@ -688,10 +657,10 @@ private void Initialize() /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// Headers that will be added to request. @@ -699,13 +668,13 @@ private void Initialize() /// /// 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 /// /// @@ -714,77 +683,89 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetOperationStatusWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (ApiVersion == null) + + + + + if (this.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (SubscriptionId == null) + + if (this.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.SubscriptionId"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetOperationStatus", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetOperationStatus", tracingParameters); } // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; + + var _baseUrl = this.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.SubscriptionId)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + if (this.GenerateClientRequestId != null && this.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (AcceptLanguage != null) + if (this.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -796,50 +777,51 @@ private void Initialize() _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Credentials != null) + if (this.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -849,9 +831,10 @@ private void Initialize() throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -862,25 +845,29 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Prepares source vault for Data Move operation /// @@ -888,23 +875,22 @@ private void Initialize() /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Prepare data move request /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task BMSPrepareDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BMSPrepareDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginBMSPrepareDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginBMSPrepareDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -914,23 +900,22 @@ private void Initialize() /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Trigger data move request /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task BMSTriggerDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BMSTriggerDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginBMSTriggerDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginBMSTriggerDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -940,31 +925,34 @@ private void Initialize() /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// + /// /// /// + /// /// /// + /// /// /// /// Move Resource Across Tiers Request /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task MoveRecoveryPointWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task MoveRecoveryPointWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginMoveRecoveryPointWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginMoveRecoveryPointWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -974,8 +962,7 @@ private void Initialize() /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Prepare data move request @@ -986,10 +973,10 @@ private void Initialize() /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -998,80 +985,91 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task BeginBMSPrepareDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginBMSPrepareDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + if (parameters != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + parameters.Validate(); } - if (resourceGroupName == null) + if (this.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.ApiVersion"); } - if (SubscriptionId == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (parameters == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters != null) + + if (this.SubscriptionId == null) { - parameters.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginBMSPrepareDataMove", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginBMSPrepareDataMove", tracingParameters); } // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; + + var _baseUrl = this.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + if (this.GenerateClientRequestId != null && this.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (AcceptLanguage != null) + if (this.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1083,56 +1081,57 @@ private void Initialize() _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = SafeJsonConvert.SerializeObject(parameters, SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Credentials != null) + if (this.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1142,20 +1141,25 @@ private void Initialize() throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Triggers Data Move Operation on target vault /// @@ -1163,8 +1167,7 @@ private void Initialize() /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Trigger data move request @@ -1175,10 +1178,10 @@ private void Initialize() /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1187,80 +1190,91 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task BeginBMSTriggerDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginBMSTriggerDataMoveWithHttpMessagesAsync(string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + if (parameters != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + parameters.Validate(); } - if (resourceGroupName == null) + if (this.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.ApiVersion"); } - if (SubscriptionId == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (parameters == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters != null) + + if (this.SubscriptionId == null) { - parameters.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginBMSTriggerDataMove", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginBMSTriggerDataMove", tracingParameters); } // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; + + var _baseUrl = this.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + if (this.GenerateClientRequestId != null && this.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (AcceptLanguage != null) + if (this.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1272,56 +1286,57 @@ private void Initialize() _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = SafeJsonConvert.SerializeObject(parameters, SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Credentials != null) + if (this.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - NewErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + NewErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); if (_errorBody != null) { ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1331,20 +1346,25 @@ private void Initialize() throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Move recovery point from one datastore to another store. /// @@ -1352,16 +1372,19 @@ private void Initialize() /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// + /// /// /// + /// /// /// + /// /// /// /// Move Resource Across Tiers Request @@ -1372,10 +1395,10 @@ private void Initialize() /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1384,100 +1407,116 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task BeginMoveRecoveryPointWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginMoveRecoveryPointWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (ApiVersion == null) + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (SubscriptionId == null) + + if (this.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + if (recoveryPointId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPointId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); tracingParameters.Add("recoveryPointId", recoveryPointId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMoveRecoveryPoint", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginMoveRecoveryPoint", tracingParameters); } // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; + + var _baseUrl = this.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); _url = _url.Replace("{recoveryPointId}", System.Uri.EscapeDataString(recoveryPointId)); - List _queryParameters = new List(); - if (ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + if (this.GenerateClientRequestId != null && this.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (AcceptLanguage != null) + if (this.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1489,61 +1528,62 @@ private void Initialize() _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = SafeJsonConvert.SerializeObject(parameters, SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Credentials != null) + if (this.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1553,19 +1593,24 @@ private void Initialize() throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryServicesBackupClientExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryServicesBackupClientExtensions.cs index c6bbee1b4b0a..e8b224ac65b0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryServicesBackupClientExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RecoveryServicesBackupClientExtensions.cs @@ -1,373 +1,325 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for RecoveryServicesBackupClient. + /// Extension methods for RecoveryServicesBackupClient /// public static partial class RecoveryServicesBackupClientExtensions { - /// - /// Fetches operation status for data move operation on vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - public static OperationStatus GetOperationStatus(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string operationId) - { - return operations.GetOperationStatusAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); - } - - /// - /// Fetches operation status for data move operation on vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetOperationStatusAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetOperationStatusWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Prepares source vault for Data Move operation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Prepare data move request - /// - public static void BMSPrepareDataMove(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters) - { - operations.BMSPrepareDataMoveAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Prepares source vault for Data Move operation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Prepare data move request - /// - /// - /// The cancellation token. - /// - public static async Task BMSPrepareDataMoveAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BMSPrepareDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Triggers Data Move Operation on target vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Trigger data move request - /// - public static void BMSTriggerDataMove(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters) - { - operations.BMSTriggerDataMoveAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Triggers Data Move Operation on target vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Trigger data move request - /// - /// - /// The cancellation token. - /// - public static async Task BMSTriggerDataMoveAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BMSTriggerDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Fetches operation status for data move operation on vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + public static OperationStatus GetOperationStatus(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string operationId) + { + return ((IRecoveryServicesBackupClient)operations).GetOperationStatusAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); + } - /// - /// Move recovery point from one datastore to another store. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Move Resource Across Tiers Request - /// - public static void MoveRecoveryPoint(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters) + /// + /// Fetches operation status for data move operation on vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetOperationStatusAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetOperationStatusWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) { - operations.MoveRecoveryPointAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Prepares source vault for Data Move operation + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void BMSPrepareDataMove(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters) + { + ((IRecoveryServicesBackupClient)operations).BMSPrepareDataMoveAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Move recovery point from one datastore to another store. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Move Resource Across Tiers Request - /// - /// - /// The cancellation token. - /// - public static async Task MoveRecoveryPointAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.MoveRecoveryPointWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Prepares source vault for Data Move operation + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BMSPrepareDataMoveAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BMSPrepareDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Triggers Data Move Operation on target vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void BMSTriggerDataMove(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters) + { + ((IRecoveryServicesBackupClient)operations).BMSTriggerDataMoveAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Prepares source vault for Data Move operation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Prepare data move request - /// - public static void BeginBMSPrepareDataMove(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters) - { - operations.BeginBMSPrepareDataMoveAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } + /// + /// Triggers Data Move Operation on target vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BMSTriggerDataMoveAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BMSTriggerDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Move recovery point from one datastore to another store. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static void MoveRecoveryPoint(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters) + { + ((IRecoveryServicesBackupClient)operations).MoveRecoveryPointAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); + } - /// - /// Prepares source vault for Data Move operation - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Prepare data move request - /// - /// - /// The cancellation token. - /// - public static async Task BeginBMSPrepareDataMoveAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginBMSPrepareDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Move recovery point from one datastore to another store. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task MoveRecoveryPointAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.MoveRecoveryPointWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Prepares source vault for Data Move operation + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void BeginBMSPrepareDataMove(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters) + { + ((IRecoveryServicesBackupClient)operations).BeginBMSPrepareDataMoveAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Triggers Data Move Operation on target vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Trigger data move request - /// - public static void BeginBMSTriggerDataMove(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters) - { - operations.BeginBMSTriggerDataMoveAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } + /// + /// Prepares source vault for Data Move operation + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginBMSPrepareDataMoveAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, PrepareDataMoveRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginBMSPrepareDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Triggers Data Move Operation on target vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void BeginBMSTriggerDataMove(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters) + { + ((IRecoveryServicesBackupClient)operations).BeginBMSTriggerDataMoveAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Triggers Data Move Operation on target vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Trigger data move request - /// - /// - /// The cancellation token. - /// - public static async Task BeginBMSTriggerDataMoveAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginBMSTriggerDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Move recovery point from one datastore to another store. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Move Resource Across Tiers Request - /// - public static void BeginMoveRecoveryPoint(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters) - { - operations.BeginMoveRecoveryPointAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); - } - - /// - /// Move recovery point from one datastore to another store. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// Move Resource Across Tiers Request - /// - /// - /// The cancellation token. - /// - public static async Task BeginMoveRecoveryPointAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginMoveRecoveryPointWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Triggers Data Move Operation on target vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginBMSTriggerDataMoveAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, TriggerDataMoveRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginBMSTriggerDataMoveWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Move recovery point from one datastore to another store. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static void BeginMoveRecoveryPoint(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters) + { + ((IRecoveryServicesBackupClient)operations).BeginMoveRecoveryPointAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); + } + /// + /// Move recovery point from one datastore to another store. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginMoveRecoveryPointAsync(this IRecoveryServicesBackupClient operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, MoveRPAcrossTiersRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginMoveRecoveryPointWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxiesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxiesOperations.cs index 8bb17fd88505..e25f36316145 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxiesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxiesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ResourceGuardProxiesOperations operations. /// - internal partial class ResourceGuardProxiesOperations : IServiceOperations, IResourceGuardProxiesOperations + internal partial class ResourceGuardProxiesOperations : Microsoft.Rest.IServiceOperations, IResourceGuardProxiesOperations { /// /// Initializes a new instance of the ResourceGuardProxiesOperations class. @@ -36,13 +24,13 @@ internal partial class ResourceGuardProxiesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) + internal ResourceGuardProxiesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Headers that will be added to request. @@ -66,13 +53,13 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -81,71 +68,82 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -157,55 +155,56 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -215,9 +214,10 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -228,25 +228,29 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// List the ResourceGuardProxies under vault /// @@ -259,13 +263,13 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -274,51 +278,54 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> GetNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> GetNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -330,55 +337,56 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -388,9 +396,10 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -401,24 +410,28 @@ internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxiesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxiesOperationsExtensions.cs index e33c2d6caa5c..207444e1c061 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxiesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxiesOperationsExtensions.cs @@ -1,101 +1,88 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ResourceGuardProxiesOperations. + /// Extension methods for ResourceGuardProxiesOperations /// public static partial class ResourceGuardProxiesOperationsExtensions { - /// - /// List the ResourceGuardProxies under vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - public static IPage Get(this IResourceGuardProxiesOperations operations, string vaultName, string resourceGroupName) - { - return operations.GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); - } + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static Microsoft.Rest.Azure.IPage Get(this IResourceGuardProxiesOperations operations, string vaultName, string resourceGroupName) + { + return ((IResourceGuardProxiesOperations)operations).GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); + } - /// - /// List the ResourceGuardProxies under vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// The cancellation token. - /// - public static async Task> GetAsync(this IResourceGuardProxiesOperations operations, string vaultName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> GetAsync(this IResourceGuardProxiesOperations operations, string vaultName, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage GetNext(this IResourceGuardProxiesOperations operations, string nextPageLink) + { + return ((IResourceGuardProxiesOperations)operations).GetNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// List the ResourceGuardProxies under vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetNext(this IResourceGuardProxiesOperations operations, string nextPageLink) + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> GetNextAsync(this IResourceGuardProxiesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// List the ResourceGuardProxies under vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetNextAsync(this IResourceGuardProxiesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxyOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxyOperations.cs index e2db6fb894f8..0b00b952e8dc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxyOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxyOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ResourceGuardProxyOperations operations. /// - internal partial class ResourceGuardProxyOperations : IServiceOperations, IResourceGuardProxyOperations + internal partial class ResourceGuardProxyOperations : Microsoft.Rest.IServiceOperations, IResourceGuardProxyOperations { /// /// Initializes a new instance of the ResourceGuardProxyOperations class. @@ -36,13 +24,13 @@ internal partial class ResourceGuardProxyOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) + internal ResourceGuardProxyOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,17 +39,16 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Returns ResourceGuardProxy under vault and with the name referenced in - /// request + /// Returns ResourceGuardProxy under vault and with the name referenced in request /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// Headers that will be added to request. @@ -69,13 +56,13 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -84,77 +71,89 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGuardProxyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGuardProxyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGuardProxyName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceGuardProxyName", resourceGuardProxyName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGuardProxyName}", System.Uri.EscapeDataString(resourceGuardProxyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -166,55 +165,56 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -224,9 +224,10 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -237,25 +238,29 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Add or Update ResourceGuardProxy under vault /// Secures vault critical operations @@ -264,10 +269,10 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// Request body for operation @@ -278,13 +283,13 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -293,82 +298,95 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, ResourceGuardProxyBaseResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, ResourceGuardProxyBaseResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGuardProxyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGuardProxyName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGuardProxyName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceGuardProxyName", resourceGuardProxyName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Put", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Put", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGuardProxyName}", System.Uri.EscapeDataString(resourceGuardProxyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -380,61 +398,62 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -444,9 +463,10 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -457,25 +477,29 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Delete ResourceGuardProxy under vault /// @@ -483,10 +507,10 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// /// Headers that will be added to request. @@ -494,10 +518,10 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -506,77 +530,89 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGuardProxyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGuardProxyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGuardProxyName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceGuardProxyName", resourceGuardProxyName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGuardProxyName}", System.Uri.EscapeDataString(resourceGuardProxyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -588,55 +624,56 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -646,20 +683,25 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Secures delete ResourceGuardProxy operations. /// @@ -667,14 +709,16 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// + /// /// /// + /// /// /// + /// /// /// /// Headers that will be added to request. @@ -682,13 +726,13 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -697,84 +741,96 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UnlockDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, IList resourceGuardOperationRequests = default(IList), string resourceToBeDeleted = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UnlockDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string resourceToBeDeleted = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (resourceGuardProxyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGuardProxyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGuardProxyName"); } + UnlockDeleteRequest parameters = new UnlockDeleteRequest(); - if (resourceGuardOperationRequests != null || resourceToBeDeleted != null) + if(resourceGuardOperationRequests != null||resourceToBeDeleted != null) { parameters.ResourceGuardOperationRequests = resourceGuardOperationRequests; parameters.ResourceToBeDeleted = resourceToBeDeleted; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceGuardProxyName", resourceGuardProxyName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UnlockDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "UnlockDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGuardProxyName}", System.Uri.EscapeDataString(resourceGuardProxyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -786,61 +842,62 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -850,9 +907,10 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -863,24 +921,28 @@ internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxyOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxyOperationsExtensions.cs index b7b0734eb0fb..2782dd155f54 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxyOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ResourceGuardProxyOperationsExtensions.cs @@ -1,226 +1,195 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ResourceGuardProxyOperations. + /// Extension methods for ResourceGuardProxyOperations /// public static partial class ResourceGuardProxyOperationsExtensions { - /// - /// Returns ResourceGuardProxy under vault and with the name referenced in - /// request - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - public static ResourceGuardProxyBaseResource Get(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName) - { - return operations.GetAsync(vaultName, resourceGroupName, resourceGuardProxyName).GetAwaiter().GetResult(); - } - - /// - /// Returns ResourceGuardProxy under vault and with the name referenced in - /// request - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Returns ResourceGuardProxy under vault and with the name referenced in request + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + public static ResourceGuardProxyBaseResource Get(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName) + { + return ((IResourceGuardProxyOperations)operations).GetAsync(vaultName, resourceGroupName, resourceGuardProxyName).GetAwaiter().GetResult(); + } - /// - /// Add or Update ResourceGuardProxy under vault - /// Secures vault critical operations - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// Request body for operation - /// - public static ResourceGuardProxyBaseResource Put(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, ResourceGuardProxyBaseResource parameters) + /// + /// Returns ResourceGuardProxy under vault and with the name referenced in request + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, null, cancellationToken).ConfigureAwait(false)) { - return operations.PutAsync(vaultName, resourceGroupName, resourceGuardProxyName, parameters).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Add or Update ResourceGuardProxy under vault + /// Secures vault critical operations + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + public static ResourceGuardProxyBaseResource Put(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, ResourceGuardProxyBaseResource parameters) + { + return ((IResourceGuardProxyOperations)operations).PutAsync(vaultName, resourceGroupName, resourceGuardProxyName, parameters).GetAwaiter().GetResult(); + } - /// - /// Add or Update ResourceGuardProxy under vault - /// Secures vault critical operations - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// Request body for operation - /// - /// - /// The cancellation token. - /// - public static async Task PutAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, ResourceGuardProxyBaseResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Add or Update ResourceGuardProxy under vault + /// Secures vault critical operations + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PutAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, ResourceGuardProxyBaseResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PutWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.PutWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Delete ResourceGuardProxy under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + public static void Delete(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName) + { + ((IResourceGuardProxyOperations)operations).DeleteAsync(vaultName, resourceGroupName, resourceGuardProxyName).GetAwaiter().GetResult(); + } - /// - /// Delete ResourceGuardProxy under vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - public static void Delete(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName) - { - operations.DeleteAsync(vaultName, resourceGroupName, resourceGuardProxyName).GetAwaiter().GetResult(); - } + /// + /// Delete ResourceGuardProxy under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Secures delete ResourceGuardProxy operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + public static UnlockDeleteResponse UnlockDelete(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string resourceToBeDeleted = default(string)) + { + return ((IResourceGuardProxyOperations)operations).UnlockDeleteAsync(vaultName, resourceGroupName, resourceGuardProxyName, resourceGuardOperationRequests, resourceToBeDeleted).GetAwaiter().GetResult(); + } - /// - /// Delete ResourceGuardProxy under vault - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Secures delete ResourceGuardProxy operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UnlockDeleteAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), string resourceToBeDeleted = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UnlockDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, resourceGuardOperationRequests, resourceToBeDeleted, null, cancellationToken).ConfigureAwait(false)) { - (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } - - /// - /// Secures delete ResourceGuardProxy operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// - /// - /// - public static UnlockDeleteResponse UnlockDelete(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, IList resourceGuardOperationRequests = default(IList), string resourceToBeDeleted = default(string)) - { - return operations.UnlockDeleteAsync(vaultName, resourceGroupName, resourceGuardProxyName, resourceGuardOperationRequests, resourceToBeDeleted).GetAwaiter().GetResult(); - } - - /// - /// Secures delete ResourceGuardProxy operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task UnlockDeleteAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, IList resourceGuardOperationRequests = default(IList), string resourceToBeDeleted = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UnlockDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, resourceGuardOperationRequests, resourceToBeDeleted, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RestoresOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RestoresOperations.cs index 58cede79686d..193d70a62982 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RestoresOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RestoresOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// RestoresOperations operations. /// - internal partial class RestoresOperations : IServiceOperations, IRestoresOperations + internal partial class RestoresOperations : Microsoft.Rest.IServiceOperations, IRestoresOperations { /// /// Initializes a new instance of the RestoresOperations class. @@ -36,13 +24,13 @@ internal partial class RestoresOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal RestoresOperations(RecoveryServicesBackupClient client) + internal RestoresOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,16 +39,14 @@ internal RestoresOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Restores the specified backed up data. This is an asynchronous operation. - /// To know the status of this API call, use + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use /// GetProtectedItemOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up items. @@ -78,29 +64,27 @@ internal RestoresOperations(RecoveryServicesBackupClient client) /// resource restore request /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginTriggerWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginTriggerWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Restores the specified backed up data. This is an asynchronous operation. - /// To know the status of this API call, use + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use /// GetProtectedItemOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// Fabric name associated with the backed up items. @@ -123,10 +107,10 @@ internal RestoresOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -135,100 +119,116 @@ internal RestoresOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginTriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginTriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (containerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "containerName"); } + if (protectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectedItemName"); } + if (recoveryPointId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPointId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("containerName", containerName); tracingParameters.Add("protectedItemName", protectedItemName); tracingParameters.Add("recoveryPointId", recoveryPointId); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginTrigger", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTrigger", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName)); _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName)); _url = _url.Replace("{recoveryPointId}", System.Uri.EscapeDataString(recoveryPointId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -240,61 +240,62 @@ internal RestoresOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -304,19 +305,24 @@ internal RestoresOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RestoresOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RestoresOperationsExtensions.cs index 92aa7b04f5c6..35e63474d0a7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RestoresOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/RestoresOperationsExtensions.cs @@ -1,171 +1,140 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for RestoresOperations. + /// Extension methods for RestoresOperations /// public static partial class RestoresOperationsExtensions { - /// - /// Restores the specified backed up data. This is an asynchronous operation. - /// To know the status of this API call, use - /// GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up items. - /// - /// - /// Container name associated with the backed up items. - /// - /// - /// Backed up item to be restored. - /// - /// - /// Recovery point ID which represents the backed up data to be restored. - /// - /// - /// resource restore request - /// - public static void Trigger(this IRestoresOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters) - { - operations.TriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); - } - - /// - /// Restores the specified backed up data. This is an asynchronous operation. - /// To know the status of this API call, use - /// GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up items. - /// - /// - /// Container name associated with the backed up items. - /// - /// - /// Backed up item to be restored. - /// - /// - /// Recovery point ID which represents the backed up data to be restored. - /// - /// - /// resource restore request - /// - /// - /// The cancellation token. - /// - public static async Task TriggerAsync(this IRestoresOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.TriggerWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores the specified backed up data. This is an asynchronous operation. - /// To know the status of this API call, use - /// GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up items. - /// - /// - /// Container name associated with the backed up items. - /// - /// - /// Backed up item to be restored. - /// - /// - /// Recovery point ID which represents the backed up data to be restored. - /// - /// - /// resource restore request - /// - public static void BeginTrigger(this IRestoresOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters) - { - operations.BeginTriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); - } + /// + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use + /// GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up items. + /// + /// + /// Container name associated with the backed up items. + /// + /// + /// Backed up item to be restored. + /// + /// + /// Recovery point ID which represents the backed up data to be restored. + /// + public static void Trigger(this IRestoresOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters) + { + ((IRestoresOperations)operations).TriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); + } - /// - /// Restores the specified backed up data. This is an asynchronous operation. - /// To know the status of this API call, use - /// GetProtectedItemOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// Fabric name associated with the backed up items. - /// - /// - /// Container name associated with the backed up items. - /// - /// - /// Backed up item to be restored. - /// - /// - /// Recovery point ID which represents the backed up data to be restored. - /// - /// - /// resource restore request - /// - /// - /// The cancellation token. - /// - public static async Task BeginTriggerAsync(this IRestoresOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginTriggerWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use + /// GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up items. + /// + /// + /// Container name associated with the backed up items. + /// + /// + /// Backed up item to be restored. + /// + /// + /// Recovery point ID which represents the backed up data to be restored. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TriggerAsync(this IRestoresOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.TriggerWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use + /// GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up items. + /// + /// + /// Container name associated with the backed up items. + /// + /// + /// Backed up item to be restored. + /// + /// + /// Recovery point ID which represents the backed up data to be restored. + /// + public static void BeginTrigger(this IRestoresOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters) + { + ((IRestoresOperations)operations).BeginTriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).GetAwaiter().GetResult(); + } + /// + /// Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, use + /// GetProtectedItemOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// Fabric name associated with the backed up items. + /// + /// + /// Container name associated with the backed up items. + /// + /// + /// Backed up item to be restored. + /// + /// + /// Recovery point ID which represents the backed up data to be restored. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginTriggerAsync(this IRestoresOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, RestoreRequestResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginTriggerWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SdkInfo_RecoveryServicesBackupClient.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SdkInfo_RecoveryServicesBackupClient.cs deleted file mode 100644 index deb482f3f77e..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SdkInfo_RecoveryServicesBackupClient.cs +++ /dev/null @@ -1,79 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.RecoveryServices.Backup -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_RecoveryServicesBackupClient - { - get - { - return new Tuple[] - { - new Tuple("RecoveryServices", "BMSPrepareDataMove", "2023-01-01"), - new Tuple("RecoveryServices", "BMSPrepareDataMoveOperationResult", "2023-01-01"), - new Tuple("RecoveryServices", "BMSTriggerDataMove", "2023-01-01"), - new Tuple("RecoveryServices", "BackupEngines", "2023-01-01"), - new Tuple("RecoveryServices", "BackupJobs", "2023-01-01"), - new Tuple("RecoveryServices", "BackupOperationResults", "2023-01-01"), - new Tuple("RecoveryServices", "BackupOperationStatuses", "2023-01-01"), - new Tuple("RecoveryServices", "BackupPolicies", "2023-01-01"), - new Tuple("RecoveryServices", "BackupProtectableItems", "2023-01-01"), - new Tuple("RecoveryServices", "BackupProtectedItems", "2023-01-01"), - new Tuple("RecoveryServices", "BackupProtectionContainers", "2023-01-01"), - new Tuple("RecoveryServices", "BackupProtectionIntent", "2023-01-01"), - new Tuple("RecoveryServices", "BackupResourceEncryptionConfigs", "2023-01-01"), - new Tuple("RecoveryServices", "BackupResourceStorageConfigsNonCRR", "2023-01-01"), - new Tuple("RecoveryServices", "BackupResourceVaultConfigs", "2023-01-01"), - new Tuple("RecoveryServices", "BackupStatus", "2023-01-01"), - new Tuple("RecoveryServices", "BackupUsageSummaries", "2023-01-01"), - new Tuple("RecoveryServices", "BackupWorkloadItems", "2023-01-01"), - new Tuple("RecoveryServices", "Backups", "2023-01-01"), - new Tuple("RecoveryServices", "DeletedProtectionContainers", "2023-01-01"), - new Tuple("RecoveryServices", "ExportJobsOperationResults", "2023-01-01"), - new Tuple("RecoveryServices", "FeatureSupport", "2023-01-01"), - new Tuple("RecoveryServices", "GetOperationStatus", "2023-01-01"), - new Tuple("RecoveryServices", "ItemLevelRecoveryConnections", "2023-01-01"), - new Tuple("RecoveryServices", "JobCancellations", "2023-01-01"), - new Tuple("RecoveryServices", "JobDetails", "2023-01-01"), - new Tuple("RecoveryServices", "JobOperationResults", "2023-01-01"), - new Tuple("RecoveryServices", "Jobs", "2023-01-01"), - new Tuple("RecoveryServices", "MoveRecoveryPoint", "2023-01-01"), - new Tuple("RecoveryServices", "Operation", "2023-01-01"), - new Tuple("RecoveryServices", "Operations", "2023-01-01"), - new Tuple("RecoveryServices", "PrivateEndpoint", "2023-01-01"), - new Tuple("RecoveryServices", "PrivateEndpointConnection", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectableContainers", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectedItemOperationResults", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectedItemOperationStatuses", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectedItems", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectionContainerOperationResults", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectionContainerRefreshOperationResults", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectionContainers", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectionIntent", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectionPolicies", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectionPolicyOperationResults", "2023-01-01"), - new Tuple("RecoveryServices", "ProtectionPolicyOperationStatuses", "2023-01-01"), - new Tuple("RecoveryServices", "RecoveryPoints", "2023-01-01"), - new Tuple("RecoveryServices", "RecoveryPointsRecommendedForMove", "2023-01-01"), - new Tuple("RecoveryServices", "ResourceGuardProxies", "2023-01-01"), - new Tuple("RecoveryServices", "ResourceGuardProxy", "2023-01-01"), - new Tuple("RecoveryServices", "Restores", "2023-01-01"), - new Tuple("RecoveryServices", "SecurityPINs", "2023-01-01"), - new Tuple("RecoveryServices", "ValidateOperation", "2023-01-01"), - new Tuple("RecoveryServices", "ValidateOperationResults", "2023-01-01"), - new Tuple("RecoveryServices", "ValidateOperationStatuses", "2023-01-01"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SecurityPINsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SecurityPINsOperations.cs index c582fd1219e2..7d828549f276 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SecurityPINsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SecurityPINsOperations.cs @@ -1,34 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// - /// SecurityPINsOperations operations. + /// SecurityPiNsOperations operations. /// - internal partial class SecurityPINsOperations : IServiceOperations, ISecurityPINsOperations + internal partial class SecurityPiNsOperations : Microsoft.Rest.IServiceOperations, ISecurityPiNsOperations { /// - /// Initializes a new instance of the SecurityPINsOperations class. + /// Initializes a new instance of the SecurityPiNsOperations class. /// /// /// Reference to the service client. @@ -36,13 +24,13 @@ internal partial class SecurityPINsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal SecurityPINsOperations(RecoveryServicesBackupClient client) + internal SecurityPiNsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,8 +45,7 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// ResourceGuard Operation Requests @@ -69,13 +56,13 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -84,78 +71,88 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, IList resourceGuardOperationRequests = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - SecurityPinBase parameters = default(SecurityPinBase); - if (resourceGuardOperationRequests != null) + + SecurityPinBase parameters = new SecurityPinBase(); + if(resourceGuardOperationRequests != null) { - parameters = new SecurityPinBase(); parameters.ResourceGuardOperationRequests = resourceGuardOperationRequests; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -167,61 +164,62 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -231,9 +229,10 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -244,24 +243,28 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SecurityPINsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SecurityPINsOperationsExtensions.cs index edc950ce58ae..cee5f3f47fcf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SecurityPINsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/SecurityPINsOperationsExtensions.cs @@ -1,75 +1,55 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for SecurityPINsOperations. + /// Extension methods for SecurityPiNsOperations /// - public static partial class SecurityPINsOperationsExtensions + public static partial class SecurityPiNsOperationsExtensions { - /// - /// Get the security PIN. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// ResourceGuard Operation Requests - /// - public static TokenInformation Get(this ISecurityPINsOperations operations, string vaultName, string resourceGroupName, IList resourceGuardOperationRequests = default(IList)) - { - return operations.GetAsync(vaultName, resourceGroupName, resourceGuardOperationRequests).GetAwaiter().GetResult(); - } + /// + /// Get the security PIN. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static TokenInformation Get(this ISecurityPiNsOperations operations, string vaultName, string resourceGroupName, System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList)) + { + return ((ISecurityPiNsOperations)operations).GetAsync(vaultName, resourceGroupName, resourceGuardOperationRequests).GetAwaiter().GetResult(); + } - /// - /// Get the security PIN. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// ResourceGuard Operation Requests - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ISecurityPINsOperations operations, string vaultName, string resourceGroupName, IList resourceGuardOperationRequests = default(IList), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Get the security PIN. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this ISecurityPiNsOperations operations, string vaultName, string resourceGroupName, System.Collections.Generic.IList resourceGuardOperationRequests = default(System.Collections.Generic.IList), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardOperationRequests, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardOperationRequests, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationOperations.cs index 3e0eac628c61..a3ebb79ed9ca 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ValidateOperationOperations operations. /// - internal partial class ValidateOperationOperations : IServiceOperations, IValidateOperationOperations + internal partial class ValidateOperationOperations : Microsoft.Rest.IServiceOperations, IValidateOperationOperations { /// /// Initializes a new instance of the ValidateOperationOperations class. @@ -36,13 +24,13 @@ internal partial class ValidateOperationOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ValidateOperationOperations(RecoveryServicesBackupClient client) + internal ValidateOperationOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,44 +39,38 @@ internal ValidateOperationOperations(RecoveryServicesBackupClient client) public RecoveryServicesBackupClient Client { get; private set; } /// - /// Validate operation for specified backed up item in the form of an - /// asynchronous operation. Returns tracking headers which can be tracked using - /// GetValidateOperationResult API. + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource validate operation request /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task TriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginTriggerWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginTriggerWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Validate operation for specified backed up item in the form of an - /// asynchronous operation. Returns tracking headers which can be tracked using - /// GetValidateOperationResult API. + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// resource validate operation request @@ -99,10 +81,10 @@ internal ValidateOperationOperations(RecoveryServicesBackupClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -111,76 +93,88 @@ internal ValidateOperationOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginTriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginTriggerWithHttpMessagesAsync(string vaultName, string resourceGroupName, ValidateOperationRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (vaultName == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (resourceGroupName == null) + + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.SubscriptionId == null) + + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (parameters == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginTrigger", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTrigger", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -192,61 +186,62 @@ internal ValidateOperationOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -256,19 +251,24 @@ internal ValidateOperationOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationOperationsExtensions.cs index 5e856dfdc011..962cfcb21027 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationOperationsExtensions.cs @@ -1,123 +1,88 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ValidateOperationOperations. + /// Extension methods for ValidateOperationOperations /// public static partial class ValidateOperationOperationsExtensions { - /// - /// Validate operation for specified backed up item in the form of an - /// asynchronous operation. Returns tracking headers which can be tracked using - /// GetValidateOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource validate operation request - /// - public static void Trigger(this IValidateOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters) - { - operations.TriggerAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Validate operation for specified backed up item in the form of an - /// asynchronous operation. Returns tracking headers which can be tracked using - /// GetValidateOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource validate operation request - /// - /// - /// The cancellation token. - /// - public static async Task TriggerAsync(this IValidateOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.TriggerWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validate operation for specified backed up item in the form of an - /// asynchronous operation. Returns tracking headers which can be tracked using - /// GetValidateOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource validate operation request - /// - public static void BeginTrigger(this IValidateOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters) - { - operations.BeginTriggerAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); - } + /// + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void Trigger(this IValidateOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters) + { + ((IValidateOperationOperations)operations).TriggerAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } - /// - /// Validate operation for specified backed up item in the form of an - /// asynchronous operation. Returns tracking headers which can be tracked using - /// GetValidateOperationResult API. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// resource validate operation request - /// - /// - /// The cancellation token. - /// - public static async Task BeginTriggerAsync(this IValidateOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginTriggerWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TriggerAsync(this IValidateOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.TriggerWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + public static void BeginTrigger(this IValidateOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters) + { + ((IValidateOperationOperations)operations).BeginTriggerAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + /// + /// Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers which can be tracked using GetValidateOperationResult API. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginTriggerAsync(this IValidateOperationOperations operations, string vaultName, string resourceGroupName, ValidateOperationRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginTriggerWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationResultsOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationResultsOperations.cs index afe3c735c98a..e150736ae9ba 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ValidateOperationResultsOperations operations. /// - internal partial class ValidateOperationResultsOperations : IServiceOperations, IValidateOperationResultsOperations + internal partial class ValidateOperationResultsOperations : Microsoft.Rest.IServiceOperations, IValidateOperationResultsOperations { /// /// Initializes a new instance of the ValidateOperationResultsOperations class. @@ -36,13 +24,13 @@ internal partial class ValidateOperationResultsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ValidateOperationResultsOperations(RecoveryServicesBackupClient client) + internal ValidateOperationResultsOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -57,12 +45,10 @@ internal ValidateOperationResultsOperations(RecoveryServicesBackupClient client) /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// - /// OperationID which represents the operation whose result needs to be - /// fetched. + /// OperationID which represents the operation whose result needs to be fetched. /// /// /// Headers that will be added to request. @@ -70,13 +56,13 @@ internal ValidateOperationResultsOperations(RecoveryServicesBackupClient client) /// /// 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 /// /// @@ -85,77 +71,89 @@ internal ValidateOperationResultsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationResults/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -167,55 +165,56 @@ internal ValidateOperationResultsOperations(RecoveryServicesBackupClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -225,9 +224,10 @@ internal ValidateOperationResultsOperations(RecoveryServicesBackupClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -238,24 +238,28 @@ internal ValidateOperationResultsOperations(RecoveryServicesBackupClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationResultsOperationsExtensions.cs index 68101acce37b..5795ca20a7fe 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationResultsOperationsExtensions.cs @@ -1,75 +1,61 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ValidateOperationResultsOperations. + /// Extension methods for ValidateOperationResultsOperations /// public static partial class ValidateOperationResultsOperationsExtensions { - /// - /// Fetches the result of a triggered validate operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID which represents the operation whose result needs to be - /// fetched. - /// - public static ValidateOperationsResponse Get(this IValidateOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); - } + /// + /// Fetches the result of a triggered validate operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID which represents the operation whose result needs to be fetched. + /// + public static ValidateOperationsResponse Get(this IValidateOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId) + { + return ((IValidateOperationResultsOperations)operations).GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); + } - /// - /// Fetches the result of a triggered validate operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID which represents the operation whose result needs to be - /// fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IValidateOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the result of a triggered validate operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID which represents the operation whose result needs to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IValidateOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationStatusesOperations.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationStatusesOperations.cs index 2266d550b4a1..2369a9ba1913 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationStatusesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationStatusesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { + using System.Linq; 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; /// /// ValidateOperationStatusesOperations operations. /// - internal partial class ValidateOperationStatusesOperations : IServiceOperations, IValidateOperationStatusesOperations + internal partial class ValidateOperationStatusesOperations : Microsoft.Rest.IServiceOperations, IValidateOperationStatusesOperations { /// /// Initializes a new instance of the ValidateOperationStatusesOperations class. @@ -36,13 +24,13 @@ internal partial class ValidateOperationStatusesOperations : IServiceOperations< /// /// Thrown when a required parameter is null /// - internal ValidateOperationStatusesOperations(RecoveryServicesBackupClient client) + internal ValidateOperationStatusesOperations (RecoveryServicesBackupClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,19 +39,15 @@ internal ValidateOperationStatusesOperations(RecoveryServicesBackupClient client public RecoveryServicesBackupClient Client { get; private set; } /// - /// Fetches the status of a triggered validate operation. The status can be in - /// progress, completed - /// or failed. You can refer to the OperationStatus enum for all the possible - /// states of the operation. - /// If operation has completed, this method returns the list of errors obtained - /// while validating the operation. + /// Fetches the status of a triggered validate operation. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. + /// If operation has completed, this method returns the list of errors obtained while validating the operation. /// /// /// The name of the recovery services vault. /// /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The name of the resource group where the recovery services vault is present. /// /// /// OperationID represents the operation whose status needs to be fetched. @@ -74,13 +58,13 @@ internal ValidateOperationStatusesOperations(RecoveryServicesBackupClient client /// /// 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 /// /// @@ -89,77 +73,89 @@ internal ValidateOperationStatusesOperations(RecoveryServicesBackupClient client /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationsStatuses/{operationId}").ToString(); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -171,55 +167,56 @@ internal ValidateOperationStatusesOperations(RecoveryServicesBackupClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -229,9 +226,10 @@ internal ValidateOperationStatusesOperations(RecoveryServicesBackupClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -242,24 +240,28 @@ internal ValidateOperationStatusesOperations(RecoveryServicesBackupClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationStatusesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationStatusesOperationsExtensions.cs index 0b87a6dc00e6..585dd3064471 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationStatusesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/Generated/ValidateOperationStatusesOperationsExtensions.cs @@ -1,83 +1,65 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Backup { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ValidateOperationStatusesOperations. + /// Extension methods for ValidateOperationStatusesOperations /// public static partial class ValidateOperationStatusesOperationsExtensions { - /// - /// Fetches the status of a triggered validate operation. The status can be in - /// progress, completed - /// or failed. You can refer to the OperationStatus enum for all the possible - /// states of the operation. - /// If operation has completed, this method returns the list of errors obtained - /// while validating the operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID represents the operation whose status needs to be fetched. - /// - public static OperationStatus Get(this IValidateOperationStatusesOperations operations, string vaultName, string resourceGroupName, string operationId) - { - return operations.GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); - } + /// + /// Fetches the status of a triggered validate operation. The status can be in progress, completed + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. + /// If operation has completed, this method returns the list of errors obtained while validating the operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID represents the operation whose status needs to be fetched. + /// + public static OperationStatus Get(this IValidateOperationStatusesOperations operations, string vaultName, string resourceGroupName, string operationId) + { + return ((IValidateOperationStatusesOperations)operations).GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); + } - /// - /// Fetches the status of a triggered validate operation. The status can be in - /// progress, completed - /// or failed. You can refer to the OperationStatus enum for all the possible - /// states of the operation. - /// If operation has completed, this method returns the list of errors obtained - /// while validating the operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The name of the resource group where the recovery services vault is - /// present. - /// - /// - /// OperationID represents the operation whose status needs to be fetched. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IValidateOperationStatusesOperations operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the status of a triggered validate operation. The status can be in progress, complete + /// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. + /// If operation has completed, this method returns the list of errors obtained while validating the operation. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is present. + /// + /// + /// OperationID represents the operation whose status needs to be fetched. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IValidateOperationStatusesOperations operations, string vaultName, string resourceGroupName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/README.md b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/README.md index e013fd07edf3..3379ede3fcd5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/README.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Management.Sdk/README.md @@ -5,14 +5,14 @@ This directory contains management plane service clients of Az.RecoveryServices In this directory, run AutoRest: ``` autorest --reset -autorest --use:@microsoft.azure/autorest.csharp@2.3.90 -autorest.cmd README.md --version=v2 +autorest --use:@autorest/powershell@4.x ``` ### AutoRest Configuration > see https://aka.ms/autorest ``` yaml -csharp: true +isSdkGenerator: true +powershell: true clear-output-folder: true reflect-api-versions: true openapi-type: arm @@ -21,7 +21,6 @@ license-header: MICROSOFT_MIT_NO_VERSION payload-flattening-threshold: 2 ``` - ### ``` yaml commit: 0e20dd2e4e2a40e83840c30cce2efc4847fd9cb9 diff --git a/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmModels/AzureVmItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmModels/AzureVmItem.cs index d2291e66e35b..8c0ef33d729e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmModels/AzureVmItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmModels/AzureVmItem.cs @@ -56,7 +56,7 @@ public AzureVmItem(ProtectedItemResource protectedItemResource, DeleteState = EnumUtils.GetEnum("NotDeleted"); if (protectedItem.IsScheduledForDeferredDelete.HasValue) { - DateOfPurge = protectedItem.DeferredDeleteTimeInUTC.Value.AddDays(14); + DateOfPurge = protectedItem.DeferredDeleteTimeInUtc.Value.AddDays(14); DeleteState = EnumUtils.GetEnum("ToBeDeleted"); } @@ -93,7 +93,7 @@ public AzureVmItem(CrrModel.ProtectedItemResource protectedItemResource, DeleteState = EnumUtils.GetEnum("NotDeleted"); if (protectedItem.IsScheduledForDeferredDelete.HasValue) { - DateOfPurge = protectedItem.DeferredDeleteTimeInUTC.Value.AddDays(14); + DateOfPurge = protectedItem.DeferredDeleteTimeInUtc.Value.AddDays(14); DeleteState = EnumUtils.GetEnum("ToBeDeleted"); } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureWorkloadSAPHanaDatabaseProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureWorkloadSAPHanaDatabaseProtectedItem.cs index 9f5cb6b99135..3b01aa9cd069 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureWorkloadSAPHanaDatabaseProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureWorkloadSAPHanaDatabaseProtectedItem.cs @@ -87,7 +87,7 @@ public AzureWorkloadSAPHanaDatabaseProtectedItem(ProtectedItemResource protected DeleteState = EnumUtils.GetEnum("NotDeleted"); if (protectedItem.IsScheduledForDeferredDelete.HasValue) { - DateOfPurge = protectedItem.DeferredDeleteTimeInUTC.Value.AddDays(14); + DateOfPurge = protectedItem.DeferredDeleteTimeInUtc.Value.AddDays(14); DeleteState = EnumUtils.GetEnum("ToBeDeleted"); } } @@ -126,7 +126,7 @@ public AzureWorkloadSAPHanaDatabaseProtectedItem(CrrModel.ProtectedItemResource DeleteState = EnumUtils.GetEnum("NotDeleted"); if (protectedItem.IsScheduledForDeferredDelete.HasValue) { - DateOfPurge = protectedItem.DeferredDeleteTimeInUTC.Value.AddDays(14); + DateOfPurge = protectedItem.DeferredDeleteTimeInUtc.Value.AddDays(14); DeleteState = EnumUtils.GetEnum("ToBeDeleted"); } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureWorkloadSQLDatabaseProtectedItem.cs b/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureWorkloadSQLDatabaseProtectedItem.cs index d6e617c618b9..672cba2faa66 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureWorkloadSQLDatabaseProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Models/AzureVmWorkloadModels/AzureWorkloadSQLDatabaseProtectedItem.cs @@ -87,7 +87,7 @@ public AzureWorkloadSQLDatabaseProtectedItem(ProtectedItemResource protectedItem DeleteState = EnumUtils.GetEnum("NotDeleted"); if (protectedItem.IsScheduledForDeferredDelete.HasValue) { - DateOfPurge = protectedItem.DeferredDeleteTimeInUTC.Value.AddDays(14); + DateOfPurge = protectedItem.DeferredDeleteTimeInUtc.Value.AddDays(14); DeleteState = EnumUtils.GetEnum("ToBeDeleted"); } } @@ -125,7 +125,7 @@ public AzureWorkloadSQLDatabaseProtectedItem(CrrModel.ProtectedItemResource prot DeleteState = EnumUtils.GetEnum("NotDeleted"); if (protectedItem.IsScheduledForDeferredDelete.HasValue) { - DateOfPurge = protectedItem.DeferredDeleteTimeInUTC.Value.AddDays(14); + DateOfPurge = protectedItem.DeferredDeleteTimeInUtc.Value.AddDays(14); DeleteState = EnumUtils.GetEnum("ToBeDeleted"); } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Providers/AzureWorkloadProviderHelper.cs b/src/RecoveryServices/RecoveryServices.Backup.Providers/AzureWorkloadProviderHelper.cs index db513adc4f32..b234539bc77a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Providers/AzureWorkloadProviderHelper.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Providers/AzureWorkloadProviderHelper.cs @@ -739,7 +739,7 @@ public List ListRecoveryPoints(Dictionary Provi var queryFilterString = "null"; if (string.Compare(restorePointQueryType, "All") == 0) { - queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject() + queryFilterString = QueryBuilder.Instance.GetQueryString(new BmsrpQueryObject() { StartDate = startDate, EndDate = endDate, @@ -747,7 +747,7 @@ public List ListRecoveryPoints(Dictionary Provi } else { - queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject() + queryFilterString = QueryBuilder.Instance.GetQueryString(new BmsrpQueryObject() { StartDate = startDate, EndDate = endDate, @@ -759,7 +759,7 @@ public List ListRecoveryPoints(Dictionary Provi List recoveryPointList; if (secondaryRegion) { - ODataQuery queryFilter = new ODataQuery(); + ODataQuery queryFilter = new ODataQuery(); queryFilter.Filter = queryFilterString; //fetch recovery points from secondary region @@ -775,7 +775,7 @@ public List ListRecoveryPoints(Dictionary Provi } else { - ODataQuery queryFilter = new ODataQuery(); + ODataQuery queryFilter = new ODataQuery(); queryFilter.Filter = queryFilterString; List rpListResponse; @@ -832,7 +832,7 @@ public List ListLogChains(Dictionary ProviderData string protectedItemName = HelperUtils.GetProtectedItemUri(uriDict, item.Id); //we need to fetch the list of RPs - var queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject() + var queryFilterString = QueryBuilder.Instance.GetQueryString(new BmsrpQueryObject() { ExtendedInfo = true, StartDate = startDate, @@ -843,7 +843,7 @@ public List ListLogChains(Dictionary ProviderData List timeRanges = new List(); if (secondaryRegion) { - ODataQuery queryFilter = new ODataQuery(); + ODataQuery queryFilter = new ODataQuery(); queryFilter.Filter = queryFilterString; //fetch recovery points Log Chain from secondary region @@ -875,7 +875,7 @@ public List ListLogChains(Dictionary ProviderData } else { - ODataQuery queryFilter = new ODataQuery(); + ODataQuery queryFilter = new ODataQuery(); queryFilter.Filter = queryFilterString; List rpListResponse = ServiceClientAdapter.GetRecoveryPoints( diff --git a/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureFilesPsBackupProvider.cs b/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureFilesPsBackupProvider.cs index 3d1845a43d32..72be88ccaa2c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureFilesPsBackupProvider.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureFilesPsBackupProvider.cs @@ -186,7 +186,7 @@ public RestAzureNS.AzureOperationResponse TriggerBackup() AzureFileShareItem azureFileShareItem = item as AzureFileShareItem; BackupRequestResource triggerBackupRequest = new BackupRequestResource(); AzureFileShareBackupRequest azureFileShareBackupRequest = new AzureFileShareBackupRequest(); - azureFileShareBackupRequest.RecoveryPointExpiryTimeInUTC = expiryDateTime; + azureFileShareBackupRequest.RecoveryPointExpiryTimeInUtc = expiryDateTime; triggerBackupRequest.Properties = azureFileShareBackupRequest; return ServiceClientAdapter.TriggerBackup( @@ -665,7 +665,7 @@ private WorkloadProtectableItemResource GetProtectableItem(string vaultName, str string azureFileShareName, string storageAccountName) { WorkloadProtectableItemResource protectableObjectResource = null; - ODataQuery queryParam = new ODataQuery( + ODataQuery queryParam = new ODataQuery( q => q.BackupManagementType == ServiceClientModel.BackupManagementType.AzureStorage); diff --git a/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureSqlPsBackupProvider.cs b/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureSqlPsBackupProvider.cs index 5bee98cc013e..6bb4fde6a631 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureSqlPsBackupProvider.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureSqlPsBackupProvider.cs @@ -193,13 +193,13 @@ public List ListRecoveryPoints() } //we need to fetch the list of RPs - var queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject() + var queryFilterString = QueryBuilder.Instance.GetQueryString(new BmsrpQueryObject() { StartDate = startDate, EndDate = endDate }); - ODataQuery queryFilter = new ODataQuery(); + ODataQuery queryFilter = new ODataQuery(); queryFilter.Filter = queryFilterString; List rpListResponse = ServiceClientAdapter.GetRecoveryPoints( diff --git a/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureWorkloadPsBackupProvider.cs b/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureWorkloadPsBackupProvider.cs index 071186565e56..967fec5b46bc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureWorkloadPsBackupProvider.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/AzureWorkloadPsBackupProvider.cs @@ -468,7 +468,7 @@ public RestAzureNS.AzureOperationResponse TriggerBackup() AzureWorkloadSQLDatabaseProtectedItem azureWorkloadProtectedItem = item as AzureWorkloadSQLDatabaseProtectedItem; BackupRequestResource triggerBackupRequest = new BackupRequestResource(); AzureWorkloadBackupRequest azureWorkloadBackupRequest = new AzureWorkloadBackupRequest(); - azureWorkloadBackupRequest.RecoveryPointExpiryTimeInUTC = expiryDateTime; + azureWorkloadBackupRequest.RecoveryPointExpiryTimeInUtc = expiryDateTime; azureWorkloadBackupRequest.BackupType = backupType; azureWorkloadBackupRequest.EnableCompression = enableCompression; triggerBackupRequest.Properties = azureWorkloadBackupRequest; diff --git a/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/IaasVmPsBackupProvider.cs b/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/IaasVmPsBackupProvider.cs index c74611bdb4e6..301c3b0595d9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/IaasVmPsBackupProvider.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Providers/Providers/IaasVmPsBackupProvider.cs @@ -391,7 +391,7 @@ public RestAzureNS.AzureOperationResponse TriggerBackup() AzureVmItem iaasVmItem = item as AzureVmItem; BackupRequestResource triggerBackupRequest = new BackupRequestResource(); IaasVMBackupRequest iaasVmBackupRequest = new IaasVMBackupRequest(); - iaasVmBackupRequest.RecoveryPointExpiryTimeInUTC = expiryDateTime; + iaasVmBackupRequest.RecoveryPointExpiryTimeInUtc = expiryDateTime; triggerBackupRequest.Properties = iaasVmBackupRequest; return ServiceClientAdapter.TriggerBackup( @@ -705,8 +705,8 @@ public RPMountScriptDetails ProvisionItemLevelRecoveryAccess() string containerUri = HelperUtils.GetContainerUri(uriDict, rp.Id); string protectedItemName = HelperUtils.GetProtectedItemUri(uriDict, rp.Id); - IaasVMILRRegistrationRequest registrationRequest = - new IaasVMILRRegistrationRequest(); + IaasVmilrRegistrationRequest registrationRequest = + new IaasVmilrRegistrationRequest(); registrationRequest.RecoveryPointId = rp.RecoveryPointId; registrationRequest.VirtualMachineId = rp.SourceResourceId; registrationRequest.RenewExistingRegistration = (rp.IlrSessionActive == false) ? false : true; @@ -924,8 +924,8 @@ public ProtectionPolicyResource CreatePolicy() { instantRPAdditionalDetails = new InstantRPAdditionalDetails(); - instantRPAdditionalDetails.AzureBackupRGNamePrefix = snapshotRGName; - if (snapshotRGNameSuffix != null) instantRPAdditionalDetails.AzureBackupRGNameSuffix = snapshotRGNameSuffix; + instantRPAdditionalDetails.AzureBackupRgNamePrefix = snapshotRGName; + if (snapshotRGNameSuffix != null) instantRPAdditionalDetails.AzureBackupRgNameSuffix = snapshotRGNameSuffix; } else if(snapshotRGNameSuffix != null) { @@ -945,7 +945,7 @@ public ProtectionPolicyResource CreatePolicy() PolicyType = (schedulePolicy.GetType() == typeof(CmdletModel.SimpleSchedulePolicyV2)) ? "V2" : null, TimeZone = timeZone, InstantRpRetentionRangeInDays = snapshotRetentionInDays, - InstantRPDetails = instantRPAdditionalDetails + InstantRpDetails = instantRPAdditionalDetails } }; @@ -1061,8 +1061,8 @@ public RestAzureNS.AzureOperationResponse ModifyPolicy { instantRPAdditionalDetails = new InstantRPAdditionalDetails(); - instantRPAdditionalDetails.AzureBackupRGNamePrefix = snapshotRGName; - if (snapshotRGNameSuffix != null) instantRPAdditionalDetails.AzureBackupRGNameSuffix = snapshotRGNameSuffix; + instantRPAdditionalDetails.AzureBackupRgNamePrefix = snapshotRGName; + if (snapshotRGNameSuffix != null) instantRPAdditionalDetails.AzureBackupRgNameSuffix = snapshotRGNameSuffix; } else if (snapshotRGNameSuffix != null) { @@ -1082,7 +1082,7 @@ public RestAzureNS.AzureOperationResponse ModifyPolicy TimeZone = timeZone, PolicyType = (((AzureVmPolicy)policy).SchedulePolicy.GetType() == typeof(CmdletModel.SimpleSchedulePolicyV2)) ? "V2" : null, InstantRpRetentionRangeInDays = ((AzureVmPolicy)policy).SnapshotRetentionInDays, - InstantRPDetails = (instantRPAdditionalDetails != null)? instantRPAdditionalDetails : new InstantRPAdditionalDetails( + InstantRpDetails = (instantRPAdditionalDetails != null)? instantRPAdditionalDetails : new InstantRPAdditionalDetails( ((AzureVmPolicy)policy).AzureBackupRGName, ((AzureVmPolicy)policy).AzureBackupRGNameSuffix) } @@ -1699,7 +1699,7 @@ private bool IsDiscoveryNeeded( vmVersion = (isComputeAzureVM) == true ? computeAzureVMVersion : classicComputeAzureVMVersion; string virtualMachineId = GetAzureIaasVirtualMachineId(rgName, vmVersion, vmName); - ODataQuery queryParam = new ODataQuery( + ODataQuery queryParam = new ODataQuery( q => q.BackupManagementType == ServiceClientModel.BackupManagementType.AzureIaasVM); @@ -1783,7 +1783,7 @@ private AzureVmRPMountScriptDetails GenerateILRResponseForWindowsVMs( suffix, clientScriptForConnection.ScriptExtension); return new AzureVmRPMountScriptDetails( - clientScriptForConnection.OsType, fileName, password); + clientScriptForConnection.OSType, fileName, password); } } throw new Exception( @@ -1822,7 +1822,7 @@ private AzureVmRPMountScriptDetails GenerateILRResponseForLinuxVMs( } else { - string operatingSystemName = clientScriptForConnection.OsType; + string operatingSystemName = clientScriptForConnection.OSType; string vmName = protectedItemName.Split(';')[3]; fileName = string.Format( CultureInfo.InvariantCulture, @@ -1834,7 +1834,7 @@ private AzureVmRPMountScriptDetails GenerateILRResponseForLinuxVMs( password = this.ReplacePasswordInScriptContentAndReturn(ref content); return new AzureVmRPMountScriptDetails( - clientScriptForConnection.OsType, fileName, password); + clientScriptForConnection.OSType, fileName, password); } catch (Exception e) { diff --git a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/JobAPIs.cs b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/JobAPIs.cs index b4c194c82550..91ca8218a92d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/JobAPIs.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/JobAPIs.cs @@ -79,7 +79,7 @@ CrrModel.CrrJobRequest jobRequest CrrModel.CrrJobRequest crrJobRequest = new CrrModel.CrrJobRequest(); crrJobRequest.ResourceId = vaultId; Func> listAsync = - () => CrrAdapter.Client.BackupCrrJobs.ListWithHttpMessagesAsync(azureRegion, queryFilter, resourceId: crrJobRequest.ResourceId, jobName: crrJobRequest.JobName, cancellationToken: BmsAdapter.CmdletCancellationToken).Result.Body; + () => CrrAdapter.Client.BackupCrrJobs.ListWithHttpMessagesAsync(azureRegion, crrJobRequest.ResourceId, crrJobRequest.JobName, queryFilter, cancellationToken: BmsAdapter.CmdletCancellationToken).Result.Body; Func> listNextAsync = nextLink => CrrAdapter.Client.BackupCrrJobs.ListNextWithHttpMessagesAsync( diff --git a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/OperationStatusAPIs.cs b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/OperationStatusAPIs.cs index 1adb70811025..a7a8bd048c7d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/OperationStatusAPIs.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/OperationStatusAPIs.cs @@ -159,7 +159,7 @@ public PrepareDataMoveResponse string vaultName = null, string resourceGroupName = null) { - var prepareResponseBase = BmsAdapter.Client.BMSPrepareDataMoveOperationResult.GetWithHttpMessagesAsync( + var prepareResponseBase = BmsAdapter.Client.BmsPrepareDataMoveOperationResult.GetWithHttpMessagesAsync( vaultName, resourceGroupName, operationId).Result.Body; diff --git a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/ProtectableItemAPI.cs b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/ProtectableItemAPI.cs index 61737513bb5a..c9c327d69cf8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/ProtectableItemAPI.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/ProtectableItemAPI.cs @@ -32,7 +32,7 @@ public partial class ServiceClientAdapter /// /// List of protectable items public List ListProtectableItem( - ODataQuery queryFilter, + ODataQuery queryFilter, string skipToken = default(string), string vaultName = null, string resourceGroupName = null) diff --git a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/RecoveryPointsAPIs.cs b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/RecoveryPointsAPIs.cs index 85ad4f593c7f..b65fd6a05ace 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/RecoveryPointsAPIs.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/RecoveryPointsAPIs.cs @@ -65,7 +65,7 @@ public RecoveryPointResource GetRecoveryPointDetails( public List GetRecoveryPoints( string containerName, string protectedItemName, - ODataQuery queryFilter, + ODataQuery queryFilter, string vaultName = null, string resourceGroupName = null) { @@ -100,7 +100,7 @@ public List GetRecoveryPoints( public List GetRecoveryPointsFromSecondaryRegion( string containerName, string protectedItemName, - ODataQuery queryFilter, + ODataQuery queryFilter, string vaultName = null, string resourceGroupName = null) { @@ -175,7 +175,7 @@ public List GetMoveRecommendedRecoveryPoints( containerName, protectedItemName, moveRequest.ObjectType, - moveRequest.ExcludedRPList + moveRequest.ExcludedRpList ).Result.Body; Func> listNextAsync = diff --git a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/VaultAPIs.cs b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/VaultAPIs.cs index 7caa2013166a..5195f2688568 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/VaultAPIs.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/BMSAPIs/VaultAPIs.cs @@ -94,7 +94,7 @@ public BackupResourceVaultConfigResource GetVaultProperty(string vaultName, stri /// Azure Resource Storage response object. public BackupResourceConfigResource GetVaultStorageType(string resouceGroupName, string vaultName) { - return BmsAdapter.Client.BackupResourceStorageConfigsNonCRR.GetWithHttpMessagesAsync( + return BmsAdapter.Client.BackupResourceStorageConfigsNonCrr.GetWithHttpMessagesAsync( vaultName, resouceGroupName).Result.Body; } @@ -174,11 +174,11 @@ public Vault UpdateRSVault(string resouceGroupName, string vaultName, PatchVault /// vault response object. public CrrModel.AADPropertiesResource GetAADProperties(string azureRegion, string backupManagementType = null) { - ODataQuery queryParams = null; + ODataQuery queryParams = null; if (backupManagementType == BackupManagementType.AzureWorkload) { - queryParams = new ODataQuery(q => q.BackupManagementType == BackupManagementType.AzureWorkload); + queryParams = new ODataQuery(q => q.BackupManagementType == BackupManagementType.AzureWorkload); } CrrModel.AADPropertiesResource aadProperties = CrrAdapter.Client.AadProperties.GetWithHttpMessagesAsync(azureRegion, queryParams).Result.Body; diff --git a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/DisableAzureRmRecoveryServicesBackupProtection.cs b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/DisableAzureRmRecoveryServicesBackupProtection.cs index bcbe3740c57a..5aedfa998096 100644 --- a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/DisableAzureRmRecoveryServicesBackupProtection.cs +++ b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/DisableAzureRmRecoveryServicesBackupProtection.cs @@ -125,17 +125,17 @@ public override void ExecuteCmdlet() string containerUri = HelperUtils.GetContainerUri(uriDict, Item.Id); string protectedItemName = HelperUtils.GetProtectedItemUri(uriDict, Item.Id); - ODataQuery queryFilter = null; + ODataQuery queryFilter = null; if (string.Compare(Item.BackupManagementType.ToString(), BackupManagementType.AzureWorkload.ToString()) == 0) { var restorePointQueryType = "FullAndDifferential"; - string queryFilterString = QueryBuilder.Instance.GetQueryString(new ServiceClientModel.BMSRPQueryObject() + string queryFilterString = QueryBuilder.Instance.GetQueryString(new ServiceClientModel.BmsrpQueryObject() { RestorePointQueryType = restorePointQueryType, ExtendedInfo = true }); - queryFilter = new ODataQuery(); + queryFilter = new ODataQuery(); queryFilter.Filter = queryFilterString; } diff --git a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/EnableAzureRmRecoveryServicesBackupProtection.cs b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/EnableAzureRmRecoveryServicesBackupProtection.cs index f977f706e64d..f2ea0931dd60 100644 --- a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/EnableAzureRmRecoveryServicesBackupProtection.cs +++ b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/EnableAzureRmRecoveryServicesBackupProtection.cs @@ -174,7 +174,7 @@ public override void ExecuteCmdlet() string backupManagementType = ProtectableItem.BackupManagementType.ToString(); string workloadType = ConversionUtils.GetServiceClientWorkloadType(ProtectableItem.WorkloadType.ToString()); string containerName = "VMAppContainer;" + ((AzureWorkloadProtectableItem)ProtectableItem).ContainerName; - ODataQuery queryParam = new ODataQuery( + ODataQuery queryParam = new ODataQuery( q => q.BackupManagementType == backupManagementType && q.WorkloadType == workloadType && diff --git a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/GetAzureRMRecoveryServicesBackupProtectableItem.cs b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/GetAzureRMRecoveryServicesBackupProtectableItem.cs index 8acb37853b61..78c29688dbfb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/GetAzureRMRecoveryServicesBackupProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/GetAzureRMRecoveryServicesBackupProtectableItem.cs @@ -100,7 +100,7 @@ public override void ExecuteCmdlet() string backupManagementType = ""; string workloadType = ""; - ODataQuery queryParam = null; + ODataQuery queryParam = null; if (ParameterSetName == IdParamSet) { @@ -114,7 +114,7 @@ public override void ExecuteCmdlet() { workloadType = ServiceClientModel.WorkloadType.SQLDataBase; } - queryParam = new ODataQuery( + queryParam = new ODataQuery( q => q.BackupManagementType == backupManagementType && q.WorkloadType == workloadType && @@ -128,7 +128,7 @@ public override void ExecuteCmdlet() backupManagementType = Container.BackupManagementType.ToString(); workloadType = ConversionUtils.GetServiceClientWorkloadType(WorkloadType.ToString()); containerName = Container.Name; - queryParam = new ODataQuery( + queryParam = new ODataQuery( q => q.BackupManagementType == backupManagementType && q.WorkloadType == workloadType && @@ -138,7 +138,7 @@ public override void ExecuteCmdlet() { backupManagementType = "AzureWorkload"; workloadType = ConversionUtils.GetServiceClientWorkloadType(WorkloadType.ToString()); - queryParam = new ODataQuery( + queryParam = new ODataQuery( q => q.BackupManagementType == backupManagementType && q.WorkloadType == workloadType); @@ -241,7 +241,7 @@ public void FetchNodesListAndAutoProtectionPolicy(List item if(sqlAGContainer != null) { - AzureSQLAGWorkloadContainerProtectionContainer protectionContainer = (AzureSQLAGWorkloadContainerProtectionContainer)sqlAGContainer.Properties; + AzureSqlagWorkloadContainerProtectionContainer protectionContainer = (AzureSqlagWorkloadContainerProtectionContainer)sqlAGContainer.Properties; if (protectionContainer != null && protectionContainer.ExtendedInfo != null) { diff --git a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Restore/GetAzureRmRecoveryServicesBackupWorkloadRecoveryConfig.cs b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Restore/GetAzureRmRecoveryServicesBackupWorkloadRecoveryConfig.cs index 0fa741f884dd..20114624b784 100644 --- a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Restore/GetAzureRmRecoveryServicesBackupWorkloadRecoveryConfig.cs +++ b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Restore/GetAzureRmRecoveryServicesBackupWorkloadRecoveryConfig.cs @@ -418,13 +418,13 @@ public List GetDataDirectory(string vaultName, string resource Dictionary uriDict = HelperUtils.ParseUri(itemId); string containerUri = HelperUtils.GetContainerUri(uriDict, itemId); string protectedItemName = HelperUtils.GetProtectedItemUri(uriDict, itemId); - var queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject() + var queryFilterString = QueryBuilder.Instance.GetQueryString(new BmsrpQueryObject() { RestorePointQueryType = RestorePointQueryType.Log, ExtendedInfo = true }); - ODataQuery queryFilter = new ODataQuery(); + ODataQuery queryFilter = new ODataQuery(); queryFilter.Filter = queryFilterString; var rpResponse = ServiceClientAdapter.GetRecoveryPoints( @@ -454,13 +454,13 @@ public List GetDataDirectory(string vaultName, string resource Dictionary uriDict = HelperUtils.ParseUri(itemId); string containerUri = HelperUtils.GetContainerUri(uriDict, itemId); string protectedItemName = HelperUtils.GetProtectedItemUri(uriDict, itemId); - var queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject() + var queryFilterString = QueryBuilder.Instance.GetQueryString(new BmsrpQueryObject() { RestorePointQueryType = RestorePointQueryType.Log, ExtendedInfo = true }); - ODataQuery queryFilter = new ODataQuery(); + ODataQuery queryFilter = new ODataQuery(); queryFilter.Filter = queryFilterString; var rpResponse = ServiceClientAdapter.GetRecoveryPointsFromSecondaryRegion( diff --git a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Vault/CopyAzureRmRecoveryServicesVault.cs b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Vault/CopyAzureRmRecoveryServicesVault.cs index 4da264771bfd..a636161f7cef 100644 --- a/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Vault/CopyAzureRmRecoveryServicesVault.cs +++ b/src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Vault/CopyAzureRmRecoveryServicesVault.cs @@ -169,7 +169,7 @@ public override void ExecuteCmdlet() // currently only allowing vault level data move triggerMoveRequest.DataMoveLevel = "Vault"; triggerMoveRequest.CorrelationId = correlationId; - triggerMoveRequest.PauseGC = false; + triggerMoveRequest.PauseGc = false; Logger.Instance.WriteDebug("Location of Source vault: " + SourceVault.Location); ServiceClientAdapter.TriggerDataMove(TargetVault.Name, TargetVault.ResourceGroupName, triggerMoveRequest); diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IOperations.cs index 52c1af3a3069..d5cf997797ca 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// /// Operations operations. @@ -26,6 +16,9 @@ public partial interface IOperations /// /// Returns the list of available operations. /// + /// + /// Returns the list of available operations. + /// /// /// The headers that will be added to request. /// @@ -38,13 +31,14 @@ public partial interface IOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Returns the list of available operations. /// + /// + /// Returns the list of available operations. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -60,9 +54,7 @@ public partial interface IOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IPrivateLinkResourcesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IPrivateLinkResourcesOperations.cs index cdec47f4758f..21b6b82434c1 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IPrivateLinkResourcesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IPrivateLinkResourcesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// /// PrivateLinkResourcesOperations operations. @@ -24,9 +14,11 @@ namespace Microsoft.Azure.Management.RecoveryServices public partial interface IPrivateLinkResourcesOperations { /// - /// Returns the list of private link resources that need to be created - /// for Backup and SiteRecovery + /// Returns the list of private link resources that need to be created for Backup and SiteRecovery /// + /// + /// Returns the list of private link resources that need to be created for Backup and SiteRecovery + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -45,14 +37,14 @@ public partial interface IPrivateLinkResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns a specified private link resource that need to be created - /// for Backup and SiteRecovery + /// Returns a specified private link resource that need to be created for Backup and SiteRecovery /// + /// + /// Returns a specified private link resource that need to be created for Backup and SiteRecovery + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -60,6 +52,7 @@ public partial interface IPrivateLinkResourcesOperations /// The name of the recovery services vault. /// /// + /// /// /// /// The headers that will be added to request. @@ -73,14 +66,14 @@ public partial interface IPrivateLinkResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, string privateLinkResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, string privateLinkResourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns the list of private link resources that need to be created - /// for Backup and SiteRecovery + /// Returns the list of private link resources that need to be created for Backup and SiteRecovery /// + /// + /// 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. /// @@ -96,9 +89,7 @@ public partial interface IPrivateLinkResourcesOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRecoveryServicesClient.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRecoveryServicesClient.cs index 49b73a777cc7..70ddfe7ae5bc 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRecoveryServicesClient.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRecoveryServicesClient.cs @@ -1,27 +1,18 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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.Threading; - using System.Threading.Tasks; /// + /// /// - public partial interface IRecoveryServicesClient : System.IDisposable + public partial interface IRecoveryServicesClient : System.IDisposable { /// /// The base URI of the service. @@ -31,105 +22,103 @@ public partial interface IRecoveryServicesClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} - /// - /// The subscription Id. - /// - string SubscriptionId { get; set; } - - /// - /// Client Api Version. - /// - string ApiVersion { get; } /// /// The API version to use for this operation. /// - string ApiVersion1 { get; set; } + string ApiVersion { get;} + /// /// The ID of the target subscription. /// - string SubscriptionId1 { get; set; } + string SubscriptionId { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// - /// 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 + /// 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; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the IVaultCertificatesOperations. + /// Gets the IVaultCertificatesOperations /// IVaultCertificatesOperations VaultCertificates { get; } /// - /// Gets the IRegisteredIdentitiesOperations. + /// Gets the IRegisteredIdentitiesOperations /// IRegisteredIdentitiesOperations RegisteredIdentities { get; } /// - /// Gets the IReplicationUsagesOperations. + /// Gets the IReplicationUsagesOperations /// IReplicationUsagesOperations ReplicationUsages { get; } /// - /// Gets the IPrivateLinkResourcesOperations. + /// Gets the IPrivateLinkResourcesOperations /// IPrivateLinkResourcesOperations PrivateLinkResources { get; } /// - /// Gets the IRecoveryServicesOperations. + /// Gets the IRecoveryServicesOperations /// IRecoveryServicesOperations RecoveryServices { get; } /// - /// Gets the IVaultsOperations. + /// Gets the IVaultsOperations /// IVaultsOperations Vaults { get; } /// - /// Gets the IOperations. + /// Gets the IOperations /// IOperations Operations { get; } /// - /// Gets the IVaultExtendedInfoOperations. + /// Gets the IVaultExtendedInfoOperations /// IVaultExtendedInfoOperations VaultExtendedInfo { get; } /// - /// Gets the IUsagesOperations. + /// Gets the IUsagesOperations /// IUsagesOperations Usages { get; } /// /// Gets the operation status for a resource. /// + /// + /// Gets the operation status for a resource. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -137,6 +126,7 @@ public partial interface IRecoveryServicesClient : System.IDisposable /// The name of the recovery services vault. /// /// + /// /// /// /// The headers that will be added to request. @@ -144,11 +134,20 @@ public partial interface IRecoveryServicesClient : System.IDisposable /// /// The cancellation token. /// - Task> GetOperationStatusWithHttpMessagesAsync(string resourceGroupName, string vaultName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetOperationStatusWithHttpMessagesAsync(string resourceGroupName, string vaultName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Gets the operation result for a resource. /// + /// + /// Gets the operation result for a resource. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -156,6 +155,7 @@ public partial interface IRecoveryServicesClient : System.IDisposable /// The name of the recovery services vault. /// /// + /// /// /// /// The headers that will be added to request. @@ -163,7 +163,13 @@ public partial interface IRecoveryServicesClient : System.IDisposable /// /// The cancellation token. /// - Task> GetOperationResultWithHttpMessagesAsync(string resourceGroupName, string vaultName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetOperationResultWithHttpMessagesAsync(string resourceGroupName, string vaultName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRecoveryServicesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRecoveryServicesOperations.cs index a14c7655df18..0570434f3770 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRecoveryServicesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRecoveryServicesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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. @@ -25,11 +15,14 @@ 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 + /// 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 /// + /// + /// 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. The name is case insensitive. /// @@ -54,14 +47,14 @@ public partial interface IRecoveryServicesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, string type = default(string), string name = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, string type = default(string), string name = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// API to get details about capabilities provided by - /// Microsoft.RecoveryServices RP + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP /// + /// + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP + /// /// /// Location of the resource /// @@ -69,6 +62,7 @@ public partial interface IRecoveryServicesOperations /// Describes the Resource type: Microsoft.RecoveryServices/Vaults /// /// + /// Capabilities information /// /// /// The headers that will be added to request. @@ -82,9 +76,7 @@ public partial interface IRecoveryServicesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CapabilitiesWithHttpMessagesAsync(string location, string type, CapabilitiesProperties properties = default(CapabilitiesProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CapabilitiesWithHttpMessagesAsync(string location, string type, CapabilitiesProperties properties = default(CapabilitiesProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRegisteredIdentitiesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRegisteredIdentitiesOperations.cs index cf7714d8db4b..63f596e774a9 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRegisteredIdentitiesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IRegisteredIdentitiesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// /// RegisteredIdentitiesOperations operations. @@ -26,6 +16,9 @@ public partial interface IRegisteredIdentitiesOperations /// /// Unregisters the given container from your Recovery Services vault. /// + /// + /// Unregisters the given container from your Recovery Services vault. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -44,9 +37,7 @@ public partial interface IRegisteredIdentitiesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, string identityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, string identityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IReplicationUsagesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IReplicationUsagesOperations.cs index 36af975f5945..8151980d7bf0 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IReplicationUsagesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IReplicationUsagesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// /// ReplicationUsagesOperations operations. @@ -26,6 +16,9 @@ public partial interface IReplicationUsagesOperations /// /// Fetches the replication usages of the vault. /// + /// + /// Fetches the replication usages of the vault. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -44,9 +37,7 @@ public partial interface IReplicationUsagesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IUsagesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IUsagesOperations.cs index f558d36ca9c0..152304643f28 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IUsagesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IUsagesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// /// UsagesOperations operations. @@ -26,6 +16,9 @@ public partial interface IUsagesOperations /// /// Fetches the usages of the vault. /// + /// + /// Fetches the usages of the vault. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -44,9 +37,7 @@ public partial interface IUsagesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByVaultsWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByVaultsWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultCertificatesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultCertificatesOperations.cs index 4bfc877f91ae..6927f94beb5c 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultCertificatesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultCertificatesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// /// VaultCertificatesOperations operations. @@ -26,6 +16,9 @@ public partial interface IVaultCertificatesOperations /// /// Uploads a certificate for a resource. /// + /// + /// Uploads a certificate for a resource. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -36,6 +29,7 @@ public partial interface IVaultCertificatesOperations /// Certificate friendly name. /// /// + /// Raw certificate data. /// /// /// The headers that will be added to request. @@ -49,9 +43,7 @@ public partial interface IVaultCertificatesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultExtendedInfoOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultExtendedInfoOperations.cs index 21db23b338e3..aac1dc306f7a 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultExtendedInfoOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultExtendedInfoOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// /// VaultExtendedInfoOperations operations. @@ -26,6 +16,9 @@ public partial interface IVaultExtendedInfoOperations /// /// Get the vault extended info. /// + /// + /// Get the vault extended info. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -44,20 +37,21 @@ public partial interface IVaultExtendedInfoOperations /// /// 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)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Create vault extended info. /// + /// + /// Create vault extended info. + /// /// /// The name of the resource group. The name is case insensitive. /// /// /// The name of the recovery services vault. /// - /// + /// /// Details of ResourceExtendedInfo /// /// @@ -72,20 +66,21 @@ public partial interface IVaultExtendedInfoOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceExtendedInfoDetails, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Update vault extended info. /// + /// + /// Update vault extended info. + /// /// /// The name of the resource group. The name is case insensitive. /// /// /// The name of the recovery services vault. /// - /// + /// /// Details of ResourceExtendedInfo /// /// @@ -100,9 +95,7 @@ public partial interface IVaultExtendedInfoOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceExtendedInfoDetails, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultsOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultsOperations.cs index 1ebe09078339..00517fb6c6ed 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/IVaultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// /// VaultsOperations operations. @@ -24,9 +14,11 @@ namespace Microsoft.Azure.Management.RecoveryServices public partial interface IVaultsOperations { /// - /// Fetches all the resources of the specified type in the - /// subscription. + /// Fetches all the resources of the specified type in the subscription. /// + /// + /// Fetches all the resources of the specified type in the subscription. + /// /// /// The headers that will be added to request. /// @@ -39,13 +31,14 @@ public partial interface IVaultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListBySubscriptionIdWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Retrieve a list of Vaults. /// + /// + /// Retrieve a list of Vaults. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -61,13 +54,14 @@ public partial interface IVaultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get the Vault details. /// + /// + /// Get the Vault details. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -86,13 +80,14 @@ public partial interface IVaultsOperations /// /// 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)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a Recovery Services vault. /// + /// + /// Creates or updates a Recovery Services vault. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -114,13 +109,14 @@ public partial interface IVaultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a vault. /// + /// + /// Deletes a vault. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -136,13 +132,14 @@ public partial interface IVaultsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates the vault. /// + /// + /// Updates the vault. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -164,13 +161,14 @@ public partial interface IVaultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a Recovery Services vault. /// + /// + /// Creates or updates a Recovery Services vault. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -192,13 +190,14 @@ public partial interface IVaultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates the vault. /// + /// + /// Updates the vault. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -220,14 +219,14 @@ public partial interface IVaultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Fetches all the resources of the specified type in the - /// subscription. + /// Fetches all the resources of the specified type in the subscription. /// + /// + /// Fetches all the resources of the specified type in the subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -243,13 +242,14 @@ public partial interface IVaultsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListBySubscriptionIdNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Retrieve a list of Vaults. /// + /// + /// Retrieve a list of Vaults. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -265,9 +265,7 @@ public partial interface IVaultsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AlertsState.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AlertsState.cs index bf75c21740b6..fd4dc44a4ea3 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AlertsState.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AlertsState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for AlertsState. /// + + public static class AlertsState { public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AuthType.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AuthType.cs index 70e7f0bd2308..680038d6cb40 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AuthType.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AuthType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for AuthType. /// + + public static class AuthType { public const string Invalid = "Invalid"; @@ -22,4 +19,4 @@ public static class AuthType public const string AccessControlService = "AccessControlService"; public const string AzureActiveDirectory = "AzureActiveDirectory"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AzureMonitorAlertSettings.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AzureMonitorAlertSettings.cs index 5e249643b647..1bd439c02ab8 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AzureMonitorAlertSettings.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/AzureMonitorAlertSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,11 +23,13 @@ public AzureMonitorAlertSettings() /// /// Initializes a new instance of the AzureMonitorAlertSettings class. /// - /// Possible values include: - /// 'Enabled', 'Disabled' + + /// + /// Possible values include: 'Enabled', 'Disabled' public AzureMonitorAlertSettings(string alertsForAllJobFailures = default(string)) + { - AlertsForAllJobFailures = alertsForAllJobFailures; + this.AlertsForAllJobFailures = alertsForAllJobFailures; CustomInit(); } @@ -42,11 +38,11 @@ public AzureMonitorAlertSettings() /// partial void CustomInit(); + /// - /// Gets or sets possible values include: 'Enabled', 'Disabled' + /// Gets or sets Possible values include: 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "alertsForAllJobFailures")] - public string AlertsForAllJobFailures { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "alertsForAllJobFailures")] + public string AlertsForAllJobFailures {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/BackupStorageVersion.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/BackupStorageVersion.cs index 0e83b4890b06..471a87d8a900 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/BackupStorageVersion.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/BackupStorageVersion.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for BackupStorageVersion. /// + + public static class BackupStorageVersion { public const string V1 = "V1"; public const string V2 = "V2"; public const string Unassigned = "Unassigned"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesProperties.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesProperties.cs index daeb9762ecd9..870ed4bef58f 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -31,9 +23,13 @@ public CapabilitiesProperties() /// /// Initializes a new instance of the CapabilitiesProperties class. /// - public CapabilitiesProperties(IList dnsZones = default(IList)) + + /// + /// + public CapabilitiesProperties(System.Collections.Generic.IList dnsZones = default(System.Collections.Generic.IList)) + { - DnsZones = dnsZones; + this.DnsZones = dnsZones; CustomInit(); } @@ -42,10 +38,11 @@ public CapabilitiesProperties() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "dnsZones")] - public IList DnsZones { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dnsZones")] + public System.Collections.Generic.IList DnsZones {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesResponse.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesResponse.cs index dfbca3e231b9..7ee8712c52eb 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesResponse.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,12 +23,17 @@ public CapabilitiesResponse() /// /// Initializes a new instance of the CapabilitiesResponse class. /// - /// Describes the Resource type: - /// Microsoft.RecoveryServices/Vaults + + /// Describes the Resource type: Microsoft.RecoveryServices/Vaults + /// + + /// Capabilities properties in response + /// public CapabilitiesResponse(string type, CapabilitiesResponseProperties properties = default(CapabilitiesResponseProperties)) - : base(type) + + : base(type) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,20 +42,22 @@ public CapabilitiesResponse() /// partial void CustomInit(); + /// + /// Gets or sets capabilities properties in response /// - [JsonProperty(PropertyName = "properties")] - public CapabilitiesResponseProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CapabilitiesResponseProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public override void Validate() { base.Validate(); + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesResponseProperties.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesResponseProperties.cs index 90622503347f..be793b0228ae 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesResponseProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CapabilitiesResponseProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class CapabilitiesResponseProperties { /// - /// Initializes a new instance of the CapabilitiesResponseProperties - /// class. + /// Initializes a new instance of the CapabilitiesResponseProperties class. /// public CapabilitiesResponseProperties() { @@ -30,12 +21,15 @@ public CapabilitiesResponseProperties() } /// - /// Initializes a new instance of the CapabilitiesResponseProperties - /// class. + /// Initializes a new instance of the CapabilitiesResponseProperties class. /// - public CapabilitiesResponseProperties(IList dnsZones = default(IList)) + + /// + /// + public CapabilitiesResponseProperties(System.Collections.Generic.IList dnsZones = default(System.Collections.Generic.IList)) + { - DnsZones = dnsZones; + this.DnsZones = dnsZones; CustomInit(); } @@ -44,10 +38,11 @@ public CapabilitiesResponseProperties() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "dnsZones")] - public IList DnsZones { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dnsZones")] + public System.Collections.Generic.IList DnsZones {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CertificateRequest.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CertificateRequest.cs index 3ac42fbf0422..cb1b98fb81c3 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CertificateRequest.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CertificateRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,9 +23,13 @@ public CertificateRequest() /// /// Initializes a new instance of the CertificateRequest class. /// + + /// Raw certificate data. + /// public CertificateRequest(RawCertificateData properties = default(RawCertificateData)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -40,10 +38,11 @@ public CertificateRequest() /// partial void CustomInit(); + /// + /// Gets or sets raw certificate data. /// - [JsonProperty(PropertyName = "properties")] - public RawCertificateData Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RawCertificateData Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CheckNameAvailabilityParameters.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CheckNameAvailabilityParameters.cs index 44c34f1677dd..0c397b67d321 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CheckNameAvailabilityParameters.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CheckNameAvailabilityParameters.cs @@ -1,27 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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 + /// Resource Name availability input parameters - Resource type and resource + /// name /// public partial class CheckNameAvailabilityParameters { /// - /// Initializes a new instance of the CheckNameAvailabilityParameters - /// class. + /// Initializes a new instance of the CheckNameAvailabilityParameters class. /// public CheckNameAvailabilityParameters() { @@ -29,17 +22,19 @@ public CheckNameAvailabilityParameters() } /// - /// Initializes a new instance of the CheckNameAvailabilityParameters - /// class. + /// Initializes a new instance of the CheckNameAvailabilityParameters class. /// - /// Describes the Resource type: - /// Microsoft.RecoveryServices/Vaults - /// Resource name for which availability needs to be - /// checked + + /// 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; + this.Type = type; + this.Name = name; CustomInit(); } @@ -48,19 +43,17 @@ public CheckNameAvailabilityParameters() /// partial void CustomInit(); + /// - /// Gets or sets describes the Resource type: - /// Microsoft.RecoveryServices/Vaults + /// Gets or sets describes the Resource type: Microsoft.RecoveryServices/Vaults /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// - /// Gets or sets resource name for which availability needs to be - /// checked + /// Gets or sets resource name for which availability needs to be checked /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CheckNameAvailabilityResult.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CheckNameAvailabilityResult.cs index d0b353f02341..573c5623ef32 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CheckNameAvailabilityResult.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CheckNameAvailabilityResult.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class CheckNameAvailabilityResult { /// - /// Initializes a new instance of the CheckNameAvailabilityResult - /// class. + /// Initializes a new instance of the CheckNameAvailabilityResult class. /// public CheckNameAvailabilityResult() { @@ -29,14 +22,23 @@ public CheckNameAvailabilityResult() } /// - /// Initializes a new instance of the CheckNameAvailabilityResult - /// class. + /// 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; + this.NameAvailable = nameAvailable; + this.Reason = reason; + this.Message = message; CustomInit(); } @@ -45,20 +47,23 @@ public CheckNameAvailabilityResult() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "nameAvailable")] - public bool? NameAvailable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nameAvailable")] + public bool? NameAvailable {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "reason")] - public string Reason { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reason")] + public string Reason {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClassicAlertSettings.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClassicAlertSettings.cs index 8754a31b5ea0..d64121c6b124 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClassicAlertSettings.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClassicAlertSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,11 +23,13 @@ public ClassicAlertSettings() /// /// Initializes a new instance of the ClassicAlertSettings class. /// - /// Possible values include: - /// 'Enabled', 'Disabled' + + /// + /// Possible values include: 'Enabled', 'Disabled' public ClassicAlertSettings(string alertsForCriticalOperations = default(string)) + { - AlertsForCriticalOperations = alertsForCriticalOperations; + this.AlertsForCriticalOperations = alertsForCriticalOperations; CustomInit(); } @@ -42,11 +38,11 @@ public ClassicAlertSettings() /// partial void CustomInit(); + /// - /// Gets or sets possible values include: 'Enabled', 'Disabled' + /// Gets or sets Possible values include: 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "alertsForCriticalOperations")] - public string AlertsForCriticalOperations { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "alertsForCriticalOperations")] + public string AlertsForCriticalOperations {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryDisplay.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryDisplay.cs index 7e879220bd47..a414c244e0c7 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryDisplay.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryDisplay.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,19 +23,25 @@ public ClientDiscoveryDisplay() /// /// Initializes a new instance of the ClientDiscoveryDisplay class. /// - /// 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. + + /// 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; + this.Provider = provider; + this.Resource = resource; + this.Operation = operation; + this.Description = description; CustomInit(); } @@ -50,31 +50,30 @@ public ClientDiscoveryDisplay() /// partial void CustomInit(); + /// /// Gets or sets name of the provider for display purposes /// - [JsonProperty(PropertyName = "provider")] - public string Provider { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provider")] + public string Provider {get; set; } /// - /// Gets or sets resourceType for which this Operation can be - /// performed. + /// Gets or sets resourceType for which this Operation can be performed. /// - [JsonProperty(PropertyName = "resource")] - public string Resource { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resource")] + public string Resource {get; set; } /// /// Gets or sets operations Name itself. /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// - /// Gets or sets description of the operation having details of what - /// operation is about. + /// Gets or sets description of the operation having details of what operation + /// is about. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForLogSpecification.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForLogSpecification.cs index 4baed2829de2..86e97638dfbc 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForLogSpecification.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForLogSpecification.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class ClientDiscoveryForLogSpecification { /// - /// Initializes a new instance of the - /// ClientDiscoveryForLogSpecification class. + /// Initializes a new instance of the ClientDiscoveryForLogSpecification class. /// public ClientDiscoveryForLogSpecification() { @@ -28,18 +21,23 @@ public ClientDiscoveryForLogSpecification() } /// - /// Initializes a new instance of the - /// ClientDiscoveryForLogSpecification class. + /// Initializes a new instance of the ClientDiscoveryForLogSpecification class. /// - /// Name of the log. - /// Localized display name - /// Blobs created in customer storage - /// account per hour + + /// Name of the log. + /// + + /// 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; + this.Name = name; + this.DisplayName = displayName; + this.BlobDuration = blobDuration; CustomInit(); } @@ -48,23 +46,23 @@ public ClientDiscoveryForLogSpecification() /// partial void CustomInit(); + /// /// Gets or sets name of the log. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets localized display name /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "displayName")] + public string DisplayName {get; set; } /// /// Gets or sets blobs created in customer storage account per hour /// - [JsonProperty(PropertyName = "blobDuration")] - public string BlobDuration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "blobDuration")] + public string BlobDuration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForProperties.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForProperties.cs index 3aa50aaea8d0..df0c8a0713a9 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class ClientDiscoveryForProperties { /// - /// Initializes a new instance of the ClientDiscoveryForProperties - /// class. + /// Initializes a new instance of the ClientDiscoveryForProperties class. /// public ClientDiscoveryForProperties() { @@ -28,13 +21,15 @@ public ClientDiscoveryForProperties() } /// - /// Initializes a new instance of the ClientDiscoveryForProperties - /// class. + /// Initializes a new instance of the ClientDiscoveryForProperties class. /// - /// Operation properties. + + /// Operation properties. + /// public ClientDiscoveryForProperties(ClientDiscoveryForServiceSpecification serviceSpecification = default(ClientDiscoveryForServiceSpecification)) + { - ServiceSpecification = serviceSpecification; + this.ServiceSpecification = serviceSpecification; CustomInit(); } @@ -43,11 +38,11 @@ public ClientDiscoveryForProperties() /// partial void CustomInit(); + /// /// Gets or sets operation properties. /// - [JsonProperty(PropertyName = "serviceSpecification")] - public ClientDiscoveryForServiceSpecification ServiceSpecification { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceSpecification")] + public ClientDiscoveryForServiceSpecification ServiceSpecification {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForServiceSpecification.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForServiceSpecification.cs index f97ed49dec0d..3bb68d2156da 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForServiceSpecification.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryForServiceSpecification.cs @@ -1,29 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// - /// Class to represent shoebox service specification in json client - /// discovery. + /// Class to represent shoebox service specification in json client discovery. /// public partial class ClientDiscoveryForServiceSpecification { /// - /// Initializes a new instance of the - /// ClientDiscoveryForServiceSpecification class. + /// Initializes a new instance of the ClientDiscoveryForServiceSpecification class. /// public ClientDiscoveryForServiceSpecification() { @@ -31,14 +21,15 @@ public ClientDiscoveryForServiceSpecification() } /// - /// Initializes a new instance of the - /// ClientDiscoveryForServiceSpecification class. + /// Initializes a new instance of the ClientDiscoveryForServiceSpecification class. /// - /// List of log specifications of this - /// operation. - public ClientDiscoveryForServiceSpecification(IList logSpecifications = default(IList)) + + /// List of log specifications of this operation. + /// + public ClientDiscoveryForServiceSpecification(System.Collections.Generic.IList logSpecifications = default(System.Collections.Generic.IList)) + { - LogSpecifications = logSpecifications; + this.LogSpecifications = logSpecifications; CustomInit(); } @@ -47,11 +38,11 @@ public ClientDiscoveryForServiceSpecification() /// partial void CustomInit(); + /// /// Gets or sets list of log specifications of this operation. /// - [JsonProperty(PropertyName = "logSpecifications")] - public IList LogSpecifications { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "logSpecifications")] + public System.Collections.Generic.IList LogSpecifications {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryValueForSingleApi.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryValueForSingleApi.cs index 3a73ad409d21..fbf64d7f67c5 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryValueForSingleApi.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ClientDiscoveryValueForSingleApi.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class ClientDiscoveryValueForSingleApi { /// - /// Initializes a new instance of the ClientDiscoveryValueForSingleApi - /// class. + /// Initializes a new instance of the ClientDiscoveryValueForSingleApi class. /// public ClientDiscoveryValueForSingleApi() { @@ -28,23 +21,28 @@ public ClientDiscoveryValueForSingleApi() } /// - /// Initializes a new instance of the ClientDiscoveryValueForSingleApi - /// class. + /// Initializes a new instance of the ClientDiscoveryValueForSingleApi class. /// - /// Name of the Operation. - /// Contains the localized display information - /// for this particular operation - /// The intended executor of the operation;governs - /// the display of the operation in the RBAC UX and the audit logs - /// UX - /// ShoeBox properties for the given - /// operation. + + /// Name of the Operation. + /// + + /// Contains the localized display information 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. + /// public ClientDiscoveryValueForSingleApi(string name = default(string), ClientDiscoveryDisplay display = default(ClientDiscoveryDisplay), string origin = default(string), ClientDiscoveryForProperties properties = default(ClientDiscoveryForProperties)) + { - Name = name; - Display = display; - Origin = origin; - Properties = properties; + this.Name = name; + this.Display = display; + this.Origin = origin; + this.Properties = properties; CustomInit(); } @@ -53,31 +51,31 @@ public ClientDiscoveryValueForSingleApi() /// partial void CustomInit(); + /// /// Gets or sets name of the Operation. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// - /// Gets or sets 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; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "display")] + public ClientDiscoveryDisplay Display {get; set; } /// - /// Gets or sets the intended executor of the operation;governs the - /// display of the operation in the RBAC UX and the audit logs UX + /// 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; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "origin")] + public string Origin {get; set; } /// /// Gets or sets shoeBox properties for the given operation. /// - [JsonProperty(PropertyName = "properties")] - public ClientDiscoveryForProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ClientDiscoveryForProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CmkKekIdentity.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CmkKekIdentity.cs index 2b343f281312..5045b648aeb5 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CmkKekIdentity.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CmkKekIdentity.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,16 +23,19 @@ public CmkKekIdentity() /// /// Initializes a new instance of the CmkKekIdentity class. /// - /// Indicate that system - /// assigned identity should be used. Mutually exclusive with - /// 'userAssignedIdentity' field - /// The user assigned identity to be - /// used to grant permissions in case the type of identity used is - /// UserAssigned + + /// Indicate that system assigned identity should be used. Mutually exclusive + /// with 'userAssignedIdentity' field + /// + + /// The user assigned identity to be used to grant permissions in case the type + /// of identity used is UserAssigned + /// public CmkKekIdentity(bool? useSystemAssignedIdentity = default(bool?), string userAssignedIdentity = default(string)) + { - UseSystemAssignedIdentity = useSystemAssignedIdentity; - UserAssignedIdentity = userAssignedIdentity; + this.UseSystemAssignedIdentity = useSystemAssignedIdentity; + this.UserAssignedIdentity = userAssignedIdentity; CustomInit(); } @@ -47,19 +44,19 @@ public CmkKekIdentity() /// partial void CustomInit(); + /// /// Gets or sets indicate that system assigned identity should be used. - /// Mutually exclusive with 'userAssignedIdentity' field + /// Mutually exclusive with 'userAssignedIdentity' field /// - [JsonProperty(PropertyName = "useSystemAssignedIdentity")] - public bool? UseSystemAssignedIdentity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "useSystemAssignedIdentity")] + public bool? UseSystemAssignedIdentity {get; set; } /// - /// Gets or sets the user assigned identity to be used to grant - /// permissions in case the type of identity used is UserAssigned + /// Gets or sets the user assigned identity to be used to grant permissions in + /// case the type of identity used is UserAssigned /// - [JsonProperty(PropertyName = "userAssignedIdentity")] - public string UserAssignedIdentity { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentity")] + public string UserAssignedIdentity {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CmkKeyVaultProperties.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CmkKeyVaultProperties.cs index 739e091709c7..35a336c3643f 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CmkKeyVaultProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CmkKeyVaultProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,11 +23,13 @@ public CmkKeyVaultProperties() /// /// Initializes a new instance of the CmkKeyVaultProperties class. /// - /// The key uri of the Customer Managed - /// Key + + /// The key uri of the Customer Managed Key + /// public CmkKeyVaultProperties(string keyUri = default(string)) + { - KeyUri = keyUri; + this.KeyUri = keyUri; CustomInit(); } @@ -42,11 +38,11 @@ public CmkKeyVaultProperties() /// partial void CustomInit(); + /// /// Gets or sets the key uri of the Customer Managed Key /// - [JsonProperty(PropertyName = "keyUri")] - public string KeyUri { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "keyUri")] + public string KeyUri {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CreatedByType.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CreatedByType.cs index ae622552f3ce..8384dae15cdb 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CreatedByType.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CreatedByType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for CreatedByType. /// + + public static class CreatedByType { public const string User = "User"; @@ -21,4 +18,4 @@ public static class CreatedByType public const string ManagedIdentity = "ManagedIdentity"; public const string Key = "Key"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossRegionRestore.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossRegionRestore.cs index 0b0eb3123b06..92ede26c3305 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossRegionRestore.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossRegionRestore.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for CrossRegionRestore. /// + + public static class CrossRegionRestore { public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossSubscriptionRestoreSettings.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossSubscriptionRestoreSettings.cs index 8879bae22e12..e6c4a5dcd6b0 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossSubscriptionRestoreSettings.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossSubscriptionRestoreSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class CrossSubscriptionRestoreSettings { /// - /// Initializes a new instance of the CrossSubscriptionRestoreSettings - /// class. + /// Initializes a new instance of the CrossSubscriptionRestoreSettings class. /// public CrossSubscriptionRestoreSettings() { @@ -28,14 +21,15 @@ public CrossSubscriptionRestoreSettings() } /// - /// Initializes a new instance of the CrossSubscriptionRestoreSettings - /// class. + /// Initializes a new instance of the CrossSubscriptionRestoreSettings class. /// - /// Possible values - /// include: 'Enabled', 'Disabled', 'PermanentlyDisabled' + + /// + /// Possible values include: 'Enabled', 'Disabled', 'PermanentlyDisabled' public CrossSubscriptionRestoreSettings(string crossSubscriptionRestoreState = default(string)) + { - CrossSubscriptionRestoreState = crossSubscriptionRestoreState; + this.CrossSubscriptionRestoreState = crossSubscriptionRestoreState; CustomInit(); } @@ -44,12 +38,11 @@ public CrossSubscriptionRestoreSettings() /// partial void CustomInit(); + /// - /// Gets or sets possible values include: 'Enabled', 'Disabled', - /// 'PermanentlyDisabled' + /// Gets or sets Possible values include: 'Enabled', 'Disabled', 'PermanentlyDisabled' /// - [JsonProperty(PropertyName = "crossSubscriptionRestoreState")] - public string CrossSubscriptionRestoreState { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "crossSubscriptionRestoreState")] + public string CrossSubscriptionRestoreState {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossSubscriptionRestoreState.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossSubscriptionRestoreState.cs index 9ca4bf213c9a..5f07a1aaa6dc 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossSubscriptionRestoreState.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/CrossSubscriptionRestoreState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for CrossSubscriptionRestoreState. /// + + public static class CrossSubscriptionRestoreState { public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; public const string PermanentlyDisabled = "PermanentlyDisabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/DNSZone.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/DNSZone.cs index ebcb4997ddb1..91b5082c639b 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/DNSZone.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/DNSZone.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,13 +23,15 @@ public DNSZone() /// /// Initializes a new instance of the DNSZone class. /// - /// Subresource type for vault AzureBackup, - /// AzureBackup_secondary or AzureSiteRecovery. Possible values - /// include: 'AzureBackup', 'AzureBackup_secondary', + + /// Subresource type for vault AzureBackup, AzureBackup_secondary or + /// AzureSiteRecovery + /// Possible values include: 'AzureBackup', 'AzureBackup_secondary', /// 'AzureSiteRecovery' public DNSZone(string subResource = default(string)) + { - SubResource = subResource; + this.SubResource = subResource; CustomInit(); } @@ -44,14 +40,12 @@ public DNSZone() /// partial void CustomInit(); + /// - /// Gets or sets subresource type for vault AzureBackup, - /// AzureBackup_secondary or AzureSiteRecovery. Possible values - /// include: 'AzureBackup', 'AzureBackup_secondary', - /// 'AzureSiteRecovery' + /// Gets or sets subresource type for vault AzureBackup, AzureBackup_secondary + /// or AzureSiteRecovery Possible values include: 'AzureBackup', 'AzureBackup_secondary', 'AzureSiteRecovery' /// - [JsonProperty(PropertyName = "subResource")] - public string SubResource { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "subResource")] + public string SubResource {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/DNSZoneResponse.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/DNSZoneResponse.cs index 7ce4bda3742d..e8cc9ba44b0c 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/DNSZoneResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/DNSZoneResponse.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -31,16 +23,19 @@ public DNSZoneResponse() /// /// Initializes a new instance of the DNSZoneResponse class. /// - /// Subresource type for vault AzureBackup, - /// AzureBackup_secondary or AzureSiteRecovery. Possible values - /// include: 'AzureBackup', 'AzureBackup_secondary', + + /// Subresource type for vault AzureBackup, AzureBackup_secondary or + /// AzureSiteRecovery + /// Possible values include: 'AzureBackup', 'AzureBackup_secondary', /// 'AzureSiteRecovery' - /// The private link resource Private - /// link DNS zone names. - public DNSZoneResponse(string subResource = default(string), IList requiredZoneNames = default(IList)) - : base(subResource) + + /// The private link resource Private link DNS zone names. + /// + public DNSZoneResponse(string subResource = default(string), System.Collections.Generic.IList requiredZoneNames = default(System.Collections.Generic.IList)) + + : base(subResource) { - RequiredZoneNames = requiredZoneNames; + this.RequiredZoneNames = requiredZoneNames; CustomInit(); } @@ -49,11 +44,11 @@ public DNSZoneResponse() /// partial void CustomInit(); + /// /// Gets or sets the private link resource Private link DNS zone names. /// - [JsonProperty(PropertyName = "requiredZoneNames")] - public IList RequiredZoneNames { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "requiredZoneNames")] + public System.Collections.Generic.IList RequiredZoneNames {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Error.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Error.cs index 90304aca9acc..5f66c4e5857c 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Error.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Error.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -31,18 +23,29 @@ public Error() /// /// Initializes a new instance of the Error class. /// - /// The error additional info. - /// The error code. - /// The error details. - /// The error message. - /// The error target. - public Error(IList additionalInfo = default(IList), string code = default(string), IList details = default(IList), string message = default(string), string target = default(string)) + + /// The error additional info. + /// + + /// The error code. + /// + + /// The error details. + /// + + /// The error message. + /// + + /// The error target. + /// + public Error(System.Collections.Generic.IList additionalInfo = default(System.Collections.Generic.IList), string code = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList), string message = default(string), string target = default(string)) + { - AdditionalInfo = additionalInfo; - Code = code; - Details = details; - Message = message; - Target = target; + this.AdditionalInfo = additionalInfo; + this.Code = code; + this.Details = details; + this.Message = message; + this.Target = target; CustomInit(); } @@ -51,35 +54,35 @@ public Error() /// partial void CustomInit(); + /// /// Gets the error additional info. /// - [JsonProperty(PropertyName = "additionalInfo")] - public IList AdditionalInfo { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")] + public System.Collections.Generic.IList AdditionalInfo {get; private set; } /// /// Gets the error code. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } /// /// Gets the error details. /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; private set; } /// /// Gets the error message. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } /// /// Gets the error target. /// - [JsonProperty(PropertyName = "target")] - public string Target { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "target")] + public string Target {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs index fc17370819e8..2149b9c043d5 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ErrorAdditionalInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,12 +23,17 @@ public ErrorAdditionalInfo() /// /// Initializes a new instance of the ErrorAdditionalInfo class. /// - /// The additional info. - /// The additional info type. + + /// The additional info. + /// + + /// The additional info type. + /// public ErrorAdditionalInfo(object info = default(object), string type = default(string)) + { - Info = info; - Type = type; + this.Info = info; + this.Type = type; CustomInit(); } @@ -43,17 +42,17 @@ public ErrorAdditionalInfo() /// partial void CustomInit(); + /// /// Gets the additional info. /// - [JsonProperty(PropertyName = "info")] - public object Info { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "info")] + public object Info {get; private set; } /// /// Gets the additional info type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/IdentityData.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/IdentityData.cs index ecf67fe9a0d5..ad871ac8f468 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/IdentityData.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/IdentityData.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,25 +23,31 @@ public IdentityData() /// /// Initializes a new instance of the IdentityData class. /// - /// The type of managed identity used. The type - /// 'SystemAssigned, UserAssigned' includes both an implicitly created - /// identity and a set of user-assigned identities. The type 'None' - /// will remove any identities. Possible values include: - /// 'SystemAssigned', 'None', 'UserAssigned', 'SystemAssigned, - /// UserAssigned' - /// The principal ID of resource - /// identity. - /// The tenant ID of resource. - /// The list of user-assigned - /// identities associated with the resource. The user-assigned identity - /// dictionary keys will be ARM resource ids in the form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - public IdentityData(string type, string principalId = default(string), string tenantId = default(string), IDictionary userAssignedIdentities = default(IDictionary)) + + /// The principal ID of resource identity. + /// + + /// The tenant ID of resource. + /// + + /// The type of managed identity used. The type 'SystemAssigned, UserAssigned' + /// includes both an implicitly created identity and a set of user-assigned + /// identities. The type 'None' will remove any identities. + /// Possible values include: 'SystemAssigned', 'None', 'UserAssigned', + /// 'SystemAssigned, UserAssigned' + + /// The list of user-assigned identities associated with the resource. The + /// user-assigned identity dictionary keys will be ARM resource ids in the + /// form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// + public IdentityData(string type, string principalId = default(string), string tenantId = default(string), System.Collections.Generic.IDictionary userAssignedIdentities = default(System.Collections.Generic.IDictionary)) + { - PrincipalId = principalId; - TenantId = tenantId; - Type = type; - UserAssignedIdentities = userAssignedIdentities; + this.PrincipalId = principalId; + this.TenantId = tenantId; + this.Type = type; + this.UserAssignedIdentities = userAssignedIdentities; CustomInit(); } @@ -59,50 +56,51 @@ public IdentityData() /// partial void CustomInit(); + /// /// Gets the principal ID of resource identity. /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")] + public string PrincipalId {get; private set; } /// /// Gets the tenant ID of resource. /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; private set; } /// - /// Gets or sets the type of managed identity used. The type - /// 'SystemAssigned, UserAssigned' includes both an implicitly created - /// identity and a set of user-assigned identities. The type 'None' - /// will remove any identities. Possible values include: - /// 'SystemAssigned', 'None', 'UserAssigned', 'SystemAssigned, - /// UserAssigned' + /// Gets or sets the type of managed identity used. The type 'SystemAssigned, + /// UserAssigned' includes both an implicitly created identity and a set of + /// user-assigned identities. The type 'None' will remove any identities. Possible values include: 'SystemAssigned', 'None', 'UserAssigned', 'SystemAssigned, UserAssigned' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// - /// Gets or sets the list of user-assigned identities associated with - /// the resource. The user-assigned identity dictionary keys will be - /// ARM resource ids in the form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// Gets or sets the list of user-assigned identities associated with the + /// resource. The user-assigned identity dictionary keys will be ARM resource + /// ids in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// - [JsonProperty(PropertyName = "userAssignedIdentities")] - public IDictionary UserAssignedIdentities { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentities")] + public System.Collections.Generic.IDictionary UserAssignedIdentities {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Type == null) + if (this.Type == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Type"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ImmutabilitySettings.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ImmutabilitySettings.cs index 9fc2235a9024..0af1d496516a 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ImmutabilitySettings.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ImmutabilitySettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,11 +23,13 @@ public ImmutabilitySettings() /// /// Initializes a new instance of the ImmutabilitySettings class. /// - /// Possible values include: 'Disabled', - /// 'Unlocked', 'Locked' + + /// + /// Possible values include: 'Disabled', 'Unlocked', 'Locked' public ImmutabilitySettings(string state = default(string)) + { - State = state; + this.State = state; CustomInit(); } @@ -42,12 +38,11 @@ public ImmutabilitySettings() /// partial void CustomInit(); + /// - /// Gets or sets possible values include: 'Disabled', 'Unlocked', - /// 'Locked' + /// Gets or sets Possible values include: 'Disabled', 'Unlocked', 'Locked' /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ImmutabilityState.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ImmutabilityState.cs index 67acbc7f5162..7fedfd1f99c9 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ImmutabilityState.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ImmutabilityState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for ImmutabilityState. /// + + public static class ImmutabilityState { public const string Disabled = "Disabled"; public const string Unlocked = "Unlocked"; public const string Locked = "Locked"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/InfrastructureEncryptionState.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/InfrastructureEncryptionState.cs index d0ff75b9b96d..ad9d3c128a97 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/InfrastructureEncryptionState.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/InfrastructureEncryptionState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for InfrastructureEncryptionState. /// + + public static class InfrastructureEncryptionState { public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/JobsSummary.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/JobsSummary.cs index 835f3de0e6ec..ecad77e14dce 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/JobsSummary.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/JobsSummary.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,14 +23,21 @@ public JobsSummary() /// /// Initializes a new instance of the JobsSummary class. /// - /// Count of failed jobs. - /// Count of suspended jobs. - /// Count of in-progress jobs. + + /// Count of failed jobs. + /// + + /// Count of suspended jobs. + /// + + /// Count of in-progress jobs. + /// public JobsSummary(int? failedJobs = default(int?), int? suspendedJobs = default(int?), int? inProgressJobs = default(int?)) + { - FailedJobs = failedJobs; - SuspendedJobs = suspendedJobs; - InProgressJobs = inProgressJobs; + this.FailedJobs = failedJobs; + this.SuspendedJobs = suspendedJobs; + this.InProgressJobs = inProgressJobs; CustomInit(); } @@ -45,23 +46,23 @@ public JobsSummary() /// partial void CustomInit(); + /// /// Gets or sets count of failed jobs. /// - [JsonProperty(PropertyName = "failedJobs")] - public int? FailedJobs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failedJobs")] + public int? FailedJobs {get; set; } /// /// Gets or sets count of suspended jobs. /// - [JsonProperty(PropertyName = "suspendedJobs")] - public int? SuspendedJobs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "suspendedJobs")] + public int? SuspendedJobs {get; set; } /// /// Gets or sets count of in-progress jobs. /// - [JsonProperty(PropertyName = "inProgressJobs")] - public int? InProgressJobs { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "inProgressJobs")] + public int? InProgressJobs {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/MonitoringSettings.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/MonitoringSettings.cs index a79b08bb3469..28b44a2d0e09 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/MonitoringSettings.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/MonitoringSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,14 +23,17 @@ public MonitoringSettings() /// /// Initializes a new instance of the MonitoringSettings class. /// - /// Settings for Azure Monitor - /// based alerts - /// Settings for classic - /// alerts + + /// Settings for Azure Monitor based alerts + /// + + /// Settings for classic alerts + /// public MonitoringSettings(AzureMonitorAlertSettings azureMonitorAlertSettings = default(AzureMonitorAlertSettings), ClassicAlertSettings classicAlertSettings = default(ClassicAlertSettings)) + { - AzureMonitorAlertSettings = azureMonitorAlertSettings; - ClassicAlertSettings = classicAlertSettings; + this.AzureMonitorAlertSettings = azureMonitorAlertSettings; + this.ClassicAlertSettings = classicAlertSettings; CustomInit(); } @@ -45,17 +42,17 @@ public MonitoringSettings() /// partial void CustomInit(); + /// /// Gets or sets settings for Azure Monitor based alerts /// - [JsonProperty(PropertyName = "azureMonitorAlertSettings")] - public AzureMonitorAlertSettings AzureMonitorAlertSettings { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureMonitorAlertSettings")] + public AzureMonitorAlertSettings AzureMonitorAlertSettings {get; set; } /// /// Gets or sets settings for classic alerts /// - [JsonProperty(PropertyName = "classicAlertSettings")] - public ClassicAlertSettings ClassicAlertSettings { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "classicAlertSettings")] + public ClassicAlertSettings ClassicAlertSettings {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/MonitoringSummary.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/MonitoringSummary.cs index faf7a772da1e..018b57d6acd5 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/MonitoringSummary.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/MonitoringSummary.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,24 +23,33 @@ public MonitoringSummary() /// /// Initializes a new instance of the MonitoringSummary class. /// - /// Count of unhealthy VMs. - /// Count of unhealthy replication - /// providers. - /// Count of all critical warnings. - /// Count of all deprecated - /// recovery service providers. - /// Count of all the supported - /// recovery service providers. - /// Count of all the unsupported - /// recovery service providers. - public MonitoringSummary(int? unHealthyVmCount = default(int?), int? unHealthyProviderCount = default(int?), int? eventsCount = default(int?), int? deprecatedProviderCount = default(int?), int? supportedProviderCount = default(int?), int? unsupportedProviderCount = default(int?)) + + /// Count of unhealthy VMs. + /// + + /// Count of unhealthy replication providers. + /// + + /// Count of all critical warnings. + /// + + /// Count of all deprecated recovery service providers. + /// + + /// Count of all the supported recovery service providers. + /// + + /// Count of all the unsupported recovery service providers. + /// + public MonitoringSummary(int? unHealthyVMCount = default(int?), int? unHealthyProviderCount = default(int?), int? eventsCount = default(int?), int? deprecatedProviderCount = default(int?), int? supportedProviderCount = default(int?), int? unsupportedProviderCount = default(int?)) + { - UnHealthyVmCount = unHealthyVmCount; - UnHealthyProviderCount = unHealthyProviderCount; - EventsCount = eventsCount; - DeprecatedProviderCount = deprecatedProviderCount; - SupportedProviderCount = supportedProviderCount; - UnsupportedProviderCount = unsupportedProviderCount; + this.UnHealthyVMCount = unHealthyVMCount; + this.UnHealthyProviderCount = unHealthyProviderCount; + this.EventsCount = eventsCount; + this.DeprecatedProviderCount = deprecatedProviderCount; + this.SupportedProviderCount = supportedProviderCount; + this.UnsupportedProviderCount = unsupportedProviderCount; CustomInit(); } @@ -55,42 +58,41 @@ public MonitoringSummary() /// partial void CustomInit(); + /// /// Gets or sets count of unhealthy VMs. /// - [JsonProperty(PropertyName = "unHealthyVmCount")] - public int? UnHealthyVmCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "unHealthyVmCount")] + public int? UnHealthyVMCount {get; set; } /// /// Gets or sets count of unhealthy replication providers. /// - [JsonProperty(PropertyName = "unHealthyProviderCount")] - public int? UnHealthyProviderCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "unHealthyProviderCount")] + public int? UnHealthyProviderCount {get; set; } /// /// Gets or sets count of all critical warnings. /// - [JsonProperty(PropertyName = "eventsCount")] - public int? EventsCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "eventsCount")] + public int? EventsCount {get; set; } /// /// Gets or sets count of all deprecated recovery service providers. /// - [JsonProperty(PropertyName = "deprecatedProviderCount")] - public int? DeprecatedProviderCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "deprecatedProviderCount")] + public int? DeprecatedProviderCount {get; set; } /// /// Gets or sets count of all the supported recovery service providers. /// - [JsonProperty(PropertyName = "supportedProviderCount")] - public int? SupportedProviderCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "supportedProviderCount")] + public int? SupportedProviderCount {get; set; } /// - /// Gets or sets count of all the unsupported recovery service - /// providers. + /// Gets or sets count of all the unsupported recovery service providers. /// - [JsonProperty(PropertyName = "unsupportedProviderCount")] - public int? UnsupportedProviderCount { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "unsupportedProviderCount")] + public int? UnsupportedProviderCount {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/NameInfo.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/NameInfo.cs index 710918fdb27b..09f421935b84 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/NameInfo.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/NameInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,12 +23,17 @@ public NameInfo() /// /// Initializes a new instance of the NameInfo class. /// - /// Value of usage. - /// Localized value of usage. + + /// Value of usage. + /// + + /// Localized value of usage. + /// public NameInfo(string value = default(string), string localizedValue = default(string)) + { - Value = value; - LocalizedValue = localizedValue; + this.Value = value; + this.LocalizedValue = localizedValue; CustomInit(); } @@ -43,17 +42,17 @@ public NameInfo() /// partial void CustomInit(); + /// /// Gets or sets value of usage. /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public string Value {get; set; } /// /// Gets or sets localized value of usage. /// - [JsonProperty(PropertyName = "localizedValue")] - public string LocalizedValue { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "localizedValue")] + public string LocalizedValue {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/OperationResource.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/OperationResource.cs index fe6ae3969b02..ba9277a820ae 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/OperationResource.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/OperationResource.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,26 +23,36 @@ public OperationResource() /// /// Initializes a new instance of the OperationResource class. /// - /// End time of the operation - /// Required if status == failed or status == - /// canceled. This is the OData v4 error format, used by the RPC and - /// will go into the v2.2 Azure REST API guidelines. - /// It should match what is used to GET the operation - /// result - /// It must match the last segment of the "id" - /// field, and will typically be a GUID / system generated - /// value - /// The status of the operation. - /// (InProgress/Success/Failed/Cancelled) - /// Start time of the operation + + /// End time of the operation + /// + + /// Required if status == failed or status == canceled. This is the OData v4 + /// error format, used by the RPC and will go into the v2.2 Azure REST API + /// guidelines. + /// + + /// It should match what is used to GET the operation result + /// + + /// It must match the last segment of the "id" field, and will typically be a + /// GUID / system generated value + /// + + /// The status of the operation. (InProgress/Success/Failed/Cancelled) + /// + + /// Start time of the operation + /// public OperationResource(System.DateTime? endTime = default(System.DateTime?), Error error = default(Error), string id = default(string), string name = default(string), string status = default(string), System.DateTime? startTime = default(System.DateTime?)) + { - EndTime = endTime; - Error = error; - Id = id; - Name = name; - Status = status; - StartTime = startTime; + this.EndTime = endTime; + this.Error = error; + this.Id = id; + this.Name = name; + this.Status = status; + this.StartTime = startTime; CustomInit(); } @@ -57,46 +61,45 @@ public OperationResource() /// partial void CustomInit(); + /// /// Gets or sets end time of the operation /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// - /// Gets or sets required if status == failed or status == canceled. - /// This is the OData v4 error format, used by the RPC and will go into - /// the v2.2 Azure REST API guidelines. + /// Gets or sets required if status == failed or status == canceled. This is + /// the OData v4 error format, used by the RPC and will go into the v2.2 Azure + /// REST API guidelines. /// - [JsonProperty(PropertyName = "error")] - public Error Error { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public Error Error {get; set; } /// - /// Gets or sets it should match what is used to GET the operation - /// result + /// Gets or sets it should match what is used to GET the operation result /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// - /// Gets or sets it must match the last segment of the "id" field, and - /// will typically be a GUID / system generated value + /// Gets or sets it must match the last segment of the "id" field, and will + /// typically be a GUID / system generated value /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the status of the operation. /// (InProgress/Success/Failed/Cancelled) /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets start time of the operation /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Page.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Page.cs index 78d0b96806d0..0ecc85c86915 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Page.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Page.cs @@ -1,53 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; /// /// Defines a page in Azure responses. /// /// Type of the page content items - [JsonObject] - public class Page : IPage + [Newtonsoft.Json.JsonObject] + public class Page : Microsoft.Rest.Azure.IPage { - /// - /// Gets the link to the next page. - /// - [JsonProperty("")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Page1.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Page1.cs index ff74648fba2a..be3bc41b53b1 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Page1.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Page1.cs @@ -1,53 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; /// /// Defines a page in Azure responses. /// /// Type of the page content items - [JsonObject] - public class Page1 : IPage + [Newtonsoft.Json.JsonObject] + public class Page1 : Microsoft.Rest.Azure.IPage { - /// - /// Gets the link to the next page. - /// - [JsonProperty("nextLink")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("nextLink")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PatchTrackedResource.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PatchTrackedResource.cs index cb5c535ac08a..8d6c48747a21 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PatchTrackedResource.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PatchTrackedResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -31,20 +23,31 @@ public PatchTrackedResource() /// /// 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) + + /// 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), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, etag) { - Location = location; - Tags = tags; + this.Location = location; + this.Tags = tags; CustomInit(); } @@ -53,17 +56,17 @@ public PatchTrackedResource() /// partial void CustomInit(); + /// /// Gets or sets resource location. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets resource tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PatchVault.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PatchVault.cs index 1753d6e798a8..9e9a427a917a 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PatchVault.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PatchVault.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -31,21 +23,41 @@ public PatchVault() /// /// 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), IdentityData identity = default(IdentityData)) - : base(id, name, type, etag, location, tags) + + /// 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. + /// + + /// Properties of the vault. + /// + + /// Identifies the unique system identifier for each Azure resource. + /// + + /// Identity for the resource. + /// + public PatchVault(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), VaultProperties properties = default(VaultProperties), Sku sku = default(Sku), IdentityData identity = default(IdentityData)) + + : base(id, name, type, etag, location, tags) { - Properties = properties; - Sku = sku; - Identity = identity; + this.Properties = properties; + this.Sku = sku; + this.Identity = identity; CustomInit(); } @@ -54,37 +66,42 @@ public PatchVault() /// partial void CustomInit(); + /// + /// Gets or sets properties of the vault. /// - [JsonProperty(PropertyName = "properties")] - public VaultProperties Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public VaultProperties Properties {get; set; } /// + /// Gets or sets identifies the unique system identifier for each Azure + /// resource. /// - [JsonProperty(PropertyName = "sku")] - public Sku Sku { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sku")] + public Sku Sku {get; set; } /// + /// Gets or sets identity for the resource. /// - [JsonProperty(PropertyName = "identity")] - public IdentityData Identity { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] + public IdentityData Identity {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Sku != null) + + if (this.Sku != null) { - Sku.Validate(); + this.Sku.Validate(); } - if (Identity != null) + if (this.Identity != null) { - Identity.Validate(); + this.Identity.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpoint.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpoint.cs index e6750d807ed3..a4ded7b55970 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpoint.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -30,10 +24,13 @@ public PrivateEndpoint() /// /// Initializes a new instance of the PrivateEndpoint class. /// - /// Gets or sets id. + + /// Gets or sets id. + /// public PrivateEndpoint(string id = default(string)) + { - Id = id; + this.Id = id; CustomInit(); } @@ -42,11 +39,11 @@ public PrivateEndpoint() /// partial void CustomInit(); + /// - /// Gets or sets id. + /// Gets gets or sets id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnection.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnection.cs index 4eccc7903331..c9915ec3a34f 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnection.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnection.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -31,16 +23,26 @@ public PrivateEndpointConnection() /// /// 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' - /// Group Ids for the Private Endpoint - public PrivateEndpointConnection(string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState), IList groupIds = default(IList)) + + /// Gets or sets provisioning state of the private endpoint connection. + /// Possible values include: 'Succeeded', 'Deleting', 'Failed', 'Pending' + + /// The Private Endpoint network resource that is linked to the Private + /// Endpoint connection. + /// + + /// Gets or sets private link service connection state. + /// + + /// Group Ids for the Private Endpoint + /// + public PrivateEndpointConnection(string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState), System.Collections.Generic.IList groupIds = default(System.Collections.Generic.IList)) + { - ProvisioningState = provisioningState; - PrivateEndpoint = privateEndpoint; - PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; - GroupIds = groupIds; + this.ProvisioningState = provisioningState; + this.PrivateEndpoint = privateEndpoint; + this.PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + this.GroupIds = groupIds; CustomInit(); } @@ -49,29 +51,30 @@ public PrivateEndpointConnection() /// partial void CustomInit(); + /// - /// Gets or sets provisioning state of the private endpoint connection. - /// Possible values include: 'Succeeded', 'Deleting', 'Failed', - /// 'Pending' + /// Gets 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; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } /// + /// Gets the Private Endpoint network resource that is linked to the Private + /// Endpoint connection. /// - [JsonProperty(PropertyName = "privateEndpoint")] - public PrivateEndpoint PrivateEndpoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpoint")] + public PrivateEndpoint PrivateEndpoint {get; private set; } /// + /// Gets gets or sets private link service connection state. /// - [JsonProperty(PropertyName = "privateLinkServiceConnectionState")] - public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState {get; private set; } /// /// Gets or sets group Ids for the Private Endpoint /// - [JsonProperty(PropertyName = "groupIds")] - public IList GroupIds { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "groupIds")] + public System.Collections.Generic.IList GroupIds {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnectionStatus.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnectionStatus.cs index 200d7ebed4f8..1a9bef5b857f 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnectionStatus.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnectionStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for PrivateEndpointConnectionStatus. /// + + public static class PrivateEndpointConnectionStatus { public const string Pending = "Pending"; @@ -21,4 +18,4 @@ public static class PrivateEndpointConnectionStatus public const string Rejected = "Rejected"; public const string Disconnected = "Disconnected"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnectionVaultProperties.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnectionVaultProperties.cs index fe5d2f69d996..738c7f10553e 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnectionVaultProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateEndpointConnectionVaultProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class PrivateEndpointConnectionVaultProperties { /// - /// Initializes a new instance of the - /// PrivateEndpointConnectionVaultProperties class. + /// Initializes a new instance of the PrivateEndpointConnectionVaultProperties class. /// public PrivateEndpointConnectionVaultProperties() { @@ -29,24 +22,33 @@ public PrivateEndpointConnectionVaultProperties() } /// - /// Initializes a new instance of the - /// PrivateEndpointConnectionVaultProperties class. + /// Initializes a new instance of the PrivateEndpointConnectionVaultProperties class. /// + /// Format of id - /// subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.[Service]/{resource}/{resourceName}/privateEndpointConnections/{connectionName}. - /// The name of the private Endpoint - /// Connection + /// subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.[Service]/{resource}/{resourceName}/privateEndpointConnections/{connectionName}. + /// + + /// Private Endpoint Connection Response Properties. + /// + + /// The name of the private Endpoint Connection + /// + /// The type, which will be of the format, - /// Microsoft.RecoveryServices/vaults/privateEndpointConnections - /// The location of the private Endpoint - /// connection + /// Microsoft.RecoveryServices/vaults/privateEndpointConnections + /// + + /// The location of the private Endpoint connection + /// public PrivateEndpointConnectionVaultProperties(string id = default(string), PrivateEndpointConnection properties = default(PrivateEndpointConnection), string name = default(string), string type = default(string), string location = default(string)) + { - Id = id; - Properties = properties; - Name = name; - Type = type; - Location = location; + this.Id = id; + this.Properties = properties; + this.Name = name; + this.Type = type; + this.Location = location; CustomInit(); } @@ -55,36 +57,37 @@ public PrivateEndpointConnectionVaultProperties() /// 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; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// + /// Gets private Endpoint Connection Response Properties. /// - [JsonProperty(PropertyName = "properties")] - public PrivateEndpointConnection Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public PrivateEndpointConnection Properties {get; private set; } /// /// Gets the name of the private Endpoint Connection /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the type, which will be of the format, /// Microsoft.RecoveryServices/vaults/privateEndpointConnections /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets the location of the private Endpoint connection /// - [JsonProperty(PropertyName = "location")] - public string Location { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkResource.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkResource.cs index 8f5e9546e9b2..3bdca8f60e04 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkResource.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkResource.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class PrivateLinkResource { /// @@ -34,26 +24,34 @@ public PrivateLinkResource() /// /// 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)) + + /// Fully qualified identifier of the resource. + /// + + /// Name of the resource. + /// + + /// e.g. Microsoft.RecoveryServices/vaults/privateLinkResources + /// + + /// 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. + /// + public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string groupId = default(string), System.Collections.Generic.IList requiredMembers = default(System.Collections.Generic.IList), System.Collections.Generic.IList requiredZoneNames = default(System.Collections.Generic.IList)) + { - GroupId = groupId; - RequiredMembers = requiredMembers; - RequiredZoneNames = requiredZoneNames; - Id = id; - Name = name; - Type = type; + this.Id = id; + this.Name = name; + this.Type = type; + this.GroupId = groupId; + this.RequiredMembers = requiredMembers; + this.RequiredZoneNames = requiredZoneNames; CustomInit(); } @@ -62,43 +60,42 @@ public PrivateLinkResource() /// partial void CustomInit(); + /// - /// Gets e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or - /// f9ad6492-33d4-4690-9999-6bfd52a0d082 (SiteRecovery) + /// Gets fully qualified identifier of the resource. /// - [JsonProperty(PropertyName = "properties.groupId")] - public string GroupId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// - /// Gets [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, - /// backup-id1] + /// Gets name of the resource. /// - [JsonProperty(PropertyName = "properties.requiredMembers")] - public IList RequiredMembers { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// - /// Gets the private link resource Private link DNS zone name. + /// Gets e.g. Microsoft.RecoveryServices/vaults/privateLinkResources /// - [JsonProperty(PropertyName = "properties.requiredZoneNames")] - public IList RequiredZoneNames { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// - /// Gets fully qualified identifier of the resource. + /// Gets e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or + /// f9ad6492-33d4-4690-9999-6bfd52a0d082 (SiteRecovery) /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.groupId")] + public string GroupId {get; private set; } /// - /// Gets name of the resource. + /// Gets [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, backup-id1] /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.requiredMembers")] + public System.Collections.Generic.IList RequiredMembers {get; private set; } /// - /// Gets e.g. Microsoft.RecoveryServices/vaults/privateLinkResources + /// Gets the private link resource Private link DNS zone name. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.requiredZoneNames")] + public System.Collections.Generic.IList RequiredZoneNames {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkResourceProperties.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkResourceProperties.cs new file mode 100644 index 000000000000..bf7f1034427d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkResourceProperties.cs @@ -0,0 +1,70 @@ +// 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 System.Linq; + + /// + /// Properties of the private link resource. + /// + public partial class PrivateLinkResourceProperties + { + /// + /// Initializes a new instance of the PrivateLinkResourceProperties class. + /// + public PrivateLinkResourceProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkResourceProperties 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. + /// + public PrivateLinkResourceProperties(string groupId = default(string), System.Collections.Generic.IList requiredMembers = default(System.Collections.Generic.IList), System.Collections.Generic.IList requiredZoneNames = default(System.Collections.Generic.IList)) + + { + this.GroupId = groupId; + this.RequiredMembers = requiredMembers; + this.RequiredZoneNames = requiredZoneNames; + 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) + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupId")] + public string GroupId {get; private set; } + + /// + /// Gets [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, backup-id1] + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "requiredMembers")] + public System.Collections.Generic.IList RequiredMembers {get; private set; } + + /// + /// Gets the private link resource Private link DNS zone name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "requiredZoneNames")] + public System.Collections.Generic.IList RequiredZoneNames {get; private set; } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs index 6e3100e1c51f..a048fe236ec4 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class PrivateLinkServiceConnectionState { /// - /// Initializes a new instance of the PrivateLinkServiceConnectionState - /// class. + /// Initializes a new instance of the PrivateLinkServiceConnectionState class. /// public PrivateLinkServiceConnectionState() { @@ -28,19 +21,23 @@ public PrivateLinkServiceConnectionState() } /// - /// Initializes a new instance of the PrivateLinkServiceConnectionState - /// class. + /// 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. + + /// 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; + this.Status = status; + this.Description = description; + this.ActionsRequired = actionsRequired; CustomInit(); } @@ -49,24 +46,23 @@ public PrivateLinkServiceConnectionState() /// partial void CustomInit(); + /// - /// Gets or sets the status. Possible values include: 'Pending', - /// 'Approved', 'Rejected', 'Disconnected' + /// Gets gets or sets the status. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; private set; } /// - /// Gets or sets description. + /// Gets gets or sets description. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; private set; } /// - /// Gets or sets actions required. + /// Gets gets or sets actions required. /// - [JsonProperty(PropertyName = "actionsRequired")] - public string ActionsRequired { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "actionsRequired")] + public string ActionsRequired {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ProvisioningState.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ProvisioningState.cs index 95b72ba9f692..ab8f714ae42b 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ProvisioningState.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ProvisioningState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for ProvisioningState. /// + + public static class ProvisioningState { public const string Succeeded = "Succeeded"; @@ -21,4 +18,4 @@ public static class ProvisioningState public const string Failed = "Failed"; public const string Pending = "Pending"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PublicNetworkAccess.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PublicNetworkAccess.cs index 6e8798015ac9..a9584db741e6 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PublicNetworkAccess.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/PublicNetworkAccess.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for PublicNetworkAccess. /// + + public static class PublicNetworkAccess { public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/RawCertificateData.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/RawCertificateData.cs index 2f3c1a947420..282487bd6b46 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/RawCertificateData.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/RawCertificateData.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,15 +23,18 @@ public RawCertificateData() /// /// Initializes a new instance of the RawCertificateData class. /// - /// Specifies the authentication type. Possible - /// values include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', + + /// Specifies the authentication type. + /// Possible values include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', /// 'AzureActiveDirectory' - /// The base64 encoded certificate raw data - /// string + + /// The base64 encoded certificate raw data string + /// public RawCertificateData(string authType = default(string), byte[] certificate = default(byte[])) + { - AuthType = authType; - Certificate = certificate; + this.AuthType = authType; + this.Certificate = certificate; CustomInit(); } @@ -46,19 +43,17 @@ public RawCertificateData() /// partial void CustomInit(); + /// - /// Gets or sets specifies the authentication type. Possible values - /// include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', - /// 'AzureActiveDirectory' + /// Gets or sets specifies the authentication type. Possible values include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', 'AzureActiveDirectory' /// - [JsonProperty(PropertyName = "authType")] - public string AuthType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "authType")] + public string AuthType {get; set; } /// /// Gets or sets the base64 encoded certificate raw data string /// - [JsonProperty(PropertyName = "certificate")] - public byte[] Certificate { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "certificate")] + public byte[] Certificate {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ReplicationUsage.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ReplicationUsage.cs index fff27ae4ab0e..d96a2ec3094b 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ReplicationUsage.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ReplicationUsage.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,26 +23,33 @@ public ReplicationUsage() /// /// Initializes a new instance of the ReplicationUsage class. /// - /// Summary of the replication - /// monitoring data for this vault. - /// Summary of the replication jobs data for - /// this vault. - /// Number of replication protected - /// items for this vault. - /// Number of replication recovery - /// plans for this vault. - /// Number of servers registered - /// to this vault. - /// The authentication - /// type of recovery service providers in the vault. + + /// Summary of the replication monitoring data for this vault. + /// + + /// Summary of the replication jobs data for this vault. + /// + + /// Number of replication protected items for this vault. + /// + + /// Number of replication recovery plans for this vault. + /// + + /// Number of servers registered to this vault. + /// + + /// The authentication type of recovery service providers in the vault. + /// public ReplicationUsage(MonitoringSummary monitoringSummary = default(MonitoringSummary), JobsSummary jobsSummary = default(JobsSummary), int? protectedItemCount = default(int?), int? recoveryPlanCount = default(int?), int? registeredServersCount = default(int?), int? recoveryServicesProviderAuthType = default(int?)) + { - MonitoringSummary = monitoringSummary; - JobsSummary = jobsSummary; - ProtectedItemCount = protectedItemCount; - RecoveryPlanCount = recoveryPlanCount; - RegisteredServersCount = registeredServersCount; - RecoveryServicesProviderAuthType = recoveryServicesProviderAuthType; + this.MonitoringSummary = monitoringSummary; + this.JobsSummary = jobsSummary; + this.ProtectedItemCount = protectedItemCount; + this.RecoveryPlanCount = recoveryPlanCount; + this.RegisteredServersCount = registeredServersCount; + this.RecoveryServicesProviderAuthType = recoveryServicesProviderAuthType; CustomInit(); } @@ -57,43 +58,42 @@ public ReplicationUsage() /// partial void CustomInit(); + /// - /// Gets or sets summary of the replication monitoring data for this - /// vault. + /// Gets or sets summary of the replication monitoring data for this vault. /// - [JsonProperty(PropertyName = "monitoringSummary")] - public MonitoringSummary MonitoringSummary { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monitoringSummary")] + public MonitoringSummary MonitoringSummary {get; set; } /// /// Gets or sets summary of the replication jobs data for this vault. /// - [JsonProperty(PropertyName = "jobsSummary")] - public JobsSummary JobsSummary { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobsSummary")] + public JobsSummary JobsSummary {get; set; } /// /// Gets or sets number of replication protected items for this vault. /// - [JsonProperty(PropertyName = "protectedItemCount")] - public int? ProtectedItemCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemCount")] + public int? ProtectedItemCount {get; set; } /// /// Gets or sets number of replication recovery plans for this vault. /// - [JsonProperty(PropertyName = "recoveryPlanCount")] - public int? RecoveryPlanCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPlanCount")] + public int? RecoveryPlanCount {get; set; } /// /// Gets or sets number of servers registered to this vault. /// - [JsonProperty(PropertyName = "registeredServersCount")] - public int? RegisteredServersCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "registeredServersCount")] + public int? RegisteredServersCount {get; set; } /// - /// Gets or sets the authentication type of recovery service providers - /// in the vault. + /// Gets or sets the authentication type of recovery service providers in the + /// vault. /// - [JsonProperty(PropertyName = "recoveryServicesProviderAuthType")] - public int? RecoveryServicesProviderAuthType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryServicesProviderAuthType")] + public int? RecoveryServicesProviderAuthType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Resource.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Resource.cs index 7bc3d2e0b745..37f9403b5c15 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Resource.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Resource.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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.Azure; - using Newtonsoft.Json; using System.Linq; /// /// ARM Resource. /// - public partial class Resource : IResource + public partial class Resource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the Resource class. @@ -31,19 +23,26 @@ public Resource() /// /// Initializes a new instance of the Resource 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 Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Optional ETag. + /// public Resource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + { - Id = id; - Name = name; - Type = type; - Etag = etag; + this.Id = id; + this.Name = name; + this.Type = type; + this.Etag = etag; CustomInit(); } @@ -52,30 +51,30 @@ public Resource() /// partial void CustomInit(); + /// /// Gets resource Id represents the complete path to the resource. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets resource name associated with the resource. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + 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; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets optional ETag. /// - [JsonProperty(PropertyName = "etag")] - public string Etag { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "etag")] + public string Etag {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCapabilities.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCapabilities.cs index 00b75c37c5f6..d53c39e6eb1e 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCapabilities.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCapabilities.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,12 +23,17 @@ public ResourceCapabilities() /// /// Initializes a new instance of the ResourceCapabilities class. /// - /// Describes the Resource type: - /// Microsoft.RecoveryServices/Vaults + + /// Describes the Resource type: Microsoft.RecoveryServices/Vaults + /// + + /// Capabilities information + /// public ResourceCapabilities(string type, CapabilitiesProperties properties = default(CapabilitiesProperties)) - : base(type) + + : base(type) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,20 +42,22 @@ public ResourceCapabilities() /// partial void CustomInit(); + /// + /// Gets or sets capabilities information /// - [JsonProperty(PropertyName = "properties")] - public CapabilitiesProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CapabilitiesProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public override void Validate() { base.Validate(); + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCapabilitiesBase.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCapabilitiesBase.cs index b222e508e498..ebff11d870dc 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCapabilitiesBase.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCapabilitiesBase.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -31,11 +24,13 @@ public ResourceCapabilitiesBase() /// /// Initializes a new instance of the ResourceCapabilitiesBase class. /// - /// Describes the Resource type: - /// Microsoft.RecoveryServices/Vaults + + /// Describes the Resource type: Microsoft.RecoveryServices/Vaults + /// public ResourceCapabilitiesBase(string type) + { - Type = type; + this.Type = type; CustomInit(); } @@ -44,25 +39,25 @@ public ResourceCapabilitiesBase(string type) /// partial void CustomInit(); + /// - /// Gets or sets describes the Resource type: - /// Microsoft.RecoveryServices/Vaults + /// Gets or sets describes the Resource type: Microsoft.RecoveryServices/Vaults /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Type == null) + if (this.Type == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Type"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateAndAadDetails.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateAndAadDetails.cs index 8b19257bd245..dd3b1fd14c27 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateAndAadDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateAndAadDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class ResourceCertificateAndAadDetails : ResourceCertificateDetails { /// - /// Initializes a new instance of the ResourceCertificateAndAadDetails - /// class. + /// Initializes a new instance of the ResourceCertificateAndAadDetails class. /// public ResourceCertificateAndAadDetails() { @@ -30,39 +22,64 @@ public ResourceCertificateAndAadDetails() } /// - /// Initializes a new instance of the ResourceCertificateAndAadDetails - /// class. + /// Initializes a new instance of the ResourceCertificateAndAadDetails class. /// - /// AAD tenant authority. - /// AAD tenant Id. - /// AAD service principal - /// clientId. - /// AAD service principal - /// ObjectId. - /// Azure Management - /// Endpoint Audience. - /// The base64 encoded certificate raw data - /// string. - /// Certificate friendly name. - /// Certificate issuer. - /// Resource ID of the vault. - /// Certificate Subject Name. - /// Certificate thumbprint. - /// Certificate Validity start Date - /// time. - /// Certificate Validity End Date time. - /// Service Resource Id. - /// AAD audience for the resource + + /// The base64 encoded certificate raw data string. + /// + + /// Certificate friendly name. + /// + + /// Certificate issuer. + /// + + /// Resource ID of the vault. + /// + + /// Certificate Subject Name. + /// + + /// Certificate thumbprint. + /// + + /// Certificate Validity start Date time. + /// + + /// Certificate Validity End Date time. + /// + + /// AAD tenant authority. + /// + + /// AAD tenant Id. + /// + + /// AAD service principal clientId. + /// + + /// AAD service principal ObjectId. + /// + + /// Azure Management Endpoint Audience. + /// + + /// Service Resource Id. + /// + + /// AAD audience for the resource + /// public ResourceCertificateAndAadDetails(string aadAuthority, string aadTenantId, string servicePrincipalClientId, string servicePrincipalObjectId, string azureManagementEndpointAudience, byte[] certificate = default(byte[]), string friendlyName = default(string), string issuer = default(string), long? resourceId = default(long?), string subject = default(string), string thumbprint = default(string), System.DateTime? validFrom = default(System.DateTime?), System.DateTime? validTo = default(System.DateTime?), string serviceResourceId = default(string), string aadAudience = default(string)) - : base(certificate, friendlyName, issuer, resourceId, subject, thumbprint, validFrom, validTo) + + : base(certificate, friendlyName, issuer, resourceId, subject, thumbprint, validFrom, validTo) { - AadAuthority = aadAuthority; - AadTenantId = aadTenantId; - ServicePrincipalClientId = servicePrincipalClientId; - ServicePrincipalObjectId = servicePrincipalObjectId; - AzureManagementEndpointAudience = azureManagementEndpointAudience; - ServiceResourceId = serviceResourceId; - AadAudience = aadAudience; + this.AadAuthority = aadAuthority; + this.AadTenantId = aadTenantId; + this.ServicePrincipalClientId = servicePrincipalClientId; + this.ServicePrincipalObjectId = servicePrincipalObjectId; + this.AzureManagementEndpointAudience = azureManagementEndpointAudience; + this.ServiceResourceId = serviceResourceId; + this.AadAudience = aadAudience; CustomInit(); } @@ -71,76 +88,83 @@ public ResourceCertificateAndAadDetails() /// partial void CustomInit(); + /// - /// Gets or sets AAD tenant authority. + /// Gets or sets aAD tenant authority. /// - [JsonProperty(PropertyName = "aadAuthority")] - public string AadAuthority { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "aadAuthority")] + public string AadAuthority {get; set; } /// - /// Gets or sets AAD tenant Id. + /// Gets or sets aAD tenant Id. /// - [JsonProperty(PropertyName = "aadTenantId")] - public string AadTenantId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "aadTenantId")] + public string AadTenantId {get; set; } /// - /// Gets or sets AAD service principal clientId. + /// Gets or sets aAD service principal clientId. /// - [JsonProperty(PropertyName = "servicePrincipalClientId")] - public string ServicePrincipalClientId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "servicePrincipalClientId")] + public string ServicePrincipalClientId {get; set; } /// - /// Gets or sets AAD service principal ObjectId. + /// Gets or sets aAD service principal ObjectId. /// - [JsonProperty(PropertyName = "servicePrincipalObjectId")] - public string ServicePrincipalObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "servicePrincipalObjectId")] + public string ServicePrincipalObjectId {get; set; } /// /// Gets or sets azure Management Endpoint Audience. /// - [JsonProperty(PropertyName = "azureManagementEndpointAudience")] - public string AzureManagementEndpointAudience { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureManagementEndpointAudience")] + public string AzureManagementEndpointAudience {get; set; } /// /// Gets or sets service Resource Id. /// - [JsonProperty(PropertyName = "serviceResourceId")] - public string ServiceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceResourceId")] + public string ServiceResourceId {get; set; } /// - /// Gets or sets AAD audience for the resource + /// Gets or sets aAD audience for the resource /// - [JsonProperty(PropertyName = "aadAudience")] - public string AadAudience { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "aadAudience")] + public string AadAudience {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (AadAuthority == null) + if (this.AadAuthority == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "AadAuthority"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AadAuthority"); } - if (AadTenantId == null) + if (this.AadTenantId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "AadTenantId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AadTenantId"); } - if (ServicePrincipalClientId == null) + if (this.ServicePrincipalClientId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalClientId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ServicePrincipalClientId"); } - if (ServicePrincipalObjectId == null) + if (this.ServicePrincipalObjectId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalObjectId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ServicePrincipalObjectId"); } - if (AzureManagementEndpointAudience == null) + if (this.AzureManagementEndpointAudience == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "AzureManagementEndpointAudience"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AzureManagementEndpointAudience"); } + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateAndAcsDetails.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateAndAcsDetails.cs index 0015fe09e96a..7cc2335392a8 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateAndAcsDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateAndAcsDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class ResourceCertificateAndAcsDetails : ResourceCertificateDetails { /// - /// Initializes a new instance of the ResourceCertificateAndAcsDetails - /// class. + /// Initializes a new instance of the ResourceCertificateAndAcsDetails class. /// public ResourceCertificateAndAcsDetails() { @@ -30,31 +22,48 @@ public ResourceCertificateAndAcsDetails() } /// - /// Initializes a new instance of the ResourceCertificateAndAcsDetails - /// class. + /// Initializes a new instance of the ResourceCertificateAndAcsDetails class. /// - /// ACS namespace name - tenant for - /// our service. - /// Acs mgmt host name to connect - /// to. - /// Global ACS namespace RP - /// realm. - /// The base64 encoded certificate raw data - /// string. - /// Certificate friendly name. - /// Certificate issuer. - /// Resource ID of the vault. - /// Certificate Subject Name. - /// Certificate thumbprint. - /// Certificate Validity start Date - /// time. - /// Certificate Validity End Date time. - public ResourceCertificateAndAcsDetails(string globalAcsNamespace, string globalAcsHostName, string globalAcsRPRealm, byte[] certificate = default(byte[]), string friendlyName = default(string), string issuer = default(string), long? resourceId = default(long?), string subject = default(string), string thumbprint = default(string), System.DateTime? validFrom = default(System.DateTime?), System.DateTime? validTo = default(System.DateTime?)) - : base(certificate, friendlyName, issuer, resourceId, subject, thumbprint, validFrom, validTo) + + /// The base64 encoded certificate raw data string. + /// + + /// Certificate friendly name. + /// + + /// Certificate issuer. + /// + + /// Resource ID of the vault. + /// + + /// Certificate Subject Name. + /// + + /// Certificate thumbprint. + /// + + /// Certificate Validity start Date time. + /// + + /// Certificate Validity End Date time. + /// + + /// ACS namespace name - tenant for our service. + /// + + /// Acs mgmt host name to connect to. + /// + + /// Global ACS namespace RP realm. + /// + public ResourceCertificateAndAcsDetails(string globalAcsNamespace, string globalAcsHostName, string globalAcsRpRealm, byte[] certificate = default(byte[]), string friendlyName = default(string), string issuer = default(string), long? resourceId = default(long?), string subject = default(string), string thumbprint = default(string), System.DateTime? validFrom = default(System.DateTime?), System.DateTime? validTo = default(System.DateTime?)) + + : base(certificate, friendlyName, issuer, resourceId, subject, thumbprint, validFrom, validTo) { - GlobalAcsNamespace = globalAcsNamespace; - GlobalAcsHostName = globalAcsHostName; - GlobalAcsRPRealm = globalAcsRPRealm; + this.GlobalAcsNamespace = globalAcsNamespace; + this.GlobalAcsHostName = globalAcsHostName; + this.GlobalAcsRpRealm = globalAcsRpRealm; CustomInit(); } @@ -63,44 +72,47 @@ public ResourceCertificateAndAcsDetails() /// partial void CustomInit(); + /// - /// Gets or sets ACS namespace name - tenant for our service. + /// Gets or sets aCS namespace name - tenant for our service. /// - [JsonProperty(PropertyName = "globalAcsNamespace")] - public string GlobalAcsNamespace { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "globalAcsNamespace")] + public string GlobalAcsNamespace {get; set; } /// /// Gets or sets acs mgmt host name to connect to. /// - [JsonProperty(PropertyName = "globalAcsHostName")] - public string GlobalAcsHostName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "globalAcsHostName")] + public string GlobalAcsHostName {get; set; } /// /// Gets or sets global ACS namespace RP realm. /// - [JsonProperty(PropertyName = "globalAcsRPRealm")] - public string GlobalAcsRPRealm { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "globalAcsRPRealm")] + public string GlobalAcsRpRealm {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (GlobalAcsNamespace == null) + if (this.GlobalAcsNamespace == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "GlobalAcsNamespace"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GlobalAcsNamespace"); } - if (GlobalAcsHostName == null) + if (this.GlobalAcsHostName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "GlobalAcsHostName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GlobalAcsHostName"); } - if (GlobalAcsRPRealm == null) + if (this.GlobalAcsRpRealm == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "GlobalAcsRPRealm"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GlobalAcsRpRealm"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateDetails.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateDetails.cs index 9d03aaa388da..b166469eb466 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceCertificateDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -30,26 +24,41 @@ public ResourceCertificateDetails() /// /// Initializes a new instance of the ResourceCertificateDetails class. /// - /// The base64 encoded certificate raw data - /// string. - /// Certificate friendly name. - /// Certificate issuer. - /// Resource ID of the vault. - /// Certificate Subject Name. - /// Certificate thumbprint. - /// Certificate Validity start Date - /// time. - /// Certificate Validity End Date time. + + /// The base64 encoded certificate raw data string. + /// + + /// Certificate friendly name. + /// + + /// Certificate issuer. + /// + + /// Resource ID of the vault. + /// + + /// Certificate Subject Name. + /// + + /// Certificate thumbprint. + /// + + /// Certificate Validity start Date time. + /// + + /// Certificate Validity End Date time. + /// public ResourceCertificateDetails(byte[] certificate = default(byte[]), string friendlyName = default(string), string issuer = default(string), long? resourceId = default(long?), string subject = default(string), string thumbprint = default(string), System.DateTime? validFrom = default(System.DateTime?), System.DateTime? validTo = default(System.DateTime?)) + { - Certificate = certificate; - FriendlyName = friendlyName; - Issuer = issuer; - ResourceId = resourceId; - Subject = subject; - Thumbprint = thumbprint; - ValidFrom = validFrom; - ValidTo = validTo; + this.Certificate = certificate; + this.FriendlyName = friendlyName; + this.Issuer = issuer; + this.ResourceId = resourceId; + this.Subject = subject; + this.Thumbprint = thumbprint; + this.ValidFrom = validFrom; + this.ValidTo = validTo; CustomInit(); } @@ -58,53 +67,53 @@ public ResourceCertificateDetails() /// partial void CustomInit(); + /// /// Gets or sets the base64 encoded certificate raw data string. /// - [JsonProperty(PropertyName = "certificate")] - public byte[] Certificate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "certificate")] + public byte[] Certificate {get; set; } /// /// Gets or sets certificate friendly name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets certificate issuer. /// - [JsonProperty(PropertyName = "issuer")] - public string Issuer { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "issuer")] + public string Issuer {get; set; } /// /// Gets or sets resource ID of the vault. /// - [JsonProperty(PropertyName = "resourceId")] - public long? ResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceId")] + public long? ResourceId {get; set; } /// /// Gets or sets certificate Subject Name. /// - [JsonProperty(PropertyName = "subject")] - public string Subject { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subject")] + public string Subject {get; set; } /// /// Gets or sets certificate thumbprint. /// - [JsonProperty(PropertyName = "thumbprint")] - public string Thumbprint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "thumbprint")] + public string Thumbprint {get; set; } /// /// Gets or sets certificate Validity start Date time. /// - [JsonProperty(PropertyName = "validFrom")] - public System.DateTime? ValidFrom { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "validFrom")] + public System.DateTime? ValidFrom {get; set; } /// /// Gets or sets certificate Validity End Date time. /// - [JsonProperty(PropertyName = "validTo")] - public System.DateTime? ValidTo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "validTo")] + public System.DateTime? ValidTo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceIdentityType.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceIdentityType.cs index b3c22e81e774..e77f6fb63d35 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceIdentityType.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceIdentityType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for ResourceIdentityType. /// + + public static class ResourceIdentityType { public const string SystemAssigned = "SystemAssigned"; @@ -21,4 +18,4 @@ public static class ResourceIdentityType public const string UserAssigned = "UserAssigned"; public const string SystemAssignedUserAssigned = "SystemAssigned, UserAssigned"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceMoveState.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceMoveState.cs index 4e0dc68e7048..4b722223ea95 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceMoveState.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/ResourceMoveState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for ResourceMoveState. /// + + public static class ResourceMoveState { public const string Unknown = "Unknown"; @@ -27,4 +24,4 @@ public static class ResourceMoveState public const string CriticalFailure = "CriticalFailure"; public const string PartialSuccess = "PartialSuccess"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/RestoreSettings.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/RestoreSettings.cs index 10c5eb0a3998..7609051f1a70 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/RestoreSettings.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/RestoreSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,11 +23,13 @@ public RestoreSettings() /// /// Initializes a new instance of the RestoreSettings class. /// - /// Settings for - /// CrossSubscriptionRestore + + /// Settings for CrossSubscriptionRestore + /// public RestoreSettings(CrossSubscriptionRestoreSettings crossSubscriptionRestoreSettings = default(CrossSubscriptionRestoreSettings)) + { - CrossSubscriptionRestoreSettings = crossSubscriptionRestoreSettings; + this.CrossSubscriptionRestoreSettings = crossSubscriptionRestoreSettings; CustomInit(); } @@ -42,11 +38,11 @@ public RestoreSettings() /// partial void CustomInit(); + /// /// Gets or sets settings for CrossSubscriptionRestore /// - [JsonProperty(PropertyName = "crossSubscriptionRestoreSettings")] - public CrossSubscriptionRestoreSettings CrossSubscriptionRestoreSettings { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "crossSubscriptionRestoreSettings")] + public CrossSubscriptionRestoreSettings CrossSubscriptionRestoreSettings {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SecuritySettings.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SecuritySettings.cs index f1fa9ac0949e..d60399f8cbec 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SecuritySettings.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SecuritySettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,11 +23,13 @@ public SecuritySettings() /// /// Initializes a new instance of the SecuritySettings class. /// - /// Immutability Settings of a - /// vault + + /// Immutability Settings of a vault + /// public SecuritySettings(ImmutabilitySettings immutabilitySettings = default(ImmutabilitySettings)) + { - ImmutabilitySettings = immutabilitySettings; + this.ImmutabilitySettings = immutabilitySettings; CustomInit(); } @@ -42,11 +38,11 @@ public SecuritySettings() /// partial void CustomInit(); + /// /// Gets or sets immutability Settings of a vault /// - [JsonProperty(PropertyName = "immutabilitySettings")] - public ImmutabilitySettings ImmutabilitySettings { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "immutabilitySettings")] + public ImmutabilitySettings ImmutabilitySettings {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Sku.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Sku.cs index ca57f56c96a0..911c7c492631 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Sku.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Sku.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -30,22 +23,31 @@ public Sku() /// /// Initializes a new instance of the Sku class. /// - /// Name of SKU is RS0 (Recovery Services 0th - /// version) and the tier is standard tier. They do not have affect on - /// backend storage redundancy or any other vault settings. To manage - /// storage redundancy, use the backupstorageconfig. Possible values - /// include: 'Standard', 'RS0' - /// The Sku tier. - /// The sku family - /// The sku size - /// The sku capacity + + /// Name of SKU is RS0 (Recovery Services 0th version) and the tier is standard + /// tier. They do not have affect on backend storage redundancy or any other + /// vault settings. To manage storage redundancy, use the backupstorageconfig + /// Possible values include: 'Standard', 'RS0' + + /// The Sku tier. + /// + + /// The sku family + /// + + /// The sku size + /// + + /// The sku capacity + /// public Sku(string name, string tier = default(string), string family = default(string), string size = default(string), string capacity = default(string)) + { - Name = name; - Tier = tier; - Family = family; - Size = size; - Capacity = capacity; + this.Name = name; + this.Tier = tier; + this.Family = family; + this.Size = size; + this.Capacity = capacity; CustomInit(); } @@ -54,52 +56,56 @@ public Sku() /// partial void CustomInit(); + /// - /// Gets or sets name of SKU is RS0 (Recovery Services 0th version) and - /// the tier is standard tier. They do not have affect on backend - /// storage redundancy or any other vault settings. To manage storage - /// redundancy, use the backupstorageconfig. Possible values include: - /// 'Standard', 'RS0' + /// Gets or sets name of SKU is RS0 (Recovery Services 0th version) and the + /// tier is standard tier. They do not have affect on backend storage + /// redundancy or any other vault settings. To manage storage redundancy, use + /// the backupstorageconfig Possible values include: 'Standard', 'RS0' /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the Sku tier. /// - [JsonProperty(PropertyName = "tier")] - public string Tier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tier")] + public string Tier {get; set; } /// /// Gets or sets the sku family /// - [JsonProperty(PropertyName = "family")] - public string Family { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "family")] + public string Family {get; set; } /// /// Gets or sets the sku size /// - [JsonProperty(PropertyName = "size")] - public string Size { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "size")] + public string Size {get; set; } /// /// Gets or sets the sku capacity /// - [JsonProperty(PropertyName = "capacity")] - public string Capacity { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "capacity")] + public string Capacity {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Name == null) + if (this.Name == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name"); } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SkuName.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SkuName.cs index 0762af8428ab..70ba9324da0d 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SkuName.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SkuName.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for SkuName. /// + + public static class SkuName { public const string Standard = "Standard"; public const string RS0 = "RS0"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/StandardTierStorageRedundancy.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/StandardTierStorageRedundancy.cs index a7647d3e78aa..7cc475a36932 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/StandardTierStorageRedundancy.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/StandardTierStorageRedundancy.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for StandardTierStorageRedundancy. /// + + public static class StandardTierStorageRedundancy { public const string LocallyRedundant = "LocallyRedundant"; public const string GeoRedundant = "GeoRedundant"; public const string ZoneRedundant = "ZoneRedundant"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SystemData.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SystemData.cs index a9cd2f2a86c7..0f7aa5b4a21e 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SystemData.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/SystemData.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,28 +23,33 @@ public SystemData() /// /// Initializes a new instance of the SystemData class. /// - /// The identity that created the - /// resource. - /// The type of identity that created the - /// resource. Possible values include: 'User', 'Application', - /// 'ManagedIdentity', 'Key' - /// The timestamp of resource creation - /// (UTC). - /// The identity that last modified the - /// resource. - /// The type of identity that last - /// modified the resource. Possible values include: 'User', - /// 'Application', 'ManagedIdentity', 'Key' - /// The type of identity that last - /// modified the resource. + + /// The identity that created the resource. + /// + + /// The type of identity that created the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + + /// The timestamp of resource creation (UTC). + /// + + /// The identity that last modified the resource. + /// + + /// The type of identity that last modified the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + + /// The type of identity that last modified the resource. + /// public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) + { - CreatedBy = createdBy; - CreatedByType = createdByType; - CreatedAt = createdAt; - LastModifiedBy = lastModifiedBy; - LastModifiedByType = lastModifiedByType; - LastModifiedAt = lastModifiedAt; + this.CreatedBy = createdBy; + this.CreatedByType = createdByType; + this.CreatedAt = createdAt; + this.LastModifiedBy = lastModifiedBy; + this.LastModifiedByType = lastModifiedByType; + this.LastModifiedAt = lastModifiedAt; CustomInit(); } @@ -59,45 +58,41 @@ public SystemData() /// partial void CustomInit(); + /// /// Gets or sets the identity that created the resource. /// - [JsonProperty(PropertyName = "createdBy")] - public string CreatedBy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdBy")] + public string CreatedBy {get; set; } /// - /// Gets or sets the type of identity that created the resource. - /// Possible values include: 'User', 'Application', 'ManagedIdentity', - /// 'Key' + /// Gets or sets the type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' /// - [JsonProperty(PropertyName = "createdByType")] - public string CreatedByType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdByType")] + public string CreatedByType {get; set; } /// /// Gets or sets the timestamp of resource creation (UTC). /// - [JsonProperty(PropertyName = "createdAt")] - public System.DateTime? CreatedAt { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt {get; set; } /// /// Gets or sets the identity that last modified the resource. /// - [JsonProperty(PropertyName = "lastModifiedBy")] - public string LastModifiedBy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy {get; set; } /// - /// Gets or sets the type of identity that last modified the resource. - /// Possible values include: 'User', 'Application', 'ManagedIdentity', - /// 'Key' + /// Gets or sets the type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' /// - [JsonProperty(PropertyName = "lastModifiedByType")] - public string LastModifiedByType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType {get; set; } /// /// Gets or sets the type of identity that last modified the resource. /// - [JsonProperty(PropertyName = "lastModifiedAt")] - public System.DateTime? LastModifiedAt { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/TrackedResource.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/TrackedResource.cs index 9ea6761dd486..09a41444aeaf 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/TrackedResource.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/TrackedResource.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,20 +23,31 @@ public TrackedResource() /// /// Initializes a new instance of the TrackedResource class. /// - /// Resource location. - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Optional ETag. - /// Resource tags. - public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), string etag = default(string), IDictionary tags = default(IDictionary)) - : base(id, name, type, etag) + + /// 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 TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), string etag = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, etag) { - Location = location; - Tags = tags; + this.Location = location; + this.Tags = tags; CustomInit(); } @@ -54,30 +56,32 @@ public TrackedResource() /// partial void CustomInit(); + /// /// Gets or sets resource location. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets resource tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Location == null) + if (this.Location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Location"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/TriggerType.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/TriggerType.cs index f327961eec85..a44b8f022e18 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/TriggerType.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/TriggerType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for TriggerType. /// + + public static class TriggerType { public const string UserTriggered = "UserTriggered"; public const string ForcedUpgrade = "ForcedUpgrade"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UpgradeDetails.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UpgradeDetails.cs index 1c983bde08f4..650511cc663a 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UpgradeDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UpgradeDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,36 +23,45 @@ public UpgradeDetails() /// /// Initializes a new instance of the UpgradeDetails class. /// - /// ID of the vault upgrade - /// operation. - /// UTC time at which the upgrade operation - /// has started. - /// UTC time at which the upgrade - /// operation status was last updated. - /// UTC time at which the upgrade operation - /// has ended. + + /// ID of the vault upgrade operation. + /// + + /// UTC time at which the upgrade operation has started. + /// + + /// UTC time at which the upgrade operation status was last updated. + /// + + /// UTC time at which the upgrade operation has ended. + /// + /// Status of the vault upgrade operation. - /// Possible values include: 'Unknown', 'InProgress', 'Upgraded', - /// 'Failed' - /// Message to the user containing information - /// about the upgrade operation. + /// Possible values include: 'Unknown', 'InProgress', 'Upgraded', 'Failed' + + /// Message to the user containing information about the upgrade operation. + /// + /// The way the vault upgrade was triggered. /// Possible values include: 'UserTriggered', 'ForcedUpgrade' - /// Resource ID of the upgraded - /// vault. - /// Resource ID of the vault before - /// the upgrade. + + /// Resource ID of the upgraded vault. + /// + + /// Resource ID of the vault before the upgrade. + /// public UpgradeDetails(string operationId = default(string), System.DateTime? startTimeUtc = default(System.DateTime?), System.DateTime? lastUpdatedTimeUtc = default(System.DateTime?), System.DateTime? endTimeUtc = default(System.DateTime?), string status = default(string), string message = default(string), string triggerType = default(string), string upgradedResourceId = default(string), string previousResourceId = default(string)) + { - OperationId = operationId; - StartTimeUtc = startTimeUtc; - LastUpdatedTimeUtc = lastUpdatedTimeUtc; - EndTimeUtc = endTimeUtc; - Status = status; - Message = message; - TriggerType = triggerType; - UpgradedResourceId = upgradedResourceId; - PreviousResourceId = previousResourceId; + this.OperationId = operationId; + this.StartTimeUtc = startTimeUtc; + this.LastUpdatedTimeUtc = lastUpdatedTimeUtc; + this.EndTimeUtc = endTimeUtc; + this.Status = status; + this.Message = message; + this.TriggerType = triggerType; + this.UpgradedResourceId = upgradedResourceId; + this.PreviousResourceId = previousResourceId; CustomInit(); } @@ -67,63 +70,60 @@ public UpgradeDetails() /// partial void CustomInit(); + /// - /// Gets ID of the vault upgrade operation. + /// Gets iD of the vault upgrade operation. /// - [JsonProperty(PropertyName = "operationId")] - public string OperationId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operationId")] + public string OperationId {get; private set; } /// - /// Gets UTC time at which the upgrade operation has started. + /// Gets uTC time at which the upgrade operation has started. /// - [JsonProperty(PropertyName = "startTimeUtc")] - public System.DateTime? StartTimeUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTimeUtc")] + public System.DateTime? StartTimeUtc {get; private set; } /// - /// Gets UTC time at which the upgrade operation status was last - /// updated. + /// Gets uTC time at which the upgrade operation status was last updated. /// - [JsonProperty(PropertyName = "lastUpdatedTimeUtc")] - public System.DateTime? LastUpdatedTimeUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUpdatedTimeUtc")] + public System.DateTime? LastUpdatedTimeUtc {get; private set; } /// - /// Gets UTC time at which the upgrade operation has ended. + /// Gets uTC time at which the upgrade operation has ended. /// - [JsonProperty(PropertyName = "endTimeUtc")] - public System.DateTime? EndTimeUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTimeUtc")] + public System.DateTime? EndTimeUtc {get; private set; } /// - /// Gets status of the vault upgrade operation. Possible values - /// include: 'Unknown', 'InProgress', 'Upgraded', 'Failed' + /// Gets status of the vault upgrade operation. Possible values include: 'Unknown', 'InProgress', 'Upgraded', 'Failed' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; private set; } /// /// Gets message to the user containing information about the upgrade /// operation. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; private set; } /// - /// Gets the way the vault upgrade was triggered. Possible values - /// include: 'UserTriggered', 'ForcedUpgrade' + /// Gets the way the vault upgrade was triggered. Possible values include: 'UserTriggered', 'ForcedUpgrade' /// - [JsonProperty(PropertyName = "triggerType")] - public string TriggerType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "triggerType")] + public string TriggerType {get; private set; } /// /// Gets resource ID of the upgraded vault. /// - [JsonProperty(PropertyName = "upgradedResourceId")] - public string UpgradedResourceId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "upgradedResourceId")] + public string UpgradedResourceId {get; private set; } /// /// Gets resource ID of the vault before the upgrade. /// - [JsonProperty(PropertyName = "previousResourceId")] - public string PreviousResourceId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "previousResourceId")] + public string PreviousResourceId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UsagesUnit.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UsagesUnit.cs index 0adfc9a0b1c9..522b3221bb01 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UsagesUnit.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UsagesUnit.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for UsagesUnit. /// + + public static class UsagesUnit { public const string Count = "Count"; @@ -23,4 +20,4 @@ public static class UsagesUnit public const string CountPerSecond = "CountPerSecond"; public const string BytesPerSecond = "BytesPerSecond"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UserIdentity.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UserIdentity.cs index d59a11306bbd..2ddc5758da03 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UserIdentity.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/UserIdentity.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,14 +23,17 @@ public UserIdentity() /// /// Initializes a new instance of the UserIdentity class. /// - /// The principal ID of the user-assigned - /// identity. - /// The client ID of the user-assigned - /// identity. + + /// The principal ID of the user-assigned identity. + /// + + /// The client ID of the user-assigned identity. + /// public UserIdentity(string principalId = default(string), string clientId = default(string)) + { - PrincipalId = principalId; - ClientId = clientId; + this.PrincipalId = principalId; + this.ClientId = clientId; CustomInit(); } @@ -45,17 +42,17 @@ public UserIdentity() /// partial void CustomInit(); + /// /// Gets the principal ID of the user-assigned identity. /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")] + public string PrincipalId {get; private set; } /// /// Gets the client ID of the user-assigned identity. /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "clientId")] + public string ClientId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Vault.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Vault.cs index 65191b68d14b..67de8c1dedb5 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Vault.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/Vault.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -31,22 +23,45 @@ public Vault() /// /// Initializes a new instance of the Vault class. /// - /// Resource location. - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Optional ETag. - /// Resource tags. - public 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), SystemData systemData = default(SystemData)) - : base(location, id, name, type, etag, tags) + + /// 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. + /// + + /// Identity for the resource. + /// + + /// Properties of the vault. + /// + + /// Identifies the unique system identifier for each Azure resource. + /// + + /// Metadata pertaining to creation and last modification of the resource. + /// + public Vault(string location, string id = default(string), string name = default(string), string type = default(string), string etag = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), IdentityData identity = default(IdentityData), VaultProperties properties = default(VaultProperties), Sku sku = default(Sku), SystemData systemData = default(SystemData)) + + : base(location, id, name, type, etag, tags) { - Identity = identity; - Properties = properties; - Sku = sku; - SystemData = systemData; + this.Identity = identity; + this.Properties = properties; + this.Sku = sku; + this.SystemData = systemData; CustomInit(); } @@ -55,43 +70,50 @@ public Vault() /// partial void CustomInit(); + /// + /// Gets or sets identity for the resource. /// - [JsonProperty(PropertyName = "identity")] - public IdentityData Identity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] + public IdentityData Identity {get; set; } /// + /// Gets or sets properties of the vault. /// - [JsonProperty(PropertyName = "properties")] - public VaultProperties Properties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public VaultProperties Properties {get; set; } /// + /// Gets or sets identifies the unique system identifier for each Azure + /// resource. /// - [JsonProperty(PropertyName = "sku")] - public Sku Sku { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sku")] + public Sku Sku {get; set; } /// + /// Gets metadata pertaining to creation and last modification of the resource. /// - [JsonProperty(PropertyName = "systemData")] - public SystemData SystemData { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "systemData")] + public SystemData SystemData {get; private set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public override void Validate() { base.Validate(); - if (Identity != null) + if (this.Identity != null) { - Identity.Validate(); + this.Identity.Validate(); } - if (Sku != null) + + if (this.Sku != null) { - Sku.Validate(); + this.Sku.Validate(); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultCertificateResponse.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultCertificateResponse.cs index aef05295282e..f9f89867122b 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultCertificateResponse.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultCertificateResponse.cs @@ -1,25 +1,17 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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.Azure; - using Newtonsoft.Json; using System.Linq; /// /// Certificate corresponding to a vault that can be used by clients to /// register themselves with the vault. /// - public partial class VaultCertificateResponse : IResource + public partial class VaultCertificateResponse : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the VaultCertificateResponse class. @@ -32,18 +24,26 @@ public VaultCertificateResponse() /// /// 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. + + /// 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. + /// + + /// Certificate details representing the Vault credentials. + /// 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; + this.Name = name; + this.Type = type; + this.Id = id; + this.Properties = properties; CustomInit(); } @@ -52,29 +52,30 @@ public VaultCertificateResponse() /// partial void CustomInit(); + /// /// Gets resource name associated with the resource. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + 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; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets resource Id represents the complete path to the resource. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// + /// Gets or sets certificate details representing the Vault credentials. /// - [JsonProperty(PropertyName = "properties")] - public ResourceCertificateDetails Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ResourceCertificateDetails Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultExtendedInfo.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultExtendedInfo.cs new file mode 100644 index 000000000000..c88e17800006 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultExtendedInfo.cs @@ -0,0 +1,78 @@ +// 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 System.Linq; + + /// + /// Vault extended information. + /// + public partial class VaultExtendedInfo + { + /// + /// Initializes a new instance of the VaultExtendedInfo class. + /// + public VaultExtendedInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VaultExtendedInfo class. + /// + + /// Integrity key. + /// + + /// Encryption key. + /// + + /// Encryption key thumbprint. + /// + + /// Algorithm for Vault ExtendedInfo + /// + public VaultExtendedInfo(string integrityKey = default(string), string encryptionKey = default(string), string encryptionKeyThumbprint = default(string), string algorithm = default(string)) + + { + this.IntegrityKey = integrityKey; + this.EncryptionKey = encryptionKey; + this.EncryptionKeyThumbprint = encryptionKeyThumbprint; + this.Algorithm = algorithm; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets integrity key. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "integrityKey")] + public string IntegrityKey {get; set; } + + /// + /// Gets or sets encryption key. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionKey")] + public string EncryptionKey {get; set; } + + /// + /// Gets or sets encryption key thumbprint. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionKeyThumbprint")] + public string EncryptionKeyThumbprint {get; set; } + + /// + /// Gets or sets algorithm for Vault ExtendedInfo + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "algorithm")] + public string Algorithm {get; set; } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultExtendedInfoResource.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultExtendedInfoResource.cs index ed3a622930b5..a1093b5575ee 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultExtendedInfoResource.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultExtendedInfoResource.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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.Linq; /// /// Vault extended information. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class VaultExtendedInfoResource : Resource { /// @@ -32,25 +24,39 @@ public VaultExtendedInfoResource() /// /// Initializes a new instance of the VaultExtendedInfoResource class. /// - /// Resource Id represents the complete path to the - /// resource. - /// Resource name associated with the - /// resource. - /// Resource type represents the complete path of - /// the form Namespace/ResourceType/ResourceType/... - /// Optional ETag. - /// Integrity key. - /// Encryption key. - /// Encryption key - /// thumbprint. - /// Algorithm for Vault ExtendedInfo + + /// Resource Id represents the complete path to the resource. + /// + + /// Resource name associated with the resource. + /// + + /// Resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... + /// + + /// Optional ETag. + /// + + /// Integrity key. + /// + + /// Encryption key. + /// + + /// Encryption key thumbprint. + /// + + /// Algorithm 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) + + : base(id, name, type, etag) { - IntegrityKey = integrityKey; - EncryptionKey = encryptionKey; - EncryptionKeyThumbprint = encryptionKeyThumbprint; - Algorithm = algorithm; + this.IntegrityKey = integrityKey; + this.EncryptionKey = encryptionKey; + this.EncryptionKeyThumbprint = encryptionKeyThumbprint; + this.Algorithm = algorithm; CustomInit(); } @@ -59,29 +65,29 @@ public VaultExtendedInfoResource() /// partial void CustomInit(); + /// /// Gets or sets integrity key. /// - [JsonProperty(PropertyName = "properties.integrityKey")] - public string IntegrityKey { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.integrityKey")] + public string IntegrityKey {get; set; } /// /// Gets or sets encryption key. /// - [JsonProperty(PropertyName = "properties.encryptionKey")] - public string EncryptionKey { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.encryptionKey")] + public string EncryptionKey {get; set; } /// /// Gets or sets encryption key thumbprint. /// - [JsonProperty(PropertyName = "properties.encryptionKeyThumbprint")] - public string EncryptionKeyThumbprint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.encryptionKeyThumbprint")] + public string EncryptionKeyThumbprint {get; set; } /// /// Gets or sets algorithm for Vault ExtendedInfo /// - [JsonProperty(PropertyName = "properties.algorithm")] - public string Algorithm { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.algorithm")] + public string Algorithm {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPrivateEndpointState.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPrivateEndpointState.cs index 13548fb0d11e..ea52a18a3477 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPrivateEndpointState.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPrivateEndpointState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for VaultPrivateEndpointState. /// + + public static class VaultPrivateEndpointState { public const string None = "None"; public const string Enabled = "Enabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultProperties.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultProperties.cs index 2de0a15eba7a..faafa51d40b3 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultProperties.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -31,51 +23,68 @@ public VaultProperties() /// /// Initializes a new instance of the VaultProperties class. /// - /// Provisioning State. - /// 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' - /// Customer Managed Key details of the - /// resource. - /// The details of the latest move operation - /// performed on the Azure Resource - /// The State of the Resource after the move - /// operation. Possible values include: 'Unknown', 'InProgress', - /// 'PrepareFailed', 'CommitFailed', 'PrepareTimedout', - /// 'CommitTimedout', 'MoveSucceeded', 'Failure', 'CriticalFailure', - /// 'PartialSuccess' - /// Backup storage version. Possible - /// values include: 'V1', 'V2', 'Unassigned' - /// property to enable or disable - /// resource provider inbound network traffic from public clients. + + /// Provisioning State. + /// + + /// Details for upgrading vault. + /// + + /// 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' + + /// Customer Managed Key details of the resource. + /// + + /// The details of the latest move operation performed on the Azure Resource + /// + + /// The State of the Resource after the move operation + /// Possible values include: 'Unknown', 'InProgress', 'PrepareFailed', + /// 'CommitFailed', 'PrepareTimedout', 'CommitTimedout', 'MoveSucceeded', + /// 'Failure', 'CriticalFailure', 'PartialSuccess' + + /// Backup storage version + /// Possible values include: 'V1', 'V2', 'Unassigned' + + /// property to enable or disable resource provider inbound network traffic + /// from public clients /// Possible values include: 'Enabled', 'Disabled' - /// Monitoring Settings of the - /// vault - /// Restore Settings of the vault - /// The redundancy Settings of a - /// Vault - /// Security Settings of the - /// vault - public VaultProperties(string provisioningState = default(string), UpgradeDetails upgradeDetails = default(UpgradeDetails), IList privateEndpointConnections = default(IList), string privateEndpointStateForBackup = default(string), string privateEndpointStateForSiteRecovery = default(string), VaultPropertiesEncryption encryption = default(VaultPropertiesEncryption), VaultPropertiesMoveDetails moveDetails = default(VaultPropertiesMoveDetails), string moveState = default(string), string backupStorageVersion = default(string), string publicNetworkAccess = default(string), MonitoringSettings monitoringSettings = default(MonitoringSettings), RestoreSettings restoreSettings = default(RestoreSettings), VaultPropertiesRedundancySettings redundancySettings = default(VaultPropertiesRedundancySettings), SecuritySettings securitySettings = default(SecuritySettings)) + + /// Monitoring Settings of the vault + /// + + /// Restore Settings of the vault + /// + + /// The redundancy Settings of a Vault + /// + + /// Security Settings of the vault + /// + public VaultProperties(string provisioningState = default(string), UpgradeDetails upgradeDetails = default(UpgradeDetails), System.Collections.Generic.IList privateEndpointConnections = default(System.Collections.Generic.IList), string privateEndpointStateForBackup = default(string), string privateEndpointStateForSiteRecovery = default(string), VaultPropertiesEncryption encryption = default(VaultPropertiesEncryption), VaultPropertiesMoveDetails moveDetails = default(VaultPropertiesMoveDetails), string moveState = default(string), string backupStorageVersion = default(string), string publicNetworkAccess = default(string), MonitoringSettings monitoringSettings = default(MonitoringSettings), RestoreSettings restoreSettings = default(RestoreSettings), VaultPropertiesRedundancySettings redundancySettings = default(VaultPropertiesRedundancySettings), SecuritySettings securitySettings = default(SecuritySettings)) + { - ProvisioningState = provisioningState; - UpgradeDetails = upgradeDetails; - PrivateEndpointConnections = privateEndpointConnections; - PrivateEndpointStateForBackup = privateEndpointStateForBackup; - PrivateEndpointStateForSiteRecovery = privateEndpointStateForSiteRecovery; - Encryption = encryption; - MoveDetails = moveDetails; - MoveState = moveState; - BackupStorageVersion = backupStorageVersion; - PublicNetworkAccess = publicNetworkAccess; - MonitoringSettings = monitoringSettings; - RestoreSettings = restoreSettings; - RedundancySettings = redundancySettings; - SecuritySettings = securitySettings; + this.ProvisioningState = provisioningState; + this.UpgradeDetails = upgradeDetails; + this.PrivateEndpointConnections = privateEndpointConnections; + this.PrivateEndpointStateForBackup = privateEndpointStateForBackup; + this.PrivateEndpointStateForSiteRecovery = privateEndpointStateForSiteRecovery; + this.Encryption = encryption; + this.MoveDetails = moveDetails; + this.MoveState = moveState; + this.BackupStorageVersion = backupStorageVersion; + this.PublicNetworkAccess = publicNetworkAccess; + this.MonitoringSettings = monitoringSettings; + this.RestoreSettings = restoreSettings; + this.RedundancySettings = redundancySettings; + this.SecuritySettings = securitySettings; CustomInit(); } @@ -84,97 +93,91 @@ public VaultProperties() /// partial void CustomInit(); + /// /// Gets provisioning State. /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } /// + /// Gets or sets details for upgrading vault. /// - [JsonProperty(PropertyName = "upgradeDetails")] - public UpgradeDetails UpgradeDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "upgradeDetails")] + public UpgradeDetails UpgradeDetails {get; set; } /// /// Gets list of private endpoint connection. /// - [JsonProperty(PropertyName = "privateEndpointConnections")] - public IList PrivateEndpointConnections { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpointConnections")] + public System.Collections.Generic.IList PrivateEndpointConnections {get; private set; } /// - /// Gets private endpoint state for backup. Possible values include: - /// 'None', 'Enabled' + /// Gets private endpoint state for backup. Possible values include: 'None', 'Enabled' /// - [JsonProperty(PropertyName = "privateEndpointStateForBackup")] - public string PrivateEndpointStateForBackup { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpointStateForBackup")] + public string PrivateEndpointStateForBackup {get; private set; } /// - /// Gets private endpoint state for site recovery. Possible values - /// include: 'None', 'Enabled' + /// Gets private endpoint state for site recovery. Possible values include: 'None', 'Enabled' /// - [JsonProperty(PropertyName = "privateEndpointStateForSiteRecovery")] - public string PrivateEndpointStateForSiteRecovery { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpointStateForSiteRecovery")] + public string PrivateEndpointStateForSiteRecovery {get; private set; } /// /// Gets or sets customer Managed Key details of the resource. /// - [JsonProperty(PropertyName = "encryption")] - public VaultPropertiesEncryption Encryption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "encryption")] + public VaultPropertiesEncryption Encryption {get; set; } /// - /// Gets or sets the details of the latest move operation performed on - /// the Azure Resource + /// Gets or sets the details of the latest move operation performed on the + /// Azure Resource /// - [JsonProperty(PropertyName = "moveDetails")] - public VaultPropertiesMoveDetails MoveDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "moveDetails")] + public VaultPropertiesMoveDetails MoveDetails {get; set; } /// - /// Gets the State of the Resource after the move operation. Possible - /// values include: 'Unknown', 'InProgress', 'PrepareFailed', - /// 'CommitFailed', 'PrepareTimedout', 'CommitTimedout', - /// 'MoveSucceeded', 'Failure', 'CriticalFailure', 'PartialSuccess' + /// Gets the State of the Resource after the move operation Possible values include: 'Unknown', 'InProgress', 'PrepareFailed', 'CommitFailed', 'PrepareTimedout', 'CommitTimedout', 'MoveSucceeded', 'Failure', 'CriticalFailure', 'PartialSuccess' /// - [JsonProperty(PropertyName = "moveState")] - public string MoveState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "moveState")] + public string MoveState {get; private set; } /// - /// Gets backup storage version. Possible values include: 'V1', 'V2', - /// 'Unassigned' + /// Gets backup storage version Possible values include: 'V1', 'V2', 'Unassigned' /// - [JsonProperty(PropertyName = "backupStorageVersion")] - public string BackupStorageVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "backupStorageVersion")] + public string BackupStorageVersion {get; private set; } /// - /// Gets or sets property to enable or disable resource provider - /// inbound network traffic from public clients. Possible values - /// include: 'Enabled', 'Disabled' + /// Gets or sets property to enable or disable resource provider inbound + /// network traffic from public clients Possible values include: 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "publicNetworkAccess")] - public string PublicNetworkAccess { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "publicNetworkAccess")] + public string PublicNetworkAccess {get; set; } /// /// Gets or sets monitoring Settings of the vault /// - [JsonProperty(PropertyName = "monitoringSettings")] - public MonitoringSettings MonitoringSettings { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monitoringSettings")] + public MonitoringSettings MonitoringSettings {get; set; } /// /// Gets or sets restore Settings of the vault /// - [JsonProperty(PropertyName = "restoreSettings")] - public RestoreSettings RestoreSettings { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "restoreSettings")] + public RestoreSettings RestoreSettings {get; set; } /// /// Gets or sets the redundancy Settings of a Vault /// - [JsonProperty(PropertyName = "redundancySettings")] - public VaultPropertiesRedundancySettings RedundancySettings { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "redundancySettings")] + public VaultPropertiesRedundancySettings RedundancySettings {get; set; } /// /// Gets or sets security Settings of the vault /// - [JsonProperty(PropertyName = "securitySettings")] - public SecuritySettings SecuritySettings { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "securitySettings")] + public SecuritySettings SecuritySettings {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesEncryption.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesEncryption.cs index 032f9e4b9db5..293b4d7b2ce0 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesEncryption.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesEncryption.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,14 +23,21 @@ public VaultPropertiesEncryption() /// /// Initializes a new instance of the VaultPropertiesEncryption class. /// - /// Enabling/Disabling the - /// Double Encryption state. Possible values include: 'Enabled', - /// 'Disabled' + + /// The properties of the Key Vault which hosts CMK + /// + + /// The details of the identity used for CMK + /// + + /// Enabling/Disabling the Double Encryption state + /// Possible values include: 'Enabled', 'Disabled' public VaultPropertiesEncryption(CmkKeyVaultProperties keyVaultProperties = default(CmkKeyVaultProperties), CmkKekIdentity kekIdentity = default(CmkKekIdentity), string infrastructureEncryption = default(string)) + { - KeyVaultProperties = keyVaultProperties; - KekIdentity = kekIdentity; - InfrastructureEncryption = infrastructureEncryption; + this.KeyVaultProperties = keyVaultProperties; + this.KekIdentity = kekIdentity; + this.InfrastructureEncryption = infrastructureEncryption; CustomInit(); } @@ -45,22 +46,23 @@ public VaultPropertiesEncryption() /// partial void CustomInit(); + /// + /// Gets or sets the properties of the Key Vault which hosts CMK /// - [JsonProperty(PropertyName = "keyVaultProperties")] - public CmkKeyVaultProperties KeyVaultProperties { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultProperties")] + public CmkKeyVaultProperties KeyVaultProperties {get; set; } /// + /// Gets or sets the details of the identity used for CMK /// - [JsonProperty(PropertyName = "kekIdentity")] - public CmkKekIdentity KekIdentity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekIdentity")] + public CmkKekIdentity KekIdentity {get; set; } /// - /// Gets or sets enabling/Disabling the Double Encryption state. - /// Possible values include: 'Enabled', 'Disabled' + /// Gets or sets enabling/Disabling the Double Encryption state Possible values include: 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "infrastructureEncryption")] - public string InfrastructureEncryption { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "infrastructureEncryption")] + public string InfrastructureEncryption {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesMoveDetails.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesMoveDetails.cs index ed3c04d622a9..234b7ff5c2f0 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesMoveDetails.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesMoveDetails.cs @@ -1,21 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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 details of the latest move operation performed on the Azure - /// Resource + /// The details of the latest move operation performed on the Azure Resource /// public partial class VaultPropertiesMoveDetails { @@ -30,23 +23,29 @@ public VaultPropertiesMoveDetails() /// /// Initializes a new instance of the VaultPropertiesMoveDetails class. /// - /// OperationId of the Resource Move - /// Operation - /// Start Time of the Resource Move - /// Operation - /// End Time of the Resource Move - /// Operation - /// Source Resource of the Resource Move - /// Operation - /// Target Resource of the Resource Move - /// Operation + + /// OperationId of the Resource Move Operation + /// + + /// Start Time of the Resource Move Operation + /// + + /// End Time of the Resource Move Operation + /// + + /// Source Resource of the Resource Move Operation + /// + + /// Target Resource of the Resource Move Operation + /// public VaultPropertiesMoveDetails(string operationId = default(string), System.DateTime? startTimeUtc = default(System.DateTime?), System.DateTime? completionTimeUtc = default(System.DateTime?), string sourceResourceId = default(string), string targetResourceId = default(string)) + { - OperationId = operationId; - StartTimeUtc = startTimeUtc; - CompletionTimeUtc = completionTimeUtc; - SourceResourceId = sourceResourceId; - TargetResourceId = targetResourceId; + this.OperationId = operationId; + this.StartTimeUtc = startTimeUtc; + this.CompletionTimeUtc = completionTimeUtc; + this.SourceResourceId = sourceResourceId; + this.TargetResourceId = targetResourceId; CustomInit(); } @@ -55,35 +54,35 @@ public VaultPropertiesMoveDetails() /// partial void CustomInit(); + /// /// Gets operationId of the Resource Move Operation /// - [JsonProperty(PropertyName = "operationId")] - public string OperationId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operationId")] + public string OperationId {get; private set; } /// /// Gets start Time of the Resource Move Operation /// - [JsonProperty(PropertyName = "startTimeUtc")] - public System.DateTime? StartTimeUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTimeUtc")] + public System.DateTime? StartTimeUtc {get; private set; } /// /// Gets end Time of the Resource Move Operation /// - [JsonProperty(PropertyName = "completionTimeUtc")] - public System.DateTime? CompletionTimeUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "completionTimeUtc")] + public System.DateTime? CompletionTimeUtc {get; private set; } /// /// Gets source Resource of the Resource Move Operation /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; private set; } /// /// Gets target Resource of the Resource Move Operation /// - [JsonProperty(PropertyName = "targetResourceId")] - public string TargetResourceId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceId")] + public string TargetResourceId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesRedundancySettings.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesRedundancySettings.cs index 2200b5a80cb7..4dae911884ce 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesRedundancySettings.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultPropertiesRedundancySettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models public partial class VaultPropertiesRedundancySettings { /// - /// Initializes a new instance of the VaultPropertiesRedundancySettings - /// class. + /// Initializes a new instance of the VaultPropertiesRedundancySettings class. /// public VaultPropertiesRedundancySettings() { @@ -28,19 +21,20 @@ public VaultPropertiesRedundancySettings() } /// - /// Initializes a new instance of the VaultPropertiesRedundancySettings - /// class. + /// Initializes a new instance of the VaultPropertiesRedundancySettings class. /// - /// The storage redundancy - /// setting of a vault. Possible values include: 'LocallyRedundant', - /// 'GeoRedundant', 'ZoneRedundant' - /// Flag to show if Cross Region - /// Restore is enabled on the Vault or not. Possible values include: - /// 'Enabled', 'Disabled' + + /// The storage redundancy setting of a vault + /// Possible values include: 'LocallyRedundant', 'GeoRedundant', + /// 'ZoneRedundant' + + /// Flag to show if Cross Region Restore is enabled on the Vault or not + /// Possible values include: 'Enabled', 'Disabled' public VaultPropertiesRedundancySettings(string standardTierStorageRedundancy = default(string), string crossRegionRestore = default(string)) + { - StandardTierStorageRedundancy = standardTierStorageRedundancy; - CrossRegionRestore = crossRegionRestore; + this.StandardTierStorageRedundancy = standardTierStorageRedundancy; + this.CrossRegionRestore = crossRegionRestore; CustomInit(); } @@ -49,19 +43,17 @@ public VaultPropertiesRedundancySettings() /// partial void CustomInit(); + /// - /// Gets the storage redundancy setting of a vault. Possible values - /// include: 'LocallyRedundant', 'GeoRedundant', 'ZoneRedundant' + /// Gets the storage redundancy setting of a vault Possible values include: 'LocallyRedundant', 'GeoRedundant', 'ZoneRedundant' /// - [JsonProperty(PropertyName = "standardTierStorageRedundancy")] - public string StandardTierStorageRedundancy { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "standardTierStorageRedundancy")] + public string StandardTierStorageRedundancy {get; private set; } /// - /// Gets flag to show if Cross Region Restore is enabled on the Vault - /// or not. Possible values include: 'Enabled', 'Disabled' + /// Gets flag to show if Cross Region Restore is enabled on the Vault or not Possible values include: 'Enabled', 'Disabled' /// - [JsonProperty(PropertyName = "crossRegionRestore")] - public string CrossRegionRestore { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "crossRegionRestore")] + public string CrossRegionRestore {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultSubResourceType.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultSubResourceType.cs index 7eec21cfb4ef..fe600b8a8baa 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultSubResourceType.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultSubResourceType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for VaultSubResourceType. /// + + public static class VaultSubResourceType { public const string AzureBackup = "AzureBackup"; public const string AzureBackupSecondary = "AzureBackup_secondary"; public const string AzureSiteRecovery = "AzureSiteRecovery"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultUpgradeState.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultUpgradeState.cs index b011acee0eca..a8a9052da08a 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultUpgradeState.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultUpgradeState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// /// Defines values for VaultUpgradeState. /// + + public static class VaultUpgradeState { public const string Unknown = "Unknown"; @@ -21,4 +18,4 @@ public static class VaultUpgradeState public const string Upgraded = "Upgraded"; public const string Failed = "Failed"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultUsage.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultUsage.cs index b10b1638f966..85bf56e77437 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultUsage.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Models/VaultUsage.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// 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; /// @@ -29,22 +23,34 @@ public VaultUsage() /// /// Initializes a new instance of the VaultUsage class. /// - /// Unit of the usage. Possible values include: - /// 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', - /// 'BytesPerSecond' - /// Quota period of usage. - /// Next reset time of usage. - /// Current value of usage. - /// Limit of usage. - /// Name of usage. + + /// Unit of the usage. + /// Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + /// 'CountPerSecond', 'BytesPerSecond' + + /// Quota period of usage. + /// + + /// Next reset time of usage. + /// + + /// Current value of usage. + /// + + /// Limit of usage. + /// + + /// Name of usage. + /// public VaultUsage(string unit = default(string), string quotaPeriod = default(string), System.DateTime? nextResetTime = default(System.DateTime?), long? currentValue = default(long?), long? limit = default(long?), NameInfo name = default(NameInfo)) + { - Unit = unit; - QuotaPeriod = quotaPeriod; - NextResetTime = nextResetTime; - CurrentValue = currentValue; - Limit = limit; - Name = name; + this.Unit = unit; + this.QuotaPeriod = quotaPeriod; + this.NextResetTime = nextResetTime; + this.CurrentValue = currentValue; + this.Limit = limit; + this.Name = name; CustomInit(); } @@ -53,42 +59,41 @@ public VaultUsage() /// partial void CustomInit(); + /// - /// Gets or sets unit of the usage. Possible values include: 'Count', - /// 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + /// Gets or sets unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' /// - [JsonProperty(PropertyName = "unit")] - public string Unit { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "unit")] + public string Unit {get; set; } /// /// Gets or sets quota period of usage. /// - [JsonProperty(PropertyName = "quotaPeriod")] - public string QuotaPeriod { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "quotaPeriod")] + public string QuotaPeriod {get; set; } /// /// Gets or sets next reset time of usage. /// - [JsonProperty(PropertyName = "nextResetTime")] - public System.DateTime? NextResetTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nextResetTime")] + public System.DateTime? NextResetTime {get; set; } /// /// Gets or sets current value of usage. /// - [JsonProperty(PropertyName = "currentValue")] - public long? CurrentValue { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "currentValue")] + public long? CurrentValue {get; set; } /// /// Gets or sets limit of usage. /// - [JsonProperty(PropertyName = "limit")] - public long? Limit { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "limit")] + public long? Limit {get; set; } /// /// Gets or sets name of usage. /// - [JsonProperty(PropertyName = "name")] - public NameInfo Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public NameInfo Name {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Operations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Operations.cs index b2e33f6ea651..0f9cfc49f92f 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Operations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/Operations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// Operations operations. /// - internal partial class Operations : IServiceOperations, IOperations + internal partial class Operations : Microsoft.Rest.IServiceOperations, IOperations { /// /// Initializes a new instance of the Operations class. @@ -36,13 +24,13 @@ internal partial class Operations : IServiceOperations, /// /// Thrown when a required parameter is null /// - internal Operations(RecoveryServicesClient client) + internal Operations (RecoveryServicesClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -59,13 +47,13 @@ internal Operations(RecoveryServicesClient client) /// /// 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 /// /// @@ -74,61 +62,62 @@ internal Operations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.RecoveryServices/operations").ToString(); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -140,55 +129,56 @@ internal Operations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -198,9 +188,10 @@ internal Operations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -211,25 +202,29 @@ internal Operations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Returns the list of available operations. /// @@ -242,13 +237,13 @@ internal Operations(RecoveryServicesClient client) /// /// 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 /// /// @@ -257,51 +252,54 @@ internal Operations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -313,55 +311,56 @@ internal Operations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -371,9 +370,10 @@ internal Operations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -384,24 +384,28 @@ internal Operations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/OperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/OperationsExtensions.cs index 047a83c4e091..30a0baf535a2 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/OperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/OperationsExtensions.cs @@ -1,87 +1,76 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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 Operations. + /// Extension methods for Operations /// public static partial class OperationsExtensions { - /// - /// Returns the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } + /// + /// Returns the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IOperations operations) + { + return ((IOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Returns the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Returns the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Returns the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IOperations operations, string nextPageLink) + { + return ((IOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Returns the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IOperations operations, string nextPageLink) + /// + /// Returns the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Returns the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/PrivateLinkResourcesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/PrivateLinkResourcesOperations.cs index ca4a5c03b98e..dea9147153dc 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/PrivateLinkResourcesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/PrivateLinkResourcesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; 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; /// /// PrivateLinkResourcesOperations operations. /// - internal partial class PrivateLinkResourcesOperations : IServiceOperations, IPrivateLinkResourcesOperations + internal partial class PrivateLinkResourcesOperations : Microsoft.Rest.IServiceOperations, IPrivateLinkResourcesOperations { /// /// Initializes a new instance of the PrivateLinkResourcesOperations class. @@ -36,13 +24,13 @@ internal partial class PrivateLinkResourcesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal PrivateLinkResourcesOperations(RecoveryServicesClient client) + internal PrivateLinkResourcesOperations (RecoveryServicesClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,8 +39,7 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) public RecoveryServicesClient Client { get; private set; } /// - /// Returns the list of private link resources that need to be created for - /// Backup and SiteRecovery + /// Returns the list of private link resources that need to be created for Backup and SiteRecovery /// /// /// The name of the resource group. The name is case insensitive. @@ -66,13 +53,13 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -81,96 +68,98 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.ApiVersion != null) + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; 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("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -182,55 +171,56 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -240,9 +230,10 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -253,28 +244,31 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Returns a specified private link resource that need to be created for - /// Backup and SiteRecovery + /// Returns a specified private link resource that need to be created for Backup and SiteRecovery /// /// /// The name of the resource group. The name is case insensitive. @@ -283,6 +277,7 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) /// The name of the recovery services vault. /// /// + /// /// /// /// Headers that will be added to request. @@ -290,13 +285,13 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -305,102 +300,105 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, string privateLinkResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, string privateLinkResourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (privateLinkResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateLinkResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateLinkResourceName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("privateLinkResourceName", privateLinkResourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; 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("{subscriptionId}", System.Uri.EscapeDataString(this.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 (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -412,55 +410,56 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -470,9 +469,10 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -483,28 +483,31 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Returns the list of private link resources that need to be created for - /// Backup and SiteRecovery + /// 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. @@ -515,13 +518,13 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -530,51 +533,54 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -586,55 +592,56 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -644,9 +651,10 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -657,24 +665,28 @@ internal PrivateLinkResourcesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs index a79dee25c532..11f01fd3dd67 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs @@ -1,149 +1,133 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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. + /// 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. The name is case insensitive. - /// - /// - /// 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. The name is case insensitive. - /// - /// - /// 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 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. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static Microsoft.Rest.Azure.IPage List(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string vaultName) + { + return ((IPrivateLinkResourcesOperations)operations).ListAsync(resourceGroupName, vaultName).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. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// - public static PrivateLinkResource Get(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string vaultName, string privateLinkResourceName) + /// + /// 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. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(resourceGroupName, vaultName, privateLinkResourceName).GetAwaiter().GetResult(); + 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. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// + /// + public static PrivateLinkResource Get(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string vaultName, string privateLinkResourceName) + { + return ((IPrivateLinkResourcesOperations)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. The name is case insensitive. - /// - /// - /// 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)) + /// + /// 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. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string vaultName, string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, privateLinkResourceName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, privateLinkResourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + 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 Microsoft.Rest.Azure.IPage ListNext(this IPrivateLinkResourcesOperations operations, string nextPageLink) + { + return ((IPrivateLinkResourcesOperations)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. - /// - public static IPage ListNext(this IPrivateLinkResourcesOperations operations, string nextPageLink) + /// + /// 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 System.Threading.Tasks.Task> ListNextAsync(this IPrivateLinkResourcesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + 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. - /// - /// - /// 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/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesClient.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesClient.cs index 80dcac0fa1a8..02ff9e0a52d9 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesClient.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesClient.cs @@ -1,133 +1,98 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - public partial class RecoveryServicesClient : ServiceClient, IRecoveryServicesClient, IAzureClient + public partial class RecoveryServicesClient : Microsoft.Rest.ServiceClient, IRecoveryServicesClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } - - /// - /// The subscription Id. - /// - public string SubscriptionId { get; set; } - - /// - /// Client Api Version. - /// - public string ApiVersion { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// /// The API version to use for this operation. /// - public string ApiVersion1 { get; set; } + public string ApiVersion { get; private set; } /// /// The ID of the target subscription. /// - public string SubscriptionId1 { get; set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// 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; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// 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. + /// 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; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IVaultCertificatesOperations. + /// Gets the IVaultCertificatesOperations /// public virtual IVaultCertificatesOperations VaultCertificates { get; private set; } - /// - /// Gets the IRegisteredIdentitiesOperations. + /// Gets the IRegisteredIdentitiesOperations /// public virtual IRegisteredIdentitiesOperations RegisteredIdentities { get; private set; } - /// - /// Gets the IReplicationUsagesOperations. + /// Gets the IReplicationUsagesOperations /// public virtual IReplicationUsagesOperations ReplicationUsages { get; private set; } - /// - /// Gets the IPrivateLinkResourcesOperations. + /// Gets the IPrivateLinkResourcesOperations /// public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } - /// - /// Gets the IRecoveryServicesOperations. + /// Gets the IRecoveryServicesOperations /// public virtual IRecoveryServicesOperations RecoveryServices { get; private set; } - /// - /// Gets the IVaultsOperations. + /// Gets the IVaultsOperations /// public virtual IVaultsOperations Vaults { get; private set; } - /// - /// Gets the IOperations. + /// Gets the IOperations /// public virtual IOperations Operations { get; private set; } - /// - /// Gets the IVaultExtendedInfoOperations. + /// Gets the IVaultExtendedInfoOperations /// public virtual IVaultExtendedInfoOperations VaultExtendedInfo { get; private set; } - /// - /// Gets the IUsagesOperations. + /// Gets the IUsagesOperations /// public virtual IUsagesOperations Usages { get; private set; } - /// /// Initializes a new instance of the RecoveryServicesClient class. /// @@ -136,24 +101,22 @@ public partial class RecoveryServicesClient : ServiceClient /// /// 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) + protected RecoveryServicesClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the RecoveryServicesClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected RecoveryServicesClient(params DelegatingHandler[] handlers) : base(handlers) + protected RecoveryServicesClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the RecoveryServicesClient class. + /// Initializes a new instance of the RecoveryServicesClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -161,11 +124,10 @@ protected RecoveryServicesClient(params DelegatingHandler[] handlers) : base(han /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected RecoveryServicesClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected RecoveryServicesClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the RecoveryServicesClient class. /// @@ -178,15 +140,14 @@ protected RecoveryServicesClient(HttpClientHandler rootHandler, params Delegatin /// /// Thrown when a required parameter is null /// - protected RecoveryServicesClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected RecoveryServicesClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the RecoveryServicesClient class. /// @@ -202,15 +163,15 @@ protected RecoveryServicesClient(System.Uri baseUri, params DelegatingHandler[] /// /// Thrown when a required parameter is null /// - protected RecoveryServicesClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected RecoveryServicesClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the RecoveryServicesClient class. /// @@ -223,23 +184,23 @@ protected RecoveryServicesClient(System.Uri baseUri, HttpClientHandler rootHandl /// /// Thrown when a required parameter is null /// - public RecoveryServicesClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public RecoveryServicesClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -250,23 +211,23 @@ public RecoveryServicesClient(ServiceClientCredentials credentials, params Deleg /// /// Thrown when a required parameter is null /// - public RecoveryServicesClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public RecoveryServicesClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -278,26 +239,26 @@ public RecoveryServicesClient(ServiceClientCredentials credentials, HttpClient h /// /// Thrown when a required parameter is null /// - public RecoveryServicesClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public RecoveryServicesClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -306,7 +267,7 @@ public RecoveryServicesClient(ServiceClientCredentials credentials, HttpClientHa /// /// Thrown when a required parameter is null /// - public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public RecoveryServicesClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -316,33 +277,30 @@ public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials crede { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the RecoveryServicesClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public RecoveryServicesClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -352,68 +310,69 @@ public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials crede { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - 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 = "2023-02-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.VaultCertificates = new VaultCertificatesOperations(this); + this.RegisteredIdentities = new RegisteredIdentitiesOperations(this); + this.ReplicationUsages = new ReplicationUsagesOperations(this); + this.PrivateLinkResources = new PrivateLinkResourcesOperations(this); + this.RecoveryServices = new RecoveryServicesOperations(this); + this.Vaults = new VaultsOperations(this); + this.Operations = new Operations(this); + this.VaultExtendedInfo = new VaultExtendedInfoOperations(this); + this.Usages = new UsagesOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2023-02-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings = new JsonSerializerSettings + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("authType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("authType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("authType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("authType")); CustomInitialize(); - DeserializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } /// /// Gets the operation status for a resource. @@ -425,6 +384,7 @@ private void Initialize() /// The name of the recovery services vault. /// /// + /// /// /// /// Headers that will be added to request. @@ -432,13 +392,13 @@ private void Initialize() /// /// 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 /// /// @@ -447,102 +407,105 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> GetOperationStatusWithHttpMessagesAsync(string resourceGroupName, string vaultName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetOperationStatusWithHttpMessagesAsync(string resourceGroupName, string vaultName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (SubscriptionId == null) + + + + + if (this.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.SubscriptionId"); } - if (SubscriptionId != null) + if (this.SubscriptionId != null) { - if (SubscriptionId.Length < 1) + if (this.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - if (ApiVersion != null) + + if (this.ApiVersion == null) { - if (ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetOperationStatus", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetOperationStatus", tracingParameters); } // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; + + var _baseUrl = this.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/operationStatus/{operationId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + if (this.GenerateClientRequestId != null && this.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (AcceptLanguage != null) + if (this.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -554,55 +517,56 @@ private void Initialize() _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Credentials != null) + if (this.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -612,9 +576,10 @@ private void Initialize() throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -625,25 +590,29 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the operation result for a resource. /// @@ -654,6 +623,7 @@ private void Initialize() /// The name of the recovery services vault. /// /// + /// /// /// /// Headers that will be added to request. @@ -661,13 +631,13 @@ private void Initialize() /// /// 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 /// /// @@ -676,102 +646,105 @@ private void Initialize() /// /// A response object containing the response body and response headers. /// - public async Task> GetOperationResultWithHttpMessagesAsync(string resourceGroupName, string vaultName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetOperationResultWithHttpMessagesAsync(string resourceGroupName, string vaultName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (SubscriptionId == null) + + + + + if (this.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.SubscriptionId"); } - if (SubscriptionId != null) + if (this.SubscriptionId != null) { - if (SubscriptionId.Length < 1) + if (this.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (operationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); } - if (ApiVersion == null) + + if (this.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - if (ApiVersion != null) - { - if (ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("operationId", operationId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetOperationResult", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetOperationResult", tracingParameters); } // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; + + var _baseUrl = this.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/operationResults/{operationId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - List _queryParameters = new List(); - if (ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + if (this.GenerateClientRequestId != null && this.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (AcceptLanguage != null) + if (this.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -783,55 +756,56 @@ private void Initialize() _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Credentials != null) + if (this.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -841,9 +815,10 @@ private void Initialize() throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -854,24 +829,28 @@ private void Initialize() _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesClientExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesClientExtensions.cs index 5726fa7cbc2c..d78107139c27 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesClientExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesClientExtensions.cs @@ -1,113 +1,106 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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 RecoveryServicesClient. + /// Extension methods for RecoveryServicesClient /// public static partial class RecoveryServicesClientExtensions { - /// - /// Gets the operation status for a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// - public static OperationResource GetOperationStatus(this IRecoveryServicesClient operations, string resourceGroupName, string vaultName, string operationId) - { - return operations.GetOperationStatusAsync(resourceGroupName, vaultName, operationId).GetAwaiter().GetResult(); - } + /// + /// Gets the operation status for a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// + /// + public static OperationResource GetOperationStatus(this IRecoveryServicesClient operations, string resourceGroupName, string vaultName, string operationId) + { + return ((IRecoveryServicesClient)operations).GetOperationStatusAsync(resourceGroupName, vaultName, operationId).GetAwaiter().GetResult(); + } - /// - /// Gets the operation status for a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetOperationStatusAsync(this IRecoveryServicesClient operations, string resourceGroupName, string vaultName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the operation status for a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetOperationStatusAsync(this IRecoveryServicesClient operations, string resourceGroupName, string vaultName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetOperationStatusWithHttpMessagesAsync(resourceGroupName, vaultName, operationId, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetOperationStatusWithHttpMessagesAsync(resourceGroupName, vaultName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the operation result for a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// + /// + public static Vault GetOperationResult(this IRecoveryServicesClient operations, string resourceGroupName, string vaultName, string operationId) + { + return ((IRecoveryServicesClient)operations).GetOperationResultAsync(resourceGroupName, vaultName, operationId).GetAwaiter().GetResult(); + } - /// - /// Gets the operation result for a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// - public static Vault GetOperationResult(this IRecoveryServicesClient operations, string resourceGroupName, string vaultName, string operationId) + /// + /// Gets the operation result for a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetOperationResultAsync(this IRecoveryServicesClient operations, string resourceGroupName, string vaultName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetOperationResultWithHttpMessagesAsync(resourceGroupName, vaultName, operationId, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetOperationResultAsync(resourceGroupName, vaultName, operationId).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the operation result for a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetOperationResultAsync(this IRecoveryServicesClient operations, string resourceGroupName, string vaultName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetOperationResultWithHttpMessagesAsync(resourceGroupName, vaultName, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesOperations.cs index 876cbd59d490..f8ce736fb398 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; 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 + internal partial class RecoveryServicesOperations : Microsoft.Rest.IServiceOperations, IRecoveryServicesOperations { /// /// Initializes a new instance of the RecoveryServicesOperations class. @@ -36,13 +24,13 @@ internal partial class RecoveryServicesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal RecoveryServicesOperations(RecoveryServicesClient client) + internal RecoveryServicesOperations (RecoveryServicesClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,10 +40,8 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) /// /// 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 + /// 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. The name is case insensitive. @@ -75,13 +61,13 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -90,103 +76,105 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, string type = default(string), string name = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, string type = default(string), string name = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "location"); } + CheckNameAvailabilityParameters input = new CheckNameAvailabilityParameters(); - if (type != null || name != null) + if(type != null||name != null) { input.Type = type; input.Name = name; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("location", location); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.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("{subscriptionId}", System.Uri.EscapeDataString(this.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) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -198,61 +186,62 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -262,9 +251,10 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -275,28 +265,31 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// API to get details about capabilities provided by - /// Microsoft.RecoveryServices RP + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP /// /// /// Location of the resource @@ -305,6 +298,7 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) /// Describes the Resource type: Microsoft.RecoveryServices/Vaults /// /// + /// Capabilities information /// /// /// Headers that will be added to request. @@ -312,13 +306,13 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -327,90 +321,88 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CapabilitiesWithHttpMessagesAsync(string location, string type, CapabilitiesProperties properties = default(CapabilitiesProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CapabilitiesWithHttpMessagesAsync(string location, string type, CapabilitiesProperties properties = default(CapabilitiesProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - if (type == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "type"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "location"); } + ResourceCapabilities input = new ResourceCapabilities(); - if (type != null || properties != null) + if(type != null||properties != null) { input.Type = type; input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("location", location); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Capabilities", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Capabilities", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{location}/capabilities").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -422,61 +414,62 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -486,9 +479,10 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -499,24 +493,28 @@ internal RecoveryServicesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesOperationsExtensions.cs index 36ddf6b68c06..f9ea6f6306c2 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RecoveryServicesOperationsExtensions.cs @@ -1,131 +1,92 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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. + /// 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. The name is case insensitive. - /// - /// - /// Location of the resource - /// - /// - /// Describes the Resource type: Microsoft.RecoveryServices/Vaults - /// - /// - /// Resource name for which availability needs to be checked - /// - public static CheckNameAvailabilityResult CheckNameAvailability(this IRecoveryServicesOperations operations, string resourceGroupName, string location, string type = default(string), string name = default(string)) - { - return operations.CheckNameAvailabilityAsync(resourceGroupName, location, type, name).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. The name is case insensitive. + /// + /// + /// Location of the resource + /// + public static CheckNameAvailabilityResult CheckNameAvailability(this IRecoveryServicesOperations operations, string resourceGroupName, string location, string type = default(string), string name = default(string)) + { + return ((IRecoveryServicesOperations)operations).CheckNameAvailabilityAsync(resourceGroupName, location, type, name).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. The name is case insensitive. - /// - /// - /// Location of the resource - /// - /// - /// Describes the Resource type: Microsoft.RecoveryServices/Vaults - /// - /// - /// Resource name for which availability needs to be checked - /// - /// - /// The cancellation token. - /// - public static async Task CheckNameAvailabilityAsync(this IRecoveryServicesOperations operations, string resourceGroupName, string location, string type = default(string), string name = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// 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. The name is case insensitive. + /// + /// + /// Location of the resource + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckNameAvailabilityAsync(this IRecoveryServicesOperations operations, string resourceGroupName, string location, string type = default(string), string name = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(resourceGroupName, location, type, name, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(resourceGroupName, location, type, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP + /// + /// + /// The operations group for this extension method. + /// + /// + /// Location of the resource + /// + public static CapabilitiesResponse Capabilities(this IRecoveryServicesOperations operations, string location, string type, CapabilitiesProperties properties = default(CapabilitiesProperties)) + { + return ((IRecoveryServicesOperations)operations).CapabilitiesAsync(location, type, properties).GetAwaiter().GetResult(); + } - /// - /// API to get details about capabilities provided by - /// Microsoft.RecoveryServices RP - /// - /// - /// The operations group for this extension method. - /// - /// - /// Location of the resource - /// - /// - /// Describes the Resource type: Microsoft.RecoveryServices/Vaults - /// - /// - /// - public static CapabilitiesResponse Capabilities(this IRecoveryServicesOperations operations, string location, string type, CapabilitiesProperties properties = default(CapabilitiesProperties)) + /// + /// API to get details about capabilities provided by Microsoft.RecoveryServices RP + /// + /// + /// The operations group for this extension method. + /// + /// + /// Location of the resource + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CapabilitiesAsync(this IRecoveryServicesOperations operations, string location, string type, CapabilitiesProperties properties = default(CapabilitiesProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CapabilitiesWithHttpMessagesAsync(location, type, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.CapabilitiesAsync(location, type, properties).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// API to get details about capabilities provided by - /// Microsoft.RecoveryServices RP - /// - /// - /// The operations group for this extension method. - /// - /// - /// Location of the resource - /// - /// - /// Describes the Resource type: Microsoft.RecoveryServices/Vaults - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task CapabilitiesAsync(this IRecoveryServicesOperations operations, string location, string type, CapabilitiesProperties properties = default(CapabilitiesProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CapabilitiesWithHttpMessagesAsync(location, type, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RegisteredIdentitiesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RegisteredIdentitiesOperations.cs index 09c78bf07243..b41036069cb1 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RegisteredIdentitiesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RegisteredIdentitiesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// RegisteredIdentitiesOperations operations. /// - internal partial class RegisteredIdentitiesOperations : IServiceOperations, IRegisteredIdentitiesOperations + internal partial class RegisteredIdentitiesOperations : Microsoft.Rest.IServiceOperations, IRegisteredIdentitiesOperations { /// /// Initializes a new instance of the RegisteredIdentitiesOperations class. @@ -36,13 +24,13 @@ internal partial class RegisteredIdentitiesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal RegisteredIdentitiesOperations(RecoveryServicesClient client) + internal RegisteredIdentitiesOperations (RecoveryServicesClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -68,10 +56,10 @@ internal RegisteredIdentitiesOperations(RecoveryServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -80,102 +68,105 @@ internal RegisteredIdentitiesOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, string identityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, string identityName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (identityName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "identityName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "identityName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("identityName", identityName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{identityName}", System.Uri.EscapeDataString(identityName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -187,55 +178,56 @@ internal RegisteredIdentitiesOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.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)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -245,19 +237,24 @@ internal RegisteredIdentitiesOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RegisteredIdentitiesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RegisteredIdentitiesOperationsExtensions.cs index ceb7543c1c65..83769ffbed53 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RegisteredIdentitiesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/RegisteredIdentitiesOperationsExtensions.cs @@ -1,68 +1,58 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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 RegisteredIdentitiesOperations. + /// Extension methods for RegisteredIdentitiesOperations /// public static partial class RegisteredIdentitiesOperationsExtensions { - /// - /// Unregisters the given container from your Recovery Services vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Name of the protection container to unregister. - /// - public static void Delete(this IRegisteredIdentitiesOperations operations, string resourceGroupName, string vaultName, string identityName) - { - operations.DeleteAsync(resourceGroupName, vaultName, identityName).GetAwaiter().GetResult(); - } - - /// - /// Unregisters the given container from your Recovery Services vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Name of the protection container to unregister. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IRegisteredIdentitiesOperations operations, string resourceGroupName, string vaultName, string identityName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vaultName, identityName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Unregisters the given container from your Recovery Services vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// Name of the protection container to unregister. + /// + public static void Delete(this IRegisteredIdentitiesOperations operations, string resourceGroupName, string vaultName, string identityName) + { + ((IRegisteredIdentitiesOperations)operations).DeleteAsync(resourceGroupName, vaultName, identityName).GetAwaiter().GetResult(); + } + /// + /// Unregisters the given container from your Recovery Services vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// Name of the protection container to unregister. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IRegisteredIdentitiesOperations operations, string resourceGroupName, string vaultName, string identityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vaultName, identityName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/ReplicationUsagesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/ReplicationUsagesOperations.cs index f4848b2fccb7..0e18d6a96ad1 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/ReplicationUsagesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/ReplicationUsagesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationUsagesOperations operations. /// - internal partial class ReplicationUsagesOperations : IServiceOperations, IReplicationUsagesOperations + internal partial class ReplicationUsagesOperations : Microsoft.Rest.IServiceOperations, IReplicationUsagesOperations { /// /// Initializes a new instance of the ReplicationUsagesOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationUsagesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationUsagesOperations(RecoveryServicesClient client) + internal ReplicationUsagesOperations (RecoveryServicesClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -65,13 +53,13 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -80,96 +68,98 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/replicationUsages").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -181,55 +171,56 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -239,9 +230,10 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -252,24 +244,28 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/ReplicationUsagesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/ReplicationUsagesOperationsExtensions.cs index b90cd8c712f7..f273f24d1476 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/ReplicationUsagesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/ReplicationUsagesOperationsExtensions.cs @@ -1,67 +1,55 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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; /// - /// Extension methods for ReplicationUsagesOperations. + /// Extension methods for ReplicationUsagesOperations /// public static partial class ReplicationUsagesOperationsExtensions { - /// - /// Fetches the replication usages of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - public static IEnumerable List(this IReplicationUsagesOperations operations, string resourceGroupName, string vaultName) - { - return operations.ListAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); - } + /// + /// Fetches the replication usages of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static System.Collections.Generic.IEnumerable List(this IReplicationUsagesOperations operations, string resourceGroupName, string vaultName) + { + return ((IReplicationUsagesOperations)operations).ListAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); + } - /// - /// Fetches the replication usages of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationUsagesOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the replication usages of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationUsagesOperations operations, string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/SdkInfo_RecoveryServicesClient.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/SdkInfo_RecoveryServicesClient.cs deleted file mode 100644 index 6ed7890cec89..000000000000 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/SdkInfo_RecoveryServicesClient.cs +++ /dev/null @@ -1,37 +0,0 @@ - -// -// 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", "GetOperationResult", "2023-02-01"), - new Tuple("RecoveryServices", "GetOperationStatus", "2023-02-01"), - new Tuple("RecoveryServices", "Operations", "2023-02-01"), - new Tuple("RecoveryServices", "PrivateLinkResources", "2023-02-01"), - new Tuple("RecoveryServices", "RecoveryServices", "2023-02-01"), - new Tuple("RecoveryServices", "RegisteredIdentities", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationUsages", "2023-02-01"), - new Tuple("RecoveryServices", "Usages", "2023-02-01"), - new Tuple("RecoveryServices", "VaultCertificates", "2023-02-01"), - new Tuple("RecoveryServices", "VaultExtendedInfo", "2023-02-01"), - new Tuple("RecoveryServices", "Vaults", "2023-02-01"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/UsagesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/UsagesOperations.cs index 5be500eb11e3..255e02a005f6 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/UsagesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/UsagesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// UsagesOperations operations. /// - internal partial class UsagesOperations : IServiceOperations, IUsagesOperations + internal partial class UsagesOperations : Microsoft.Rest.IServiceOperations, IUsagesOperations { /// /// Initializes a new instance of the UsagesOperations class. @@ -36,13 +24,13 @@ internal partial class UsagesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal UsagesOperations(RecoveryServicesClient client) + internal UsagesOperations (RecoveryServicesClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -65,13 +53,13 @@ internal UsagesOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -80,96 +68,98 @@ internal UsagesOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByVaultsWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByVaultsWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByVaults", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByVaults", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/usages").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -181,55 +171,56 @@ internal UsagesOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -239,9 +230,10 @@ internal UsagesOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -252,24 +244,28 @@ internal UsagesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/UsagesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/UsagesOperationsExtensions.cs index d3beb1c61438..86f8434da03e 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/UsagesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/UsagesOperationsExtensions.cs @@ -1,67 +1,55 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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; /// - /// Extension methods for UsagesOperations. + /// Extension methods for UsagesOperations /// public static partial class UsagesOperationsExtensions { - /// - /// Fetches the usages of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - public static IEnumerable ListByVaults(this IUsagesOperations operations, string resourceGroupName, string vaultName) - { - return operations.ListByVaultsAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); - } + /// + /// Fetches the usages of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static System.Collections.Generic.IEnumerable ListByVaults(this IUsagesOperations operations, string resourceGroupName, string vaultName) + { + return ((IUsagesOperations)operations).ListByVaultsAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); + } - /// - /// Fetches the usages of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByVaultsAsync(this IUsagesOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches the usages of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByVaultsAsync(this IUsagesOperations operations, string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByVaultsWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListByVaultsWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultCertificatesOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultCertificatesOperations.cs index dff1f79f7b49..7bd722923c95 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultCertificatesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultCertificatesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// VaultCertificatesOperations operations. /// - internal partial class VaultCertificatesOperations : IServiceOperations, IVaultCertificatesOperations + internal partial class VaultCertificatesOperations : Microsoft.Rest.IServiceOperations, IVaultCertificatesOperations { /// /// Initializes a new instance of the VaultCertificatesOperations class. @@ -36,13 +24,13 @@ internal partial class VaultCertificatesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal VaultCertificatesOperations(RecoveryServicesClient client) + internal VaultCertificatesOperations (RecoveryServicesClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -63,6 +51,7 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) /// Certificate friendly name. /// /// + /// Raw certificate data. /// /// /// Headers that will be added to request. @@ -70,13 +59,13 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -85,108 +74,111 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + if (certificateName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "certificateName"); } + CertificateRequest certificateRequest = new CertificateRequest(); - if (properties != null) + if(properties != null) { certificateRequest.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("certificateName", certificateName); + tracingParameters.Add("certificateRequest", certificateRequest); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/certificates/{certificateName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -198,61 +190,62 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(certificateRequest != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(certificateRequest, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(certificateRequest, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -262,9 +255,10 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -275,24 +269,28 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultCertificatesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultCertificatesOperationsExtensions.cs index 0e4a264b3b30..0f7486cf0d50 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultCertificatesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultCertificatesOperationsExtensions.cs @@ -1,75 +1,61 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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 VaultCertificatesOperations. + /// Extension methods for VaultCertificatesOperations /// public static partial class VaultCertificatesOperationsExtensions { - /// - /// Uploads a certificate for a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Certificate friendly name. - /// - /// - /// - public static VaultCertificateResponse Create(this IVaultCertificatesOperations operations, string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData)) - { - return operations.CreateAsync(resourceGroupName, vaultName, certificateName, properties).GetAwaiter().GetResult(); - } + /// + /// Uploads a certificate for a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// Certificate friendly name. + /// + public static VaultCertificateResponse Create(this IVaultCertificatesOperations operations, string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData)) + { + return ((IVaultCertificatesOperations)operations).CreateAsync(resourceGroupName, vaultName, certificateName, properties).GetAwaiter().GetResult(); + } - /// - /// Uploads a certificate for a resource. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Certificate friendly name. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IVaultCertificatesOperations operations, string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Uploads a certificate for a resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// Certificate friendly name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IVaultCertificatesOperations operations, string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, vaultName, certificateName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, vaultName, certificateName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultExtendedInfoOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultExtendedInfoOperations.cs index 13272c89829c..47d69d517bf7 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultExtendedInfoOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultExtendedInfoOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// VaultExtendedInfoOperations operations. /// - internal partial class VaultExtendedInfoOperations : IServiceOperations, IVaultExtendedInfoOperations + internal partial class VaultExtendedInfoOperations : Microsoft.Rest.IServiceOperations, IVaultExtendedInfoOperations { /// /// Initializes a new instance of the VaultExtendedInfoOperations class. @@ -36,13 +24,13 @@ internal partial class VaultExtendedInfoOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal VaultExtendedInfoOperations(RecoveryServicesClient client) + internal VaultExtendedInfoOperations (RecoveryServicesClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -65,13 +53,13 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -80,96 +68,98 @@ internal VaultExtendedInfoOperations(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 System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -181,55 +171,56 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -239,9 +230,10 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -252,25 +244,29 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Create vault extended info. /// @@ -280,7 +276,7 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) /// /// The name of the recovery services vault. /// - /// + /// /// Details of ResourceExtendedInfo /// /// @@ -289,13 +285,13 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -304,101 +300,104 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceExtendedInfoDetails, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (resourceExtendedInfoDetails == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceExtendedInfoDetails"); + } + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (resourceResourceExtendedInfoDetails == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceResourceExtendedInfoDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); - tracingParameters.Add("resourceResourceExtendedInfoDetails", resourceResourceExtendedInfoDetails); + + tracingParameters.Add("resourceExtendedInfoDetails", resourceExtendedInfoDetails); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -410,61 +409,62 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; - if(resourceResourceExtendedInfoDetails != null) + if(resourceExtendedInfoDetails != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resourceResourceExtendedInfoDetails, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resourceExtendedInfoDetails, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -474,9 +474,10 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -487,25 +488,29 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Update vault extended info. /// @@ -515,7 +520,7 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) /// /// The name of the recovery services vault. /// - /// + /// /// Details of ResourceExtendedInfo /// /// @@ -524,13 +529,13 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -539,101 +544,103 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceExtendedInfoDetails, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (resourceExtendedInfoDetails == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceExtendedInfoDetails"); + } + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (resourceResourceExtendedInfoDetails == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceResourceExtendedInfoDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); - tracingParameters.Add("resourceResourceExtendedInfoDetails", resourceResourceExtendedInfoDetails); + + tracingParameters.Add("resourceExtendedInfoDetails", resourceExtendedInfoDetails); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -645,61 +652,62 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; - if(resourceResourceExtendedInfoDetails != null) + if(resourceExtendedInfoDetails != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resourceResourceExtendedInfoDetails, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resourceExtendedInfoDetails, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -709,9 +717,10 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -722,24 +731,28 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultExtendedInfoOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultExtendedInfoOperationsExtensions.cs index 57bc8929e106..00da12258869 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultExtendedInfoOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultExtendedInfoOperationsExtensions.cs @@ -1,157 +1,133 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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 VaultExtendedInfoOperations. + /// Extension methods for VaultExtendedInfoOperations /// public static partial class VaultExtendedInfoOperationsExtensions { - /// - /// Get the vault extended info. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - public static VaultExtendedInfoResource Get(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName) - { - return operations.GetAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); - } - - /// - /// Get the vault extended info. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Get the vault extended info. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static VaultExtendedInfoResource Get(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName) + { + return ((IVaultExtendedInfoOperations)operations).GetAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); + } - /// - /// Create vault extended info. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Details of ResourceExtendedInfo - /// - public static VaultExtendedInfoResource CreateOrUpdate(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails) + /// + /// Get the vault extended info. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) { - return operations.CreateOrUpdateAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Create vault extended info. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static VaultExtendedInfoResource CreateOrUpdate(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceExtendedInfoDetails) + { + return ((IVaultExtendedInfoOperations)operations).CreateOrUpdateAsync(resourceGroupName, vaultName, resourceExtendedInfoDetails).GetAwaiter().GetResult(); + } - /// - /// Create vault extended info. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Details of ResourceExtendedInfo - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Create vault extended info. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceExtendedInfoDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, resourceExtendedInfoDetails, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Update vault extended info. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static VaultExtendedInfoResource Update(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceExtendedInfoDetails) + { + return ((IVaultExtendedInfoOperations)operations).UpdateAsync(resourceGroupName, vaultName, resourceExtendedInfoDetails).GetAwaiter().GetResult(); + } - /// - /// Update vault extended info. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Details of ResourceExtendedInfo - /// - public static VaultExtendedInfoResource Update(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails) + /// + /// Update vault extended info. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceExtendedInfoDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vaultName, resourceExtendedInfoDetails, null, cancellationToken).ConfigureAwait(false)) { - return operations.UpdateAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Update vault extended info. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Details of ResourceExtendedInfo - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultsOperations.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultsOperations.cs index 4f951ebf0a0c..462e1ee3fbb7 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// VaultsOperations operations. /// - internal partial class VaultsOperations : IServiceOperations, IVaultsOperations + internal partial class VaultsOperations : Microsoft.Rest.IServiceOperations, IVaultsOperations { /// /// Initializes a new instance of the VaultsOperations class. @@ -36,13 +24,13 @@ internal partial class VaultsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal VaultsOperations(RecoveryServicesClient client) + internal VaultsOperations (RecoveryServicesClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -59,13 +47,13 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -74,73 +62,74 @@ 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 System.Threading.Tasks.Task>> ListBySubscriptionIdWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionId", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionId", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -152,55 +141,56 @@ internal VaultsOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -210,9 +200,10 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -223,25 +214,29 @@ internal VaultsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Retrieve a list of Vaults. /// @@ -254,13 +249,13 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -269,90 +264,91 @@ 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 System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -364,55 +360,56 @@ internal VaultsOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -422,9 +419,10 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -435,25 +433,29 @@ internal VaultsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Get the Vault details. /// @@ -469,13 +471,13 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -484,96 +486,98 @@ internal VaultsOperations(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 System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -585,55 +589,56 @@ internal VaultsOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -643,9 +648,10 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -656,25 +662,29 @@ internal VaultsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates a Recovery Services vault. /// @@ -688,16 +698,16 @@ internal VaultsOperations(RecoveryServicesClient client) /// Recovery Services Vault to be created. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -715,10 +725,10 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -727,96 +737,98 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -828,55 +840,56 @@ internal VaultsOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -886,20 +899,25 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates the vault. /// @@ -913,16 +931,16 @@ internal VaultsOperations(RecoveryServicesClient client) /// Recovery Services Vault to be created. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -943,13 +961,13 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -958,105 +976,107 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) + + + + + if (vault == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vault"); } - if (Client.SubscriptionId != null) + if (vault != null) { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } + vault.Validate(); } - if (Client.ApiVersion == null) + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.ApiVersion != null) + if (this.Client.SubscriptionId != null) { - if (Client.ApiVersion.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); - } - if (vault == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vault"); - } - if (vault != null) - { - vault.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("vault", vault); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1068,61 +1088,62 @@ internal VaultsOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(vault != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(vault, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(vault, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1132,9 +1153,10 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1145,16 +1167,16 @@ internal VaultsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -1163,25 +1185,29 @@ internal VaultsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates the vault. /// @@ -1200,13 +1226,13 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -1215,101 +1241,103 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.SubscriptionId != null) + + + + + if (vault == null) { - if (Client.SubscriptionId.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vault"); } - if (Client.ApiVersion == null) + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.ApiVersion != null) + if (this.Client.SubscriptionId != null) { - if (Client.ApiVersion.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (vaultName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); - } - if (vault == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vault"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("vault", vault); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1321,61 +1349,62 @@ internal VaultsOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(vault != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(vault, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(vault, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1385,9 +1414,10 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1398,25 +1428,29 @@ internal VaultsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Fetches all the resources of the specified type in the subscription. /// @@ -1429,13 +1463,13 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -1444,51 +1478,54 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionIdNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListBySubscriptionIdNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionIdNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionIdNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1500,55 +1537,56 @@ internal VaultsOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1558,9 +1596,10 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1571,25 +1610,29 @@ internal VaultsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Retrieve a list of Vaults. /// @@ -1602,13 +1645,13 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// 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 /// /// @@ -1617,51 +1660,54 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1673,55 +1719,56 @@ internal VaultsOperations(RecoveryServicesClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1731,9 +1778,10 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1744,24 +1792,28 @@ internal VaultsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultsOperationsExtensions.cs index 2ba27885db94..e3cf55f98014 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/Generated/VaultsOperationsExtensions.cs @@ -1,416 +1,373 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// 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 VaultsOperations. + /// Extension methods for VaultsOperations /// public static partial class VaultsOperationsExtensions { - /// - /// Fetches all the resources of the specified type in the subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListBySubscriptionId(this IVaultsOperations operations) - { - return operations.ListBySubscriptionIdAsync().GetAwaiter().GetResult(); - } - - /// - /// Fetches all the resources of the specified type in the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionIdAsync(this IVaultsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionIdWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Retrieve a list of Vaults. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static IPage ListByResourceGroup(this IVaultsOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } + /// + /// Fetches all the resources of the specified type in the subscription. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscriptionId(this IVaultsOperations operations) + { + return ((IVaultsOperations)operations).ListBySubscriptionIdAsync().GetAwaiter().GetResult(); + } - /// - /// Retrieve a list of Vaults. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IVaultsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Fetches all the resources of the specified type in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionIdAsync(this IVaultsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionIdWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Retrieve a list of Vaults. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IVaultsOperations operations, string resourceGroupName) + { + return ((IVaultsOperations)operations).ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } - /// - /// Get the Vault details. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - public static Vault Get(this IVaultsOperations operations, string resourceGroupName, string vaultName) + /// + /// Retrieve a list of Vaults. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IVaultsOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Get the Vault details. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static Vault Get(this IVaultsOperations operations, string resourceGroupName, string vaultName) + { + return ((IVaultsOperations)operations).GetAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); + } - /// - /// Get the Vault details. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Get the Vault details. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Creates or updates a Recovery Services vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static Vault CreateOrUpdate(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault) + { + return ((IVaultsOperations)operations).CreateOrUpdateAsync(resourceGroupName, vaultName, vault).GetAwaiter().GetResult(); + } - /// - /// Creates or updates a Recovery Services vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Recovery Services Vault to be created. - /// - public static Vault CreateOrUpdate(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault) + /// + /// Creates or updates a Recovery Services vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, null, cancellationToken).ConfigureAwait(false)) { - return operations.CreateOrUpdateAsync(resourceGroupName, vaultName, vault).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Deletes a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static void Delete(this IVaultsOperations operations, string resourceGroupName, string vaultName) + { + ((IVaultsOperations)operations).DeleteAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); + } - /// - /// Creates or updates a Recovery Services vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Recovery Services Vault to be created. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - public static void Delete(this IVaultsOperations operations, string resourceGroupName, string vaultName) - { - operations.DeleteAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Deletes a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Updates the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static Vault Update(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault) + { + return ((IVaultsOperations)operations).UpdateAsync(resourceGroupName, vaultName, vault).GetAwaiter().GetResult(); + } - /// - /// Updates the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Recovery Services Vault to be created. - /// - public static Vault Update(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault) + /// + /// Updates the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, null, cancellationToken).ConfigureAwait(false)) { - return operations.UpdateAsync(resourceGroupName, vaultName, vault).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Creates or updates a Recovery Services vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static Vault BeginCreateOrUpdate(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault) + { + return ((IVaultsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, vaultName, vault).GetAwaiter().GetResult(); + } - /// - /// Updates the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Recovery Services Vault to be created. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Creates or updates a Recovery Services vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Updates the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + public static Vault BeginUpdate(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault) + { + return ((IVaultsOperations)operations).BeginUpdateAsync(resourceGroupName, vaultName, vault).GetAwaiter().GetResult(); + } - /// - /// Creates or updates a Recovery Services vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Recovery Services Vault to be created. - /// - public static Vault BeginCreateOrUpdate(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault) + /// + /// Updates the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, vaultName, vault).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// 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 Microsoft.Rest.Azure.IPage ListBySubscriptionIdNext(this IVaultsOperations operations, string nextPageLink) + { + return ((IVaultsOperations)operations).ListBySubscriptionIdNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Creates or updates a Recovery Services vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Recovery Services Vault to be created. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// 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 System.Threading.Tasks.Task> ListBySubscriptionIdNextAsync(this IVaultsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionIdNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + 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 Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this IVaultsOperations operations, string nextPageLink) + { + return ((IVaultsOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Updates the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Recovery Services Vault to be created. - /// - public static Vault BeginUpdate(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault) + /// + /// 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 System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this IVaultsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginUpdateAsync(resourceGroupName, vaultName, vault).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Updates the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the recovery services vault. - /// - /// - /// Recovery Services Vault to be created. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// 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; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.Management.Sdk/README.md b/src/RecoveryServices/RecoveryServices.Management.Sdk/README.md index 33fb82b53144..4f9f7bbb7779 100644 --- a/src/RecoveryServices/RecoveryServices.Management.Sdk/README.md +++ b/src/RecoveryServices/RecoveryServices.Management.Sdk/README.md @@ -5,14 +5,14 @@ This directory contains management plane service clients of Az.RecoveryServices In this directory, run AutoRest: ``` autorest --reset -autorest --use:@microsoft.azure/autorest.csharp@2.3.90 -autorest.cmd README.md --version=v2 +autorest --use:@autorest/powershell@4.x ``` ### AutoRest Configuration > see https://aka.ms/autorest ``` yaml -csharp: true +isSdkGenerator: true +powershell: true clear-output-folder: true reflect-api-versions: true openapi-type: arm @@ -21,8 +21,6 @@ license-header: MICROSOFT_MIT_NO_VERSION payload-flattening-threshold: 2 ``` - - ### ``` yaml commit: fdf43f2fdacf17bd78c0621df44a5c024b61db82 diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IMigrationRecoveryPointsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IMigrationRecoveryPointsOperations.cs index 32330dc755d8..612560cca074 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IMigrationRecoveryPointsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IMigrationRecoveryPointsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// MigrationRecoveryPointsOperations operations. @@ -26,6 +16,9 @@ public partial interface IMigrationRecoveryPointsOperations /// /// Gets the recovery points for a migration item. /// + /// + /// Gets the recovery points for a migration item. + /// /// /// Fabric unique name. /// @@ -47,13 +40,14 @@ public partial interface IMigrationRecoveryPointsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationMigrationItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationMigrationItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a recovery point for a migration item. /// + /// + /// Gets a recovery point for a migration item. + /// /// /// Fabric unique name. /// @@ -78,13 +72,14 @@ public partial interface IMigrationRecoveryPointsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string migrationRecoveryPointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string migrationRecoveryPointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the recovery points for a migration item. /// + /// + /// Gets the recovery points for a migration item. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -100,9 +95,7 @@ public partial interface IMigrationRecoveryPointsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationMigrationItemsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationMigrationItemsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IOperations.cs index 6fe8ccf4377d..216767c24c75 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// Operations operations. @@ -24,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IOperations { /// - /// Returns the list of available operations. + /// Operation to return the list of available operations. /// /// /// Operation to return the list of available operations. @@ -41,12 +31,10 @@ public partial interface IOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Returns the list of available operations. + /// Operation to return the list of available operations. /// /// /// Operation to return the list of available operations. @@ -66,9 +54,7 @@ public partial interface IOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IRecoveryPointsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IRecoveryPointsOperations.cs index be42896c0d22..64c2d1d0c912 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IRecoveryPointsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IRecoveryPointsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// RecoveryPointsOperations operations. @@ -24,11 +14,10 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IRecoveryPointsOperations { /// - /// Gets the list of recovery points for a replication protected item. + /// Lists the available recovery points for a replication protected item. /// /// - /// Lists the available recovery points for a replication protected - /// item. + /// Lists the available recovery points for a replication protected item. /// /// /// The fabric name. @@ -51,12 +40,10 @@ public partial interface IRecoveryPointsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets a recovery point. + /// Get the details of specified recovery point. /// /// /// Get the details of specified recovery point. @@ -85,16 +72,13 @@ public partial interface IRecoveryPointsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of recovery points for a replication protected item. + /// Lists the available recovery points for a replication protected item. /// /// - /// Lists the available recovery points for a replication protected - /// item. + /// Lists the available recovery points for a replication protected item. /// /// /// The NextLink from the previous successful call to List operation. @@ -111,9 +95,7 @@ public partial interface IRecoveryPointsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationAlertSettingsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationAlertSettingsOperations.cs index c08c24a3a204..4d5a282be6f9 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationAlertSettingsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationAlertSettingsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationAlertSettingsOperations operations. @@ -24,12 +14,10 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationAlertSettingsOperations { /// - /// Gets the list of configured email notification(alert) - /// configurations. + /// Gets the list of email notification(alert) configurations for the vault. /// /// - /// Gets the list of email notification(alert) configurations for the - /// vault. + /// Gets the list of email notification(alert) configurations for the vault. /// /// /// The headers that will be added to request. @@ -43,16 +31,13 @@ public partial interface IReplicationAlertSettingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets an email notification(alert) configuration. + /// Gets the details of the specified email notification(alert) configuration. /// /// - /// Gets the details of the specified email notification(alert) - /// configuration. + /// Gets the details of the specified email notification(alert) configuration. /// /// /// The name of the email notification configuration. @@ -69,12 +54,10 @@ public partial interface IReplicationAlertSettingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string alertSettingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string alertSettingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Configures email notifications for this vault. + /// Create or update an email notification(alert) configuration. /// /// /// Create or update an email notification(alert) configuration. @@ -97,17 +80,13 @@ public partial interface IReplicationAlertSettingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string alertSettingName, ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string alertSettingName, ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of configured email notification(alert) - /// configurations. + /// Gets the list of email notification(alert) configurations for the vault. /// /// - /// Gets the list of email notification(alert) configurations for the - /// vault. + /// Gets the list of email notification(alert) configurations for the vault. /// /// /// The NextLink from the previous successful call to List operation. @@ -124,9 +103,7 @@ public partial interface IReplicationAlertSettingsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationAppliancesOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationAppliancesOperations.cs index 54fcdd53c1c9..7b17c6291ce0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationAppliancesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationAppliancesOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationAppliancesOperations operations. @@ -25,13 +14,13 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationAppliancesOperations { /// - /// Gets the list of appliances. + /// Gets the list of Azure Site Recovery appliances for the vault. /// /// /// Gets the list of Azure Site Recovery appliances for the vault. /// /// - /// OData parameters to apply to the operation. + /// /// /// /// The headers that will be added to request. @@ -45,12 +34,10 @@ public partial interface IReplicationAppliancesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of appliances. + /// Gets the list of Azure Site Recovery appliances for the vault. /// /// /// Gets the list of Azure Site Recovery appliances for the vault. @@ -70,9 +57,7 @@ public partial interface IReplicationAppliancesOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationEligibilityResultsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationEligibilityResultsOperations.cs index 897ede37416e..7ef63a01edfa 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationEligibilityResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationEligibilityResultsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationEligibilityResultsOperations operations. @@ -24,12 +14,10 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationEligibilityResultsOperations { /// - /// Gets the validation errors in case the VM is unsuitable for - /// protection. + /// Validates whether a given VM can be protected or not in which case returns list of errors. /// /// - /// Validates whether a given VM can be protected or not in which case - /// returns list of errors. + /// Validates whether a given VM can be protected or not in which case returns list of errors. /// /// /// Virtual Machine name. @@ -46,17 +34,13 @@ public partial interface IReplicationEligibilityResultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListWithHttpMessagesAsync(string virtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string virtualMachineName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the validation errors in case the VM is unsuitable for - /// protection. + /// Validates whether a given VM can be protected or not in which case returns list of errors. /// /// - /// Validates whether a given VM can be protected or not in which case - /// returns list of errors. + /// Validates whether a given VM can be protected or not in which case returns list of errors. /// /// /// Virtual Machine name. @@ -73,9 +57,7 @@ public partial interface IReplicationEligibilityResultsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string virtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string virtualMachineName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationEventsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationEventsOperations.cs index a3ea3fb30284..45ad25d26a30 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationEventsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationEventsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationEventsOperations operations. @@ -25,13 +14,13 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationEventsOperations { /// - /// Gets the list of Azure Site Recovery events. + /// Gets the list of Azure Site Recovery events for the vault. /// /// /// Gets the list of Azure Site Recovery events for the vault. /// /// - /// OData parameters to apply to the operation. + /// /// /// /// The headers that will be added to request. @@ -45,12 +34,10 @@ public partial interface IReplicationEventsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Get the details of an Azure Site recovery event. + /// The operation to get the details of an Azure Site recovery event. /// /// /// The operation to get the details of an Azure Site recovery event. @@ -70,12 +57,10 @@ public partial interface IReplicationEventsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string eventName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string eventName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of Azure Site Recovery events. + /// Gets the list of Azure Site Recovery events for the vault. /// /// /// Gets the list of Azure Site Recovery events for the vault. @@ -95,9 +80,7 @@ public partial interface IReplicationEventsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationFabricsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationFabricsOperations.cs index 5e8a04873b5d..44cda78c4950 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationFabricsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationFabricsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationFabricsOperations operations. @@ -25,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationFabricsOperations { /// - /// Gets the list of ASR fabrics. + /// Gets a list of the Azure Site Recovery fabrics in the vault. /// /// /// Gets a list of the Azure Site Recovery fabrics in the vault. @@ -42,22 +31,20 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the details of an ASR fabric. + /// Gets the details of an Azure Site Recovery fabric. /// /// /// Gets the details of an Azure Site Recovery fabric. /// + /// + /// + /// /// /// Fabric name. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The headers that will be added to request. /// @@ -70,16 +57,13 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates an Azure Site Recovery fabric. + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). /// /// - /// The operation to create an Azure Site Recovery fabric (for e.g. - /// Hyper-V site). + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). /// /// /// Name of the ASR fabric. @@ -99,12 +83,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Purges the site. + /// The operation to purge(force delete) an Azure Site Recovery fabric. /// /// /// The operation to purge(force delete) an Azure Site Recovery fabric. @@ -121,12 +103,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task PurgeWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task PurgeWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Checks the consistency of the ASR fabric. + /// The operation to perform a consistency check on the fabric. /// /// /// The operation to perform a consistency check on the fabric. @@ -146,12 +126,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CheckConsistencyWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CheckConsistencyWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Migrates the site to AAD. + /// The operation to migrate an Azure Site Recovery fabric to AAD. /// /// /// The operation to migrate an Azure Site Recovery fabric to AAD. @@ -168,16 +146,13 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task MigrateToAadWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task MigrateToAadWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Perform failover of the process server. + /// The operation to move replications from a process server to another process server. /// /// - /// The operation to move replications from a process server to another - /// process server. + /// The operation to move replications from a process server to another process server. /// /// /// The name of the fabric containing the process server. @@ -197,12 +172,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes the site. + /// The operation to delete or remove an Azure Site Recovery fabric. /// /// /// The operation to delete or remove an Azure Site Recovery fabric. @@ -219,12 +192,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Renews certificate for the fabric. + /// Renews the connection certificate for the ASR replication fabric. /// /// /// Renews the connection certificate for the ASR replication fabric. @@ -247,16 +218,13 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates an Azure Site Recovery fabric. + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). /// /// - /// The operation to create an Azure Site Recovery fabric (for e.g. - /// Hyper-V site). + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). /// /// /// Name of the ASR fabric. @@ -276,12 +244,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Purges the site. + /// The operation to purge(force delete) an Azure Site Recovery fabric. /// /// /// The operation to purge(force delete) an Azure Site Recovery fabric. @@ -298,12 +264,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginPurgeWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginPurgeWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Checks the consistency of the ASR fabric. + /// The operation to perform a consistency check on the fabric. /// /// /// The operation to perform a consistency check on the fabric. @@ -323,12 +287,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCheckConsistencyWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCheckConsistencyWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Migrates the site to AAD. + /// The operation to migrate an Azure Site Recovery fabric to AAD. /// /// /// The operation to migrate an Azure Site Recovery fabric to AAD. @@ -345,16 +307,13 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginMigrateToAadWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginMigrateToAadWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Perform failover of the process server. + /// The operation to move replications from a process server to another process server. /// /// - /// The operation to move replications from a process server to another - /// process server. + /// The operation to move replications from a process server to another process server. /// /// /// The name of the fabric containing the process server. @@ -374,12 +333,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes the site. + /// The operation to delete or remove an Azure Site Recovery fabric. /// /// /// The operation to delete or remove an Azure Site Recovery fabric. @@ -396,12 +353,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Renews certificate for the fabric. + /// Renews the connection certificate for the ASR replication fabric. /// /// /// Renews the connection certificate for the ASR replication fabric. @@ -424,12 +379,10 @@ public partial interface IReplicationFabricsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginRenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginRenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of ASR fabrics. + /// Gets a list of the Azure Site Recovery fabrics in the vault. /// /// /// Gets a list of the Azure Site Recovery fabrics in the vault. @@ -449,9 +402,7 @@ public partial interface IReplicationFabricsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationJobsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationJobsOperations.cs index 00549355c65a..71e1a784f65c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationJobsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationJobsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationJobsOperations operations. @@ -25,13 +14,13 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationJobsOperations { /// - /// Gets the list of jobs. + /// Gets the list of Azure Site Recovery Jobs for the vault. /// /// /// Gets the list of Azure Site Recovery Jobs for the vault. /// /// - /// OData parameters to apply to the operation. + /// /// /// /// The headers that will be added to request. @@ -45,12 +34,10 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the job details. + /// Get the details of an Azure Site Recovery job. /// /// /// Get the details of an Azure Site Recovery job. @@ -70,12 +57,10 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Cancels the specified job. + /// The operation to cancel an Azure Site Recovery job. /// /// /// The operation to cancel an Azure Site Recovery job. @@ -95,12 +80,10 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CancelWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CancelWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Restarts the specified job. + /// The operation to restart an Azure Site Recovery job. /// /// /// The operation to restart an Azure Site Recovery job. @@ -120,12 +103,10 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RestartWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RestartWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resumes the specified job. + /// The operation to resume an Azure Site Recovery job. /// /// /// The operation to resume an Azure Site Recovery job. @@ -148,16 +129,13 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ResumeWithHttpMessagesAsync(string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ResumeWithHttpMessagesAsync(string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Exports the details of the Azure Site Recovery jobs of the vault. + /// The operation to export the details of the Azure Site Recovery jobs of the vault. /// /// - /// The operation to export the details of the Azure Site Recovery jobs - /// of the vault. + /// The operation to export the details of the Azure Site Recovery jobs of the vault. /// /// /// job query filter. @@ -174,12 +152,10 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Cancels the specified job. + /// The operation to cancel an Azure Site Recovery job. /// /// /// The operation to cancel an Azure Site Recovery job. @@ -199,12 +175,10 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCancelWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCancelWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Restarts the specified job. + /// The operation to restart an Azure Site Recovery job. /// /// /// The operation to restart an Azure Site Recovery job. @@ -224,12 +198,10 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginRestartWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginRestartWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resumes the specified job. + /// The operation to resume an Azure Site Recovery job. /// /// /// The operation to resume an Azure Site Recovery job. @@ -252,16 +224,13 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginResumeWithHttpMessagesAsync(string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginResumeWithHttpMessagesAsync(string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Exports the details of the Azure Site Recovery jobs of the vault. + /// The operation to export the details of the Azure Site Recovery jobs of the vault. /// /// - /// The operation to export the details of the Azure Site Recovery jobs - /// of the vault. + /// The operation to export the details of the Azure Site Recovery jobs of the vault. /// /// /// job query filter. @@ -278,12 +247,10 @@ public partial interface IReplicationJobsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of jobs. + /// Gets the list of Azure Site Recovery Jobs for the vault. /// /// /// Gets the list of Azure Site Recovery Jobs for the vault. @@ -303,9 +270,7 @@ public partial interface IReplicationJobsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationLogicalNetworksOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationLogicalNetworksOperations.cs index b3e43325a496..5f0d9f0b7d65 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationLogicalNetworksOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationLogicalNetworksOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationLogicalNetworksOperations operations. @@ -24,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationLogicalNetworksOperations { /// - /// Gets the list of logical networks under a fabric. + /// Lists all the logical networks of the Azure Site Recovery fabric. /// /// /// Lists all the logical networks of the Azure Site Recovery fabric. @@ -44,13 +34,10 @@ public partial interface IReplicationLogicalNetworksOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets a logical network with specified server id and logical network - /// name. + /// Gets the details of a logical network. /// /// /// Gets the details of a logical network. @@ -73,12 +60,10 @@ public partial interface IReplicationLogicalNetworksOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string logicalNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string logicalNetworkName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of logical networks under a fabric. + /// Lists all the logical networks of the Azure Site Recovery fabric. /// /// /// Lists all the logical networks of the Azure Site Recovery fabric. @@ -98,9 +83,7 @@ public partial interface IReplicationLogicalNetworksOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationMigrationItemsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationMigrationItemsOperations.cs index 1dd9372c0898..00ff85cfaba6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationMigrationItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationMigrationItemsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationMigrationItemsOperations operations. @@ -25,20 +14,20 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationMigrationItemsOperations { /// - /// Gets the list of migration items in the protection container. + /// Gets the list of ASR migration items in the protection container. /// /// /// Gets the list of ASR migration items in the protection container. /// + /// + /// + /// /// /// Fabric name. /// /// /// Protection container name. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The pagination token. /// @@ -57,13 +46,14 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string takeToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), string takeToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the details of a migration item. /// + /// + /// Gets the details of a migration item. + /// /// /// Fabric unique name. /// @@ -85,12 +75,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Enables migration. + /// The operation to create an ASR migration item (enable migration). /// /// /// The operation to create an ASR migration item (enable migration). @@ -119,12 +107,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete the migration item. + /// The operation to delete an ASR migration item. /// /// /// The operation to delete an ASR migration item. @@ -150,16 +136,13 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates migration item. + /// The operation to update the recovery settings of an ASR migration item. /// /// - /// The operation to update the recovery settings of an ASR migration - /// item. + /// The operation to update the recovery settings of an ASR migration item. /// /// /// Fabric name. @@ -185,12 +168,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Migrate item. + /// The operation to initiate migration of the item. /// /// /// The operation to initiate migration of the item. @@ -219,12 +200,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> MigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> MigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Pause replication. + /// The operation to initiate pause replication of the item. /// /// /// The operation to initiate pause replication of the item. @@ -253,12 +232,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> PauseReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> PauseReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resume replication. + /// The operation to initiate resume replication of the item. /// /// /// The operation to initiate resume replication of the item. @@ -287,16 +264,13 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ResumeReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ResumeReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resynchronizes replication. + /// The operation to resynchronize replication of an ASR migration item. /// /// - /// The operation to resynchronize replication of an ASR migration - /// item. + /// The operation to resynchronize replication of an ASR migration item. /// /// /// Fabric name. @@ -322,12 +296,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Test migrate item. + /// The operation to initiate test migration of the item. /// /// /// The operation to initiate test migration of the item. @@ -356,12 +328,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> TestMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> TestMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Test migrate cleanup. + /// The operation to initiate test migrate cleanup. /// /// /// The operation to initiate test migrate cleanup. @@ -390,15 +360,16 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> TestMigrateCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> TestMigrateCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the list of migration items in the vault. /// + /// + /// Gets the list of migration items in the vault. + /// /// - /// OData parameters to apply to the operation. + /// /// /// /// The pagination token. @@ -418,12 +389,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string takeToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), string takeToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Enables migration. + /// The operation to create an ASR migration item (enable migration). /// /// /// The operation to create an ASR migration item (enable migration). @@ -452,12 +421,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete the migration item. + /// The operation to delete an ASR migration item. /// /// /// The operation to delete an ASR migration item. @@ -483,16 +450,13 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates migration item. + /// The operation to update the recovery settings of an ASR migration item. /// /// - /// The operation to update the recovery settings of an ASR migration - /// item. + /// The operation to update the recovery settings of an ASR migration item. /// /// /// Fabric name. @@ -518,12 +482,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Migrate item. + /// The operation to initiate migration of the item. /// /// /// The operation to initiate migration of the item. @@ -552,12 +514,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Pause replication. + /// The operation to initiate pause replication of the item. /// /// /// The operation to initiate pause replication of the item. @@ -586,12 +546,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginPauseReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginPauseReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resume replication. + /// The operation to initiate resume replication of the item. /// /// /// The operation to initiate resume replication of the item. @@ -620,16 +578,13 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginResumeReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginResumeReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resynchronizes replication. + /// The operation to resynchronize replication of an ASR migration item. /// /// - /// The operation to resynchronize replication of an ASR migration - /// item. + /// The operation to resynchronize replication of an ASR migration item. /// /// /// Fabric name. @@ -655,12 +610,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Test migrate item. + /// The operation to initiate test migration of the item. /// /// /// The operation to initiate test migration of the item. @@ -689,12 +642,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginTestMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginTestMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Test migrate cleanup. + /// The operation to initiate test migrate cleanup. /// /// /// The operation to initiate test migrate cleanup. @@ -723,12 +674,10 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginTestMigrateCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginTestMigrateCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of migration items in the protection container. + /// Gets the list of ASR migration items in the protection container. /// /// /// Gets the list of ASR migration items in the protection container. @@ -748,13 +697,14 @@ public partial interface IReplicationMigrationItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the list of migration items in the vault. /// + /// + /// Gets the list of migration items in the vault. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -770,9 +720,7 @@ public partial interface IReplicationMigrationItemsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationNetworkMappingsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationNetworkMappingsOperations.cs index c2c5d82bbb9d..57b330a6d79c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationNetworkMappingsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationNetworkMappingsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationNetworkMappingsOperations operations. @@ -24,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationNetworkMappingsOperations { /// - /// Gets all the network mappings under a network. + /// Lists all ASR network mappings for the specified network. /// /// /// Lists all ASR network mappings for the specified network. @@ -47,12 +37,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationNetworksWithHttpMessagesAsync(string fabricName, string networkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationNetworksWithHttpMessagesAsync(string fabricName, string networkName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets network mapping by name. + /// Gets the details of an ASR network mapping. /// /// /// Gets the details of an ASR network mapping. @@ -78,12 +66,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates network mapping. + /// The operation to create an ASR network mapping. /// /// /// The operation to create an ASR network mapping. @@ -112,12 +98,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete network mapping. + /// The operation to delete a network mapping. /// /// /// The operation to delete a network mapping. @@ -140,12 +124,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates network mapping. + /// The operation to update an ASR network mapping. /// /// /// The operation to update an ASR network mapping. @@ -174,12 +156,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets all the network mappings under a vault. + /// Lists all ASR network mappings in the vault. /// /// /// Lists all ASR network mappings in the vault. @@ -196,12 +176,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates network mapping. + /// The operation to create an ASR network mapping. /// /// /// The operation to create an ASR network mapping. @@ -230,12 +208,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete network mapping. + /// The operation to delete a network mapping. /// /// /// The operation to delete a network mapping. @@ -258,12 +234,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates network mapping. + /// The operation to update an ASR network mapping. /// /// /// The operation to update an ASR network mapping. @@ -292,12 +266,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets all the network mappings under a network. + /// Lists all ASR network mappings for the specified network. /// /// /// Lists all ASR network mappings for the specified network. @@ -317,12 +289,10 @@ public partial interface IReplicationNetworkMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationNetworksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationNetworksNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets all the network mappings under a vault. + /// Lists all ASR network mappings in the vault. /// /// /// Lists all ASR network mappings in the vault. @@ -342,9 +312,7 @@ public partial interface IReplicationNetworkMappingsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationNetworksOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationNetworksOperations.cs index 4d3b1d05978d..19b5c39d38d4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationNetworksOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationNetworksOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationNetworksOperations operations. @@ -24,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationNetworksOperations { /// - /// Gets the list of networks under a fabric. + /// Lists the networks available for a fabric. /// /// /// Lists the networks available for a fabric. @@ -44,12 +34,10 @@ public partial interface IReplicationNetworksOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets a network with specified server id and network name. + /// Gets the details of a network. /// /// /// Gets the details of a network. @@ -72,12 +60,10 @@ public partial interface IReplicationNetworksOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string networkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string networkName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of networks. View-only API. + /// Lists the networks available in a vault. /// /// /// Lists the networks available in a vault. @@ -94,12 +80,10 @@ public partial interface IReplicationNetworksOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of networks under a fabric. + /// Lists the networks available for a fabric. /// /// /// Lists the networks available for a fabric. @@ -119,12 +103,10 @@ public partial interface IReplicationNetworksOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of networks. View-only API. + /// Lists the networks available in a vault. /// /// /// Lists the networks available in a vault. @@ -144,9 +126,7 @@ public partial interface IReplicationNetworksOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationPoliciesOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationPoliciesOperations.cs index c8d294713d29..8d3da85d7408 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationPoliciesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationPoliciesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationPoliciesOperations operations. @@ -24,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationPoliciesOperations { /// - /// Gets the list of replication policies. + /// Lists the replication policies for a vault. /// /// /// Lists the replication policies for a vault. @@ -41,12 +31,10 @@ public partial interface IReplicationPoliciesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the requested policy. + /// Gets the details of a replication policy. /// /// /// Gets the details of a replication policy. @@ -66,12 +54,10 @@ public partial interface IReplicationPoliciesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates the policy. + /// The operation to create a replication policy. /// /// /// The operation to create a replication policy. @@ -94,12 +80,10 @@ public partial interface IReplicationPoliciesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete the policy. + /// The operation to delete a replication policy. /// /// /// The operation to delete a replication policy. @@ -116,12 +100,10 @@ public partial interface IReplicationPoliciesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates the policy. + /// The operation to update a replication policy. /// /// /// The operation to update a replication policy. @@ -144,12 +126,10 @@ public partial interface IReplicationPoliciesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates the policy. + /// The operation to create a replication policy. /// /// /// The operation to create a replication policy. @@ -172,12 +152,10 @@ public partial interface IReplicationPoliciesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete the policy. + /// The operation to delete a replication policy. /// /// /// The operation to delete a replication policy. @@ -194,12 +172,10 @@ public partial interface IReplicationPoliciesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates the policy. + /// The operation to update a replication policy. /// /// /// The operation to update a replication policy. @@ -222,12 +198,10 @@ public partial interface IReplicationPoliciesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of replication policies. + /// Lists the replication policies for a vault. /// /// /// Lists the replication policies for a vault. @@ -247,9 +221,7 @@ public partial interface IReplicationPoliciesOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectableItemsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectableItemsOperations.cs index c3d1f02a9257..7b8c12891d27 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectableItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectableItemsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationProtectableItemsOperations operations. @@ -25,20 +14,20 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationProtectableItemsOperations { /// - /// Gets the list of protectable items. + /// Lists the protectable items in a protection container. /// /// /// Lists the protectable items in a protection container. /// + /// + /// + /// /// /// Fabric name. /// /// /// Protection container name. /// - /// - /// OData parameters to apply to the operation. - /// /// /// take OData query parameter. /// @@ -57,12 +46,10 @@ public partial interface IReplicationProtectableItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, ODataQuery odataQuery = default(ODataQuery), string take = default(string), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string take = default(string), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the details of a protectable item. + /// The operation to get the details of a protectable item. /// /// /// The operation to get the details of a protectable item. @@ -88,12 +75,10 @@ public partial interface IReplicationProtectableItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string protectableItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string protectableItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of protectable items. + /// Lists the protectable items in a protection container. /// /// /// Lists the protectable items in a protection container. @@ -113,9 +98,7 @@ public partial interface IReplicationProtectableItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectedItemsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectedItemsOperations.cs index 9a6323622eca..01168e380b38 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectedItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectedItemsOperations.cs @@ -1,23 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationProtectedItemsOperations operations. @@ -25,11 +14,10 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationProtectedItemsOperations { /// - /// Gets the list of Replication protected items. + /// Gets the list of ASR replication protected items in the protection container. /// /// - /// Gets the list of ASR replication protected items in the protection - /// container. + /// Gets the list of ASR replication protected items in the protection container. /// /// /// Fabric name. @@ -49,12 +37,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the details of a Replication protected item. + /// Gets the details of an ASR replication protected item. /// /// /// Gets the details of an ASR replication protected item. @@ -80,16 +66,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Enables protection. + /// The operation to create an ASR replication protected item (Enable replication). /// /// - /// The operation to create an ASR replication protected item (Enable - /// replication). + /// The operation to create an ASR replication protected item (Enable replication). /// /// /// Name of the fabric. @@ -115,18 +98,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Purges protection. + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. /// /// - /// The operation to delete or purge a replication protected item. This - /// operation will force delete the replication protected item. Use the - /// remove operation on replication protected item to perform a clean - /// disable replication for the item. + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. /// /// /// Fabric name. @@ -146,16 +124,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates the replication protected item settings. + /// The operation to update the recovery settings of an ASR replication protected item. /// /// - /// The operation to update the recovery settings of an ASR replication - /// protected item. + /// The operation to update the recovery settings of an ASR replication protected item. /// /// /// Fabric name. @@ -181,12 +156,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Add disk(s) for protection. + /// Operation to add disks(s) to the replication protected item. /// /// /// Operation to add disks(s) to the replication protected item. @@ -215,16 +188,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> AddDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> AddDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Change or apply recovery point. + /// The operation to change the recovery point of a failed over replication protected item. /// /// - /// The operation to change the recovery point of a failed over - /// replication protected item. + /// The operation to change the recovery point of a failed over replication protected item. /// /// /// The ARM fabric name. @@ -250,12 +220,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute cancel failover. + /// Operation to cancel the failover of the replication protected item. /// /// /// Operation to cancel the failover of the replication protected item. @@ -281,12 +249,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> FailoverCancelWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> FailoverCancelWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute commit failover. + /// Operation to commit the failover of the replication protected item. /// /// /// Operation to commit the failover of the replication protected item. @@ -312,16 +278,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> FailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> FailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute planned failover. + /// Operation to initiate a planned failover of the replication protected item. /// /// - /// Operation to initiate a planned failover of the replication - /// protected item. + /// Operation to initiate a planned failover of the replication protected item. /// /// /// Unique fabric name. @@ -347,16 +310,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> PlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> PlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Disables protection. + /// The operation to disable replication on a replication protected item. This will also remove the item. /// /// - /// The operation to disable replication on a replication protected - /// item. This will also remove the item. + /// The operation to disable replication on a replication protected item. This will also remove the item. /// /// /// Fabric name. @@ -379,12 +339,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Removes disk(s). + /// Operation to remove disk(s) from the replication protected item. /// /// /// Operation to remove disk(s) from the replication protected item. @@ -413,16 +371,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RemoveDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RemoveDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resynchronize or repair replication. + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. /// /// - /// The operation to start resynchronize/repair replication for a - /// replication protected item requiring resynchronization. + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. /// /// /// The name of the fabric. @@ -445,16 +400,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute Reverse Replication\Reprotect. + /// Operation to reprotect or reverse replicate a failed over replication protected item. /// /// - /// Operation to reprotect or reverse replicate a failed over - /// replication protected item. + /// Operation to reprotect or reverse replicate a failed over replication protected item. /// /// /// Unique fabric name. @@ -480,16 +432,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resolve health errors. + /// Operation to resolve health issues of the replication protected item. /// /// - /// Operation to resolve health issues of the replication protected - /// item. + /// Operation to resolve health issues of the replication protected item. /// /// /// Unique fabric name. @@ -515,16 +464,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ResolveHealthErrorsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ResolveHealthErrorsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute switch provider. + /// Operation to initiate a switch provider of the replication protected item. /// /// - /// Operation to initiate a switch provider of the replication - /// protected item. + /// Operation to initiate a switch provider of the replication protected item. /// /// /// Unique fabric name. @@ -550,16 +496,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> SwitchProviderWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> SwitchProviderWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute test failover. + /// Operation to perform a test failover of the replication protected item. /// /// - /// Operation to perform a test failover of the replication protected - /// item. + /// Operation to perform a test failover of the replication protected item. /// /// /// Unique fabric name. @@ -585,16 +528,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> TestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> TestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute test failover cleanup. + /// Operation to clean up the test failover of a replication protected item. /// /// - /// Operation to clean up the test failover of a replication protected - /// item. + /// Operation to clean up the test failover of a replication protected item. /// /// /// Unique fabric name. @@ -620,12 +560,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> TestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> TestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute unplanned failover. + /// Operation to initiate a failover of the replication protected item. /// /// /// Operation to initiate a failover of the replication protected item. @@ -654,16 +592,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates appliance for replication protected Item. + /// The operation to update appliance of an ASR replication protected item. /// /// - /// The operation to update appliance of an ASR replication protected - /// item. + /// The operation to update appliance of an ASR replication protected item. /// /// /// Fabric name. @@ -689,17 +624,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateApplianceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateApplianceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Update the mobility service on a protected item. + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. /// /// - /// The operation to update(push update) the installed mobility service - /// software on a replication protected item to the latest available - /// version. + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. /// /// /// The name of the fabric containing the protected item. @@ -725,22 +656,19 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of replication protected items. + /// Gets the list of ASR replication protected items in the vault. /// /// /// Gets the list of ASR replication protected items in the vault. /// /// - /// OData parameters to apply to the operation. + /// /// /// - /// The pagination token. Possible values: "FabricId" or - /// "FabricId_CloudId" or null. + /// The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. /// /// /// The headers that will be added to request. @@ -754,16 +682,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Enables protection. + /// The operation to create an ASR replication protected item (Enable replication). /// /// - /// The operation to create an ASR replication protected item (Enable - /// replication). + /// The operation to create an ASR replication protected item (Enable replication). /// /// /// Name of the fabric. @@ -789,18 +714,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Purges protection. + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. /// /// - /// The operation to delete or purge a replication protected item. This - /// operation will force delete the replication protected item. Use the - /// remove operation on replication protected item to perform a clean - /// disable replication for the item. + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. /// /// /// Fabric name. @@ -820,16 +740,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates the replication protected item settings. + /// The operation to update the recovery settings of an ASR replication protected item. /// /// - /// The operation to update the recovery settings of an ASR replication - /// protected item. + /// The operation to update the recovery settings of an ASR replication protected item. /// /// /// Fabric name. @@ -855,12 +772,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Add disk(s) for protection. + /// Operation to add disks(s) to the replication protected item. /// /// /// Operation to add disks(s) to the replication protected item. @@ -889,16 +804,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginAddDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginAddDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Change or apply recovery point. + /// The operation to change the recovery point of a failed over replication protected item. /// /// - /// The operation to change the recovery point of a failed over - /// replication protected item. + /// The operation to change the recovery point of a failed over replication protected item. /// /// /// The ARM fabric name. @@ -924,12 +836,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute cancel failover. + /// Operation to cancel the failover of the replication protected item. /// /// /// Operation to cancel the failover of the replication protected item. @@ -955,12 +865,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginFailoverCancelWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginFailoverCancelWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute commit failover. + /// Operation to commit the failover of the replication protected item. /// /// /// Operation to commit the failover of the replication protected item. @@ -986,16 +894,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginFailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginFailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute planned failover. + /// Operation to initiate a planned failover of the replication protected item. /// /// - /// Operation to initiate a planned failover of the replication - /// protected item. + /// Operation to initiate a planned failover of the replication protected item. /// /// /// Unique fabric name. @@ -1021,16 +926,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginPlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginPlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Disables protection. + /// The operation to disable replication on a replication protected item. This will also remove the item. /// /// - /// The operation to disable replication on a replication protected - /// item. This will also remove the item. + /// The operation to disable replication on a replication protected item. This will also remove the item. /// /// /// Fabric name. @@ -1053,12 +955,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Removes disk(s). + /// Operation to remove disk(s) from the replication protected item. /// /// /// Operation to remove disk(s) from the replication protected item. @@ -1087,16 +987,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginRemoveDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginRemoveDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resynchronize or repair replication. + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. /// /// - /// The operation to start resynchronize/repair replication for a - /// replication protected item requiring resynchronization. + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. /// /// /// The name of the fabric. @@ -1119,16 +1016,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginRepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginRepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute Reverse Replication\Reprotect. + /// Operation to reprotect or reverse replicate a failed over replication protected item. /// /// - /// Operation to reprotect or reverse replicate a failed over - /// replication protected item. + /// Operation to reprotect or reverse replicate a failed over replication protected item. /// /// /// Unique fabric name. @@ -1154,16 +1048,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Resolve health errors. + /// Operation to resolve health issues of the replication protected item. /// /// - /// Operation to resolve health issues of the replication protected - /// item. + /// Operation to resolve health issues of the replication protected item. /// /// /// Unique fabric name. @@ -1189,16 +1080,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginResolveHealthErrorsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginResolveHealthErrorsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute switch provider. + /// Operation to initiate a switch provider of the replication protected item. /// /// - /// Operation to initiate a switch provider of the replication - /// protected item. + /// Operation to initiate a switch provider of the replication protected item. /// /// /// Unique fabric name. @@ -1224,16 +1112,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginSwitchProviderWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginSwitchProviderWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute test failover. + /// Operation to perform a test failover of the replication protected item. /// /// - /// Operation to perform a test failover of the replication protected - /// item. + /// Operation to perform a test failover of the replication protected item. /// /// /// Unique fabric name. @@ -1259,16 +1144,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginTestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginTestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute test failover cleanup. + /// Operation to clean up the test failover of a replication protected item. /// /// - /// Operation to clean up the test failover of a replication protected - /// item. + /// Operation to clean up the test failover of a replication protected item. /// /// /// Unique fabric name. @@ -1294,12 +1176,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute unplanned failover. + /// Operation to initiate a failover of the replication protected item. /// /// /// Operation to initiate a failover of the replication protected item. @@ -1328,16 +1208,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates appliance for replication protected Item. + /// The operation to update appliance of an ASR replication protected item. /// /// - /// The operation to update appliance of an ASR replication protected - /// item. + /// The operation to update appliance of an ASR replication protected item. /// /// /// Fabric name. @@ -1363,17 +1240,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateApplianceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateApplianceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Update the mobility service on a protected item. + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. /// /// - /// The operation to update(push update) the installed mobility service - /// software on a replication protected item to the latest available - /// version. + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. /// /// /// The name of the fabric containing the protected item. @@ -1399,16 +1272,13 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of Replication protected items. + /// Gets the list of ASR replication protected items in the protection container. /// /// - /// Gets the list of ASR replication protected items in the protection - /// container. + /// Gets the list of ASR replication protected items in the protection container. /// /// /// The NextLink from the previous successful call to List operation. @@ -1425,12 +1295,10 @@ public partial interface IReplicationProtectedItemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of replication protected items. + /// Gets the list of ASR replication protected items in the vault. /// /// /// Gets the list of ASR replication protected items in the vault. @@ -1450,9 +1318,7 @@ public partial interface IReplicationProtectedItemsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionContainerMappingsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionContainerMappingsOperations.cs index 40c75ee262dd..6a105f659f3e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionContainerMappingsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionContainerMappingsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationProtectionContainerMappingsOperations operations. @@ -24,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationProtectionContainerMappingsOperations { /// - /// Gets the list of protection container mappings for a protection - /// container. + /// Lists the protection container mappings for a protection container. /// /// /// Lists the protection container mappings for a protection container. @@ -48,12 +37,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets a protection container mapping. + /// Gets the details of a protection container mapping. /// /// /// Gets the details of a protection container mapping. @@ -79,12 +66,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Create protection container mapping. + /// The operation to create a protection container mapping. /// /// /// The operation to create a protection container mapping. @@ -113,16 +98,13 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Purge protection container mapping. + /// The operation to purge(force delete) a protection container mapping. /// /// - /// The operation to purge(force delete) a protection container - /// mapping. + /// The operation to purge(force delete) a protection container mapping. /// /// /// Fabric name. @@ -142,12 +124,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Update protection container mapping. + /// The operation to update protection container mapping. /// /// /// The operation to update protection container mapping. @@ -176,12 +156,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Remove protection container mapping. + /// The operation to delete or remove a protection container mapping. /// /// /// The operation to delete or remove a protection container mapping. @@ -207,12 +185,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of all protection container mappings in a vault. + /// Lists the protection container mappings in the vault. /// /// /// Lists the protection container mappings in the vault. @@ -229,12 +205,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Create protection container mapping. + /// The operation to create a protection container mapping. /// /// /// The operation to create a protection container mapping. @@ -263,16 +237,13 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Purge protection container mapping. + /// The operation to purge(force delete) a protection container mapping. /// /// - /// The operation to purge(force delete) a protection container - /// mapping. + /// The operation to purge(force delete) a protection container mapping. /// /// /// Fabric name. @@ -292,12 +263,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Update protection container mapping. + /// The operation to update protection container mapping. /// /// /// The operation to update protection container mapping. @@ -326,12 +295,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Remove protection container mapping. + /// The operation to delete or remove a protection container mapping. /// /// /// The operation to delete or remove a protection container mapping. @@ -357,13 +324,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of protection container mappings for a protection - /// container. + /// Lists the protection container mappings for a protection container. /// /// /// Lists the protection container mappings for a protection container. @@ -383,12 +347,10 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of all protection container mappings in a vault. + /// Lists the protection container mappings in the vault. /// /// /// Lists the protection container mappings in the vault. @@ -408,9 +370,7 @@ public partial interface IReplicationProtectionContainerMappingsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionContainersOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionContainersOperations.cs index b1e1c8d4f4c9..654c6b09ccec 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionContainersOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationProtectionContainersOperations operations. @@ -24,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationProtectionContainersOperations { /// - /// Gets the list of protection container for a fabric. + /// Lists the protection containers in the specified fabric. /// /// /// Lists the protection containers in the specified fabric. @@ -44,12 +34,10 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the protection container details. + /// Gets the details of a protection container. /// /// /// Gets the details of a protection container. @@ -72,12 +60,10 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Create a protection container. + /// Operation to create a protection container. /// /// /// Operation to create a protection container. @@ -103,16 +89,13 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Adds a protectable item to the replication protection container. + /// The operation to a add a protectable item to a protection container(Add physical server). /// /// - /// The operation to a add a protectable item to a protection - /// container(Add physical server). + /// The operation to a add a protectable item to a protection container(Add physical server). /// /// /// The name of the fabric. @@ -135,12 +118,10 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> DiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> DiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Removes a protection container. + /// Operation to remove a protection container. /// /// /// Operation to remove a protection container. @@ -160,17 +141,13 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Switches protection from one container to another or one - /// replication provider to another. + /// Operation to switch protection from one container to another or one replication provider to another. /// /// - /// Operation to switch protection from one container to another or one - /// replication provider to another. + /// Operation to switch protection from one container to another or one replication provider to another. /// /// /// Unique fabric name. @@ -193,12 +170,10 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> SwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> SwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of all protection containers in a vault. + /// Lists the protection containers in a vault. /// /// /// Lists the protection containers in a vault. @@ -215,12 +190,10 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Create a protection container. + /// Operation to create a protection container. /// /// /// Operation to create a protection container. @@ -246,16 +219,13 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Adds a protectable item to the replication protection container. + /// The operation to a add a protectable item to a protection container(Add physical server). /// /// - /// The operation to a add a protectable item to a protection - /// container(Add physical server). + /// The operation to a add a protectable item to a protection container(Add physical server). /// /// /// The name of the fabric. @@ -278,12 +248,10 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginDiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginDiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Removes a protection container. + /// Operation to remove a protection container. /// /// /// Operation to remove a protection container. @@ -303,17 +271,13 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Switches protection from one container to another or one - /// replication provider to another. + /// Operation to switch protection from one container to another or one replication provider to another. /// /// - /// Operation to switch protection from one container to another or one - /// replication provider to another. + /// Operation to switch protection from one container to another or one replication provider to another. /// /// /// Unique fabric name. @@ -336,12 +300,10 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginSwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginSwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of protection container for a fabric. + /// Lists the protection containers in the specified fabric. /// /// /// Lists the protection containers in the specified fabric. @@ -361,12 +323,10 @@ public partial interface IReplicationProtectionContainersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of all protection containers in a vault. + /// Lists the protection containers in a vault. /// /// /// Lists the protection containers in a vault. @@ -386,9 +346,7 @@ public partial interface IReplicationProtectionContainersOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionIntentsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionIntentsOperations.cs index 69c8c51f1b0d..4289ea239d31 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionIntentsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationProtectionIntentsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationProtectionIntentsOperations operations. @@ -24,11 +14,10 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationProtectionIntentsOperations { /// - /// Gets the list of replication protection intent objects. + /// Gets the list of ASR replication protection intent objects in the vault. /// /// - /// Gets the list of ASR replication protection intent objects in the - /// vault. + /// Gets the list of ASR replication protection intent objects in the vault. /// /// /// The pagination token. @@ -48,12 +37,10 @@ public partial interface IReplicationProtectionIntentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string skipToken = default(string), string takeToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string skipToken = default(string), string takeToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the details of a Replication protection intent item. + /// Gets the details of an ASR replication protection intent. /// /// /// Gets the details of an ASR replication protection intent. @@ -73,12 +60,10 @@ public partial interface IReplicationProtectionIntentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string intentObjectName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string intentObjectName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Create protection intent Resource. + /// The operation to create an ASR replication protection intent item. /// /// /// The operation to create an ASR replication protection intent item. @@ -101,16 +86,13 @@ public partial interface IReplicationProtectionIntentsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string intentObjectName, CreateProtectionIntentProperties properties = default(CreateProtectionIntentProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string intentObjectName, CreateProtectionIntentProperties properties = default(CreateProtectionIntentProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of replication protection intent objects. + /// Gets the list of ASR replication protection intent objects in the vault. /// /// - /// Gets the list of ASR replication protection intent objects in the - /// vault. + /// Gets the list of ASR replication protection intent objects in the vault. /// /// /// The NextLink from the previous successful call to List operation. @@ -127,9 +109,7 @@ public partial interface IReplicationProtectionIntentsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationRecoveryPlansOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationRecoveryPlansOperations.cs index aa5be01753f9..637c1544d5d3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationRecoveryPlansOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationRecoveryPlansOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationRecoveryPlansOperations operations. @@ -24,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationRecoveryPlansOperations { /// - /// Gets the list of recovery plans. + /// Lists the recovery plans in the vault. /// /// /// Lists the recovery plans in the vault. @@ -41,12 +31,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the requested recovery plan. + /// Gets the details of the recovery plan. /// /// /// Gets the details of the recovery plan. @@ -66,12 +54,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates a recovery plan with the given details. + /// The operation to create a recovery plan. /// /// /// The operation to create a recovery plan. @@ -94,12 +80,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes the specified recovery plan. + /// Delete a recovery plan. /// /// /// Delete a recovery plan. @@ -116,12 +100,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates the given recovery plan. + /// The operation to update a recovery plan. /// /// /// The operation to update a recovery plan. @@ -144,12 +126,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute cancel failover of the recovery plan. + /// The operation to cancel the failover of a recovery plan. /// /// /// The operation to cancel the failover of a recovery plan. @@ -169,12 +149,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> FailoverCancelWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> FailoverCancelWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute commit failover of the recovery plan. + /// The operation to commit the failover of a recovery plan. /// /// /// The operation to commit the failover of a recovery plan. @@ -194,12 +172,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> FailoverCommitWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> FailoverCommitWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute planned failover of the recovery plan. + /// The operation to start the planned failover of a recovery plan. /// /// /// The operation to start the planned failover of a recovery plan. @@ -222,12 +198,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> PlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> PlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute reprotect of the recovery plan. + /// The operation to reprotect(reverse replicate) a recovery plan. /// /// /// The operation to reprotect(reverse replicate) a recovery plan. @@ -247,12 +221,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ReprotectWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ReprotectWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute test failover of the recovery plan. + /// The operation to start the test failover of a recovery plan. /// /// /// The operation to start the test failover of a recovery plan. @@ -275,12 +247,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> TestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> TestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute test failover cleanup of the recovery plan. + /// The operation to cleanup test failover of a recovery plan. /// /// /// The operation to cleanup test failover of a recovery plan. @@ -303,12 +273,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> TestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> TestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute unplanned failover of the recovery plan. + /// The operation to start the unplanned failover of a recovery plan. /// /// /// The operation to start the unplanned failover of a recovery plan. @@ -331,12 +299,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates a recovery plan with the given details. + /// The operation to create a recovery plan. /// /// /// The operation to create a recovery plan. @@ -359,12 +325,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes the specified recovery plan. + /// Delete a recovery plan. /// /// /// Delete a recovery plan. @@ -381,12 +345,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates the given recovery plan. + /// The operation to update a recovery plan. /// /// /// The operation to update a recovery plan. @@ -409,12 +371,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute cancel failover of the recovery plan. + /// The operation to cancel the failover of a recovery plan. /// /// /// The operation to cancel the failover of a recovery plan. @@ -434,12 +394,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginFailoverCancelWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginFailoverCancelWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute commit failover of the recovery plan. + /// The operation to commit the failover of a recovery plan. /// /// /// The operation to commit the failover of a recovery plan. @@ -459,12 +417,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginFailoverCommitWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginFailoverCommitWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute planned failover of the recovery plan. + /// The operation to start the planned failover of a recovery plan. /// /// /// The operation to start the planned failover of a recovery plan. @@ -487,12 +443,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginPlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginPlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute reprotect of the recovery plan. + /// The operation to reprotect(reverse replicate) a recovery plan. /// /// /// The operation to reprotect(reverse replicate) a recovery plan. @@ -512,12 +466,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginReprotectWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginReprotectWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute test failover of the recovery plan. + /// The operation to start the test failover of a recovery plan. /// /// /// The operation to start the test failover of a recovery plan. @@ -540,12 +492,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginTestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginTestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute test failover cleanup of the recovery plan. + /// The operation to cleanup test failover of a recovery plan. /// /// /// The operation to cleanup test failover of a recovery plan. @@ -568,12 +518,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Execute unplanned failover of the recovery plan. + /// The operation to start the unplanned failover of a recovery plan. /// /// /// The operation to start the unplanned failover of a recovery plan. @@ -596,12 +544,10 @@ public partial interface IReplicationRecoveryPlansOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of recovery plans. + /// Lists the recovery plans in the vault. /// /// /// Lists the recovery plans in the vault. @@ -621,9 +567,7 @@ public partial interface IReplicationRecoveryPlansOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationRecoveryServicesProvidersOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationRecoveryServicesProvidersOperations.cs index 8cd554414eb3..496de510bb4b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationRecoveryServicesProvidersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationRecoveryServicesProvidersOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationRecoveryServicesProvidersOperations operations. @@ -24,12 +14,10 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationRecoveryServicesProvidersOperations { /// - /// Gets the list of registered recovery services providers for the - /// fabric. + /// Lists the registered recovery services providers for the specified fabric. /// /// - /// Lists the registered recovery services providers for the specified - /// fabric. + /// Lists the registered recovery services providers for the specified fabric. /// /// /// Fabric name. @@ -46,12 +34,10 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the details of a recovery services provider. + /// Gets the details of registered recovery services provider. /// /// /// Gets the details of registered recovery services provider. @@ -74,12 +60,10 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Adds a recovery services provider. + /// The operation to add a recovery services provider. /// /// /// The operation to add a recovery services provider. @@ -105,16 +89,13 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Purges recovery service provider from fabric. + /// The operation to purge(force delete) a recovery services provider from the vault. /// /// - /// The operation to purge(force delete) a recovery services provider - /// from the vault. + /// The operation to purge(force delete) a recovery services provider from the vault. /// /// /// Fabric name. @@ -131,16 +112,13 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task PurgeWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task PurgeWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Refresh details from the recovery services provider. + /// The operation to refresh the information from the recovery services provider. /// /// - /// The operation to refresh the information from the recovery services - /// provider. + /// The operation to refresh the information from the recovery services provider. /// /// /// Fabric name. @@ -160,20 +138,13 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes provider from fabric. Note: Deleting provider for any - /// fabric other than SingleHost is unsupported. To maintain backward - /// compatibility for released clients the object "deleteRspInput" is - /// used (if the object is empty we assume that it is old client and - /// continue the old behavior). + /// The operation to removes/delete(unregister) a recovery services provider from the vault. /// /// - /// The operation to removes/delete(unregister) a recovery services - /// provider from the vault. + /// The operation to removes/delete(unregister) a recovery services provider from the vault. /// /// /// Fabric name. @@ -190,13 +161,10 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of registered recovery services providers in the - /// vault. This is a view only api. + /// Lists the registered recovery services providers in the vault. /// /// /// Lists the registered recovery services providers in the vault. @@ -213,12 +181,10 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Adds a recovery services provider. + /// The operation to add a recovery services provider. /// /// /// The operation to add a recovery services provider. @@ -244,16 +210,13 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Purges recovery service provider from fabric. + /// The operation to purge(force delete) a recovery services provider from the vault. /// /// - /// The operation to purge(force delete) a recovery services provider - /// from the vault. + /// The operation to purge(force delete) a recovery services provider from the vault. /// /// /// Fabric name. @@ -270,16 +233,13 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginPurgeWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginPurgeWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Refresh details from the recovery services provider. + /// The operation to refresh the information from the recovery services provider. /// /// - /// The operation to refresh the information from the recovery services - /// provider. + /// The operation to refresh the information from the recovery services provider. /// /// /// Fabric name. @@ -299,20 +259,13 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginRefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginRefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Deletes provider from fabric. Note: Deleting provider for any - /// fabric other than SingleHost is unsupported. To maintain backward - /// compatibility for released clients the object "deleteRspInput" is - /// used (if the object is empty we assume that it is old client and - /// continue the old behavior). + /// The operation to removes/delete(unregister) a recovery services provider from the vault. /// /// - /// The operation to removes/delete(unregister) a recovery services - /// provider from the vault. + /// The operation to removes/delete(unregister) a recovery services provider from the vault. /// /// /// Fabric name. @@ -329,17 +282,13 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of registered recovery services providers for the - /// fabric. + /// Lists the registered recovery services providers for the specified fabric. /// /// - /// Lists the registered recovery services providers for the specified - /// fabric. + /// Lists the registered recovery services providers for the specified fabric. /// /// /// The NextLink from the previous successful call to List operation. @@ -356,13 +305,10 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of registered recovery services providers in the - /// vault. This is a view only api. + /// Lists the registered recovery services providers in the vault. /// /// /// Lists the registered recovery services providers in the vault. @@ -382,9 +328,7 @@ public partial interface IReplicationRecoveryServicesProvidersOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationStorageClassificationMappingsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationStorageClassificationMappingsOperations.cs index 1b7fb05b62ec..79da59647b5e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationStorageClassificationMappingsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationStorageClassificationMappingsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationStorageClassificationMappingsOperations operations. @@ -24,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationStorageClassificationMappingsOperations { /// - /// Gets the list of storage classification mappings objects under a - /// storage. + /// Lists the storage classification mappings for the fabric. /// /// /// Lists the storage classification mappings for the fabric. @@ -48,12 +37,10 @@ public partial interface IReplicationStorageClassificationMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationStorageClassificationsWithHttpMessagesAsync(string fabricName, string storageClassificationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationStorageClassificationsWithHttpMessagesAsync(string fabricName, string storageClassificationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the details of a storage classification mapping. + /// Gets the details of the specified storage classification mapping. /// /// /// Gets the details of the specified storage classification mapping. @@ -79,12 +66,10 @@ public partial interface IReplicationStorageClassificationMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Create storage classification mapping. + /// The operation to create a storage classification mapping. /// /// /// The operation to create a storage classification mapping. @@ -113,12 +98,10 @@ public partial interface IReplicationStorageClassificationMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete a storage classification mapping. + /// The operation to delete a storage classification mapping. /// /// /// The operation to delete a storage classification mapping. @@ -141,13 +124,10 @@ public partial interface IReplicationStorageClassificationMappingsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of storage classification mappings objects under a - /// vault. + /// Lists the storage classification mappings in the vault. /// /// /// Lists the storage classification mappings in the vault. @@ -164,12 +144,10 @@ public partial interface IReplicationStorageClassificationMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Create storage classification mapping. + /// The operation to create a storage classification mapping. /// /// /// The operation to create a storage classification mapping. @@ -198,12 +176,10 @@ public partial interface IReplicationStorageClassificationMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Delete a storage classification mapping. + /// The operation to delete a storage classification mapping. /// /// /// The operation to delete a storage classification mapping. @@ -226,13 +202,10 @@ public partial interface IReplicationStorageClassificationMappingsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of storage classification mappings objects under a - /// storage. + /// Lists the storage classification mappings for the fabric. /// /// /// Lists the storage classification mappings for the fabric. @@ -252,13 +225,10 @@ public partial interface IReplicationStorageClassificationMappingsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationStorageClassificationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationStorageClassificationsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of storage classification mappings objects under a - /// vault. + /// Lists the storage classification mappings in the vault. /// /// /// Lists the storage classification mappings in the vault. @@ -278,9 +248,7 @@ public partial interface IReplicationStorageClassificationMappingsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationStorageClassificationsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationStorageClassificationsOperations.cs index 6b7e6fd7b75f..0cb8d5ee2738 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationStorageClassificationsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationStorageClassificationsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationStorageClassificationsOperations operations. @@ -24,11 +14,10 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationStorageClassificationsOperations { /// - /// Gets the list of storage classification objects under a fabric. + /// Lists the storage classifications available in the specified fabric. /// /// - /// Lists the storage classifications available in the specified - /// fabric. + /// Lists the storage classifications available in the specified fabric. /// /// /// Site name of interest. @@ -45,12 +34,10 @@ public partial interface IReplicationStorageClassificationsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the details of a storage classification. + /// Gets the details of the specified storage classification. /// /// /// Gets the details of the specified storage classification. @@ -73,12 +60,10 @@ public partial interface IReplicationStorageClassificationsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of storage classification objects under a vault. + /// Lists the storage classifications in the vault. /// /// /// Lists the storage classifications in the vault. @@ -95,16 +80,13 @@ public partial interface IReplicationStorageClassificationsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of storage classification objects under a fabric. + /// Lists the storage classifications available in the specified fabric. /// /// - /// Lists the storage classifications available in the specified - /// fabric. + /// Lists the storage classifications available in the specified fabric. /// /// /// The NextLink from the previous successful call to List operation. @@ -121,12 +103,10 @@ public partial interface IReplicationStorageClassificationsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of storage classification objects under a vault. + /// Lists the storage classifications in the vault. /// /// /// Lists the storage classifications in the vault. @@ -146,9 +126,7 @@ public partial interface IReplicationStorageClassificationsOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationVaultHealthOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationVaultHealthOperations.cs index 2a48db7164a1..530772a1f0bf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationVaultHealthOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationVaultHealthOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationVaultHealthOperations operations. @@ -24,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationVaultHealthOperations { /// - /// Gets the health summary for the vault. + /// Gets the health details of the vault. /// /// /// Gets the health details of the vault. @@ -41,13 +31,14 @@ public partial interface IReplicationVaultHealthOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Refreshes health summary of the vault. /// + /// + /// Refreshes health summary of the vault. + /// /// /// The headers that will be added to request. /// @@ -60,13 +51,14 @@ public partial interface IReplicationVaultHealthOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RefreshWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RefreshWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Refreshes health summary of the vault. /// + /// + /// Refreshes health summary of the vault. + /// /// /// The headers that will be added to request. /// @@ -79,9 +71,7 @@ public partial interface IReplicationVaultHealthOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginRefreshWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginRefreshWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationVaultSettingOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationVaultSettingOperations.cs index 19dcc868eef7..684ab5b59e6c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationVaultSettingOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationVaultSettingOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationVaultSettingOperations operations. @@ -24,11 +14,10 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationVaultSettingOperations { /// - /// Gets the list of vault setting. + /// Gets the list of vault setting. This includes the Migration Hub connection settings. /// /// - /// Gets the list of vault setting. This includes the Migration Hub - /// connection settings. + /// Gets the list of vault setting. This includes the Migration Hub connection settings. /// /// /// The headers that will be added to request. @@ -42,16 +31,13 @@ public partial interface IReplicationVaultSettingOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the vault setting. + /// Gets the vault setting. This includes the Migration Hub connection settings. /// /// - /// Gets the vault setting. This includes the Migration Hub connection - /// settings. + /// Gets the vault setting. This includes the Migration Hub connection settings. /// /// /// Vault setting name. @@ -68,13 +54,10 @@ public partial interface IReplicationVaultSettingOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string vaultSettingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultSettingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates vault setting. A vault setting object is a singleton per - /// vault and it is always present by default. + /// The operation to configure vault setting. /// /// /// The operation to configure vault setting. @@ -97,13 +80,10 @@ public partial interface IReplicationVaultSettingOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string vaultSettingName, VaultSettingCreationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string vaultSettingName, VaultSettingCreationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Updates vault setting. A vault setting object is a singleton per - /// vault and it is always present by default. + /// The operation to configure vault setting. /// /// /// The operation to configure vault setting. @@ -126,16 +106,13 @@ public partial interface IReplicationVaultSettingOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string vaultSettingName, VaultSettingCreationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string vaultSettingName, VaultSettingCreationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of vault setting. + /// Gets the list of vault setting. This includes the Migration Hub connection settings. /// /// - /// Gets the list of vault setting. This includes the Migration Hub - /// connection settings. + /// Gets the list of vault setting. This includes the Migration Hub connection settings. /// /// /// The NextLink from the previous successful call to List operation. @@ -152,9 +129,7 @@ public partial interface IReplicationVaultSettingOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationvCentersOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationvCentersOperations.cs index dae69ca630ff..d5870ead54db 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationvCentersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/IReplicationvCentersOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationvCentersOperations operations. @@ -24,7 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface IReplicationvCentersOperations { /// - /// Gets the list of vCenter registered under a fabric. + /// Lists the vCenter servers registered in a fabric. /// /// /// Lists the vCenter servers registered in a fabric. @@ -44,16 +34,13 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the details of a vCenter. + /// Gets the details of a registered vCenter server(Add vCenter server). /// /// - /// Gets the details of a registered vCenter server(Add vCenter - /// server). + /// Gets the details of a registered vCenter server(Add vCenter server). /// /// /// Fabric name. @@ -73,12 +60,10 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string fabricName, string vcenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string vcenterName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Add vCenter. + /// The operation to create a vCenter object.. /// /// /// The operation to create a vCenter object.. @@ -104,16 +89,13 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateWithHttpMessagesAsync(string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Remove vcenter operation. + /// The operation to remove(unregister) a registered vCenter server from the vault. /// /// - /// The operation to remove(unregister) a registered vCenter server - /// from the vault. + /// The operation to remove(unregister) a registered vCenter server from the vault. /// /// /// Fabric name. @@ -130,12 +112,10 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string fabricName, string vcenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string vcenterName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Update vCenter operation. + /// The operation to update a registered vCenter. /// /// /// The operation to update a registered vCenter. @@ -161,12 +141,10 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of vCenter registered under the vault. + /// Lists the vCenter servers registered in the vault. /// /// /// Lists the vCenter servers registered in the vault. @@ -183,12 +161,10 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Add vCenter. + /// The operation to create a vCenter object.. /// /// /// The operation to create a vCenter object.. @@ -214,16 +190,13 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateWithHttpMessagesAsync(string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Remove vcenter operation. + /// The operation to remove(unregister) a registered vCenter server from the vault. /// /// - /// The operation to remove(unregister) a registered vCenter server - /// from the vault. + /// The operation to remove(unregister) a registered vCenter server from the vault. /// /// /// Fabric name. @@ -240,12 +213,10 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string fabricName, string vcenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string vcenterName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Update vCenter operation. + /// The operation to update a registered vCenter. /// /// /// The operation to update a registered vCenter. @@ -271,12 +242,10 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of vCenter registered under a fabric. + /// Lists the vCenter servers registered in a fabric. /// /// /// Lists the vCenter servers registered in a fabric. @@ -296,12 +265,10 @@ public partial interface IReplicationvCentersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of vCenter registered under the vault. + /// Lists the vCenter servers registered in the vault. /// /// /// Lists the vCenter servers registered in the vault. @@ -321,9 +288,7 @@ public partial interface IReplicationvCentersOperations /// /// 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)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ISiteRecoveryManagementClient.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ISiteRecoveryManagementClient.cs index 0d7d449cb969..18263d1107f3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ISiteRecoveryManagementClient.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ISiteRecoveryManagementClient.cs @@ -1,23 +1,18 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; /// + /// /// - public partial interface ISiteRecoveryManagementClient : System.IDisposable + public partial interface ISiteRecoveryManagementClient : System.IDisposable { /// /// The base URI of the service. @@ -27,197 +22,203 @@ public partial interface ISiteRecoveryManagementClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// - /// The subscription Id. + /// The API version to use for this operation. /// - string SubscriptionId { get; set; } + string ApiVersion { get;} + /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The subscription Id. /// - string ResourceGroupName { get; set; } + string SubscriptionId { get; set;} + /// - /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. /// - string ResourceName { get; set; } + string ResourceGroupName { get; set;} + /// - /// Client Api Version. + /// The name of the recovery services vault. /// - string ApiVersion { get; } + string ResourceName { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// - /// 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 + /// 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; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the IOperations. + /// Gets the IOperations /// IOperations Operations { get; } /// - /// Gets the IReplicationAlertSettingsOperations. + /// Gets the IReplicationAlertSettingsOperations /// IReplicationAlertSettingsOperations ReplicationAlertSettings { get; } /// - /// Gets the IReplicationAppliancesOperations. + /// Gets the IReplicationAppliancesOperations /// IReplicationAppliancesOperations ReplicationAppliances { get; } /// - /// Gets the IReplicationEligibilityResultsOperations. + /// Gets the IReplicationEligibilityResultsOperations /// IReplicationEligibilityResultsOperations ReplicationEligibilityResults { get; } /// - /// Gets the IReplicationEventsOperations. + /// Gets the IReplicationEventsOperations /// IReplicationEventsOperations ReplicationEvents { get; } /// - /// Gets the IReplicationFabricsOperations. + /// Gets the IReplicationFabricsOperations /// IReplicationFabricsOperations ReplicationFabrics { get; } /// - /// Gets the IReplicationLogicalNetworksOperations. + /// Gets the IReplicationLogicalNetworksOperations /// IReplicationLogicalNetworksOperations ReplicationLogicalNetworks { get; } /// - /// Gets the IReplicationNetworksOperations. + /// Gets the IReplicationNetworksOperations /// IReplicationNetworksOperations ReplicationNetworks { get; } /// - /// Gets the IReplicationNetworkMappingsOperations. + /// Gets the IReplicationNetworkMappingsOperations /// IReplicationNetworkMappingsOperations ReplicationNetworkMappings { get; } /// - /// Gets the IReplicationProtectionContainersOperations. + /// Gets the IReplicationProtectionContainersOperations /// IReplicationProtectionContainersOperations ReplicationProtectionContainers { get; } /// - /// Gets the IReplicationMigrationItemsOperations. + /// Gets the IReplicationMigrationItemsOperations /// IReplicationMigrationItemsOperations ReplicationMigrationItems { get; } /// - /// Gets the IMigrationRecoveryPointsOperations. + /// Gets the IMigrationRecoveryPointsOperations /// IMigrationRecoveryPointsOperations MigrationRecoveryPoints { get; } /// - /// Gets the IReplicationProtectableItemsOperations. + /// Gets the IReplicationProtectableItemsOperations /// IReplicationProtectableItemsOperations ReplicationProtectableItems { get; } /// - /// Gets the IReplicationProtectedItemsOperations. + /// Gets the IReplicationProtectedItemsOperations /// IReplicationProtectedItemsOperations ReplicationProtectedItems { get; } /// - /// Gets the IRecoveryPointsOperations. + /// Gets the IRecoveryPointsOperations /// IRecoveryPointsOperations RecoveryPoints { get; } /// - /// Gets the ITargetComputeSizesOperations. + /// Gets the ITargetComputeSizesOperations /// ITargetComputeSizesOperations TargetComputeSizes { get; } /// - /// Gets the IReplicationProtectionContainerMappingsOperations. + /// Gets the IReplicationProtectionContainerMappingsOperations /// IReplicationProtectionContainerMappingsOperations ReplicationProtectionContainerMappings { get; } /// - /// Gets the IReplicationRecoveryServicesProvidersOperations. + /// Gets the IReplicationRecoveryServicesProvidersOperations /// IReplicationRecoveryServicesProvidersOperations ReplicationRecoveryServicesProviders { get; } /// - /// Gets the IReplicationStorageClassificationsOperations. + /// Gets the IReplicationStorageClassificationsOperations /// IReplicationStorageClassificationsOperations ReplicationStorageClassifications { get; } /// - /// Gets the IReplicationStorageClassificationMappingsOperations. + /// Gets the IReplicationStorageClassificationMappingsOperations /// IReplicationStorageClassificationMappingsOperations ReplicationStorageClassificationMappings { get; } /// - /// Gets the IReplicationvCentersOperations. + /// Gets the IReplicationvCentersOperations /// IReplicationvCentersOperations ReplicationvCenters { get; } /// - /// Gets the IReplicationJobsOperations. + /// Gets the IReplicationJobsOperations /// IReplicationJobsOperations ReplicationJobs { get; } /// - /// Gets the IReplicationPoliciesOperations. + /// Gets the IReplicationPoliciesOperations /// IReplicationPoliciesOperations ReplicationPolicies { get; } /// - /// Gets the IReplicationProtectionIntentsOperations. + /// Gets the IReplicationProtectionIntentsOperations /// IReplicationProtectionIntentsOperations ReplicationProtectionIntents { get; } /// - /// Gets the IReplicationRecoveryPlansOperations. + /// Gets the IReplicationRecoveryPlansOperations /// IReplicationRecoveryPlansOperations ReplicationRecoveryPlans { get; } /// - /// Gets the ISupportedOperatingSystemsOperations. + /// Gets the ISupportedOperatingSystemsOperations /// ISupportedOperatingSystemsOperations SupportedOperatingSystems { get; } /// - /// Gets the IReplicationVaultHealthOperations. + /// Gets the IReplicationVaultHealthOperations /// IReplicationVaultHealthOperations ReplicationVaultHealth { get; } /// - /// Gets the IReplicationVaultSettingOperations. + /// Gets the IReplicationVaultSettingOperations /// IReplicationVaultSettingOperations ReplicationVaultSetting { get; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ISupportedOperatingSystemsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ISupportedOperatingSystemsOperations.cs index 65506bd98c71..b2cb1259517d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ISupportedOperatingSystemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ISupportedOperatingSystemsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// SupportedOperatingSystemsOperations operations. @@ -26,6 +16,9 @@ public partial interface ISupportedOperatingSystemsOperations /// /// Gets the data of supported operating systems by SRS. /// + /// + /// Gets the data of supported operating systems by SRS. + /// /// /// The instance type. /// @@ -41,9 +34,7 @@ public partial interface ISupportedOperatingSystemsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string instanceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string instanceType = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ITargetComputeSizesOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ITargetComputeSizesOperations.cs index 37f3b28a8c16..82f8727f84f6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ITargetComputeSizesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ITargetComputeSizesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// TargetComputeSizesOperations operations. @@ -24,12 +14,10 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery public partial interface ITargetComputeSizesOperations { /// - /// Gets the list of target compute sizes for the replication protected - /// item. + /// Lists the available target compute sizes for a replication protected item. /// /// - /// Lists the available target compute sizes for a replication - /// protected item. + /// Lists the available target compute sizes for a replication protected item. /// /// /// Fabric name. @@ -52,17 +40,13 @@ public partial interface ITargetComputeSizesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the list of target compute sizes for the replication protected - /// item. + /// Lists the available target compute sizes for a replication protected item. /// /// - /// Lists the available target compute sizes for a replication - /// protected item. + /// Lists the available target compute sizes for a replication protected item. /// /// /// The NextLink from the previous successful call to List operation. @@ -79,9 +63,7 @@ public partial interface ITargetComputeSizesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/MigrationRecoveryPointsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/MigrationRecoveryPointsOperations.cs index 9a3b242620dd..fa40aa3087c6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/MigrationRecoveryPointsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/MigrationRecoveryPointsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// MigrationRecoveryPointsOperations operations. /// - internal partial class MigrationRecoveryPointsOperations : IServiceOperations, IMigrationRecoveryPointsOperations + internal partial class MigrationRecoveryPointsOperations : Microsoft.Rest.IServiceOperations, IMigrationRecoveryPointsOperations { /// /// Initializes a new instance of the MigrationRecoveryPointsOperations class. @@ -36,13 +24,13 @@ internal partial class MigrationRecoveryPointsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) + internal MigrationRecoveryPointsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -68,13 +56,13 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -83,87 +71,101 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationMigrationItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationMigrationItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationMigrationItems", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationMigrationItems", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -175,55 +177,56 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -233,9 +236,10 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -246,25 +250,29 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a recovery point for a migration item. /// @@ -286,13 +294,13 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -301,93 +309,108 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string migrationRecoveryPointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string migrationRecoveryPointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + if (migrationRecoveryPointName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationRecoveryPointName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationRecoveryPointName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); tracingParameters.Add("migrationRecoveryPointName", migrationRecoveryPointName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints/{migrationRecoveryPointName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); _url = _url.Replace("{migrationRecoveryPointName}", System.Uri.EscapeDataString(migrationRecoveryPointName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -399,55 +422,56 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -457,9 +481,10 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -470,25 +495,29 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the recovery points for a migration item. /// @@ -501,13 +530,13 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -516,51 +545,54 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationMigrationItemsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationMigrationItemsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationMigrationItemsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationMigrationItemsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -572,55 +604,56 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -630,9 +663,10 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -643,24 +677,28 @@ internal MigrationRecoveryPointsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/MigrationRecoveryPointsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/MigrationRecoveryPointsOperationsExtensions.cs index 7f4f70367c56..602f8712f3fa 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/MigrationRecoveryPointsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/MigrationRecoveryPointsOperationsExtensions.cs @@ -1,157 +1,145 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for MigrationRecoveryPointsOperations. + /// Extension methods for MigrationRecoveryPointsOperations /// public static partial class MigrationRecoveryPointsOperationsExtensions { - /// - /// Gets the recovery points for a migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric unique name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - public static IPage ListByReplicationMigrationItems(this IMigrationRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string migrationItemName) - { - return operations.ListByReplicationMigrationItemsAsync(fabricName, protectionContainerName, migrationItemName).GetAwaiter().GetResult(); - } - - /// - /// Gets the recovery points for a migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric unique name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationMigrationItemsAsync(this IMigrationRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationMigrationItemsWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Gets the recovery points for a migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationMigrationItems(this IMigrationRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string migrationItemName) + { + return ((IMigrationRecoveryPointsOperations)operations).ListByReplicationMigrationItemsAsync(fabricName, protectionContainerName, migrationItemName).GetAwaiter().GetResult(); + } - /// - /// Gets a recovery point for a migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric unique name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// The migration recovery point name. - /// - public static MigrationRecoveryPoint Get(this IMigrationRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string migrationRecoveryPointName) + /// + /// Gets the recovery points for a migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationMigrationItemsAsync(this IMigrationRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationMigrationItemsWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(fabricName, protectionContainerName, migrationItemName, migrationRecoveryPointName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets a recovery point for a migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The migration recovery point name. + /// + public static MigrationRecoveryPoint Get(this IMigrationRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string migrationRecoveryPointName) + { + return ((IMigrationRecoveryPointsOperations)operations).GetAsync(fabricName, protectionContainerName, migrationItemName, migrationRecoveryPointName).GetAwaiter().GetResult(); + } - /// - /// Gets a recovery point for a migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric unique name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// The migration recovery point name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IMigrationRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string migrationRecoveryPointName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets a recovery point for a migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The migration recovery point name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IMigrationRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string migrationRecoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, migrationRecoveryPointName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, migrationRecoveryPointName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the recovery points for a migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationMigrationItemsNext(this IMigrationRecoveryPointsOperations operations, string nextPageLink) + { + return ((IMigrationRecoveryPointsOperations)operations).ListByReplicationMigrationItemsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the recovery points for a migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationMigrationItemsNext(this IMigrationRecoveryPointsOperations operations, string nextPageLink) + /// + /// Gets the recovery points for a migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationMigrationItemsNextAsync(this IMigrationRecoveryPointsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationMigrationItemsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationMigrationItemsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the recovery points for a migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationMigrationItemsNextAsync(this IMigrationRecoveryPointsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationMigrationItemsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AAddDisksInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AAddDisksInput.cs index 53b5420f41d3..3e3c06a5f881 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AAddDisksInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AAddDisksInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,13 +24,17 @@ public A2AAddDisksInput() /// /// Initializes a new instance of the A2AAddDisksInput class. /// - /// The list of vm disk details. - /// The list of vm managed disk - /// details. - public A2AAddDisksInput(IList vmDisks = default(IList), IList vmManagedDisks = default(IList)) + + /// The list of vm disk details. + /// + + /// The list of vm managed disk details. + /// + public A2AAddDisksInput(System.Collections.Generic.IList vmDisks = default(System.Collections.Generic.IList), System.Collections.Generic.IList vmManagedDisks = default(System.Collections.Generic.IList)) + { - VmDisks = vmDisks; - VmManagedDisks = vmManagedDisks; + this.VMDisks = vmDisks; + this.VMManagedDisks = vmManagedDisks; CustomInit(); } @@ -47,17 +43,17 @@ public A2AAddDisksInput() /// partial void CustomInit(); + /// /// Gets or sets the list of vm disk details. /// - [JsonProperty(PropertyName = "vmDisks")] - public IList VmDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisks")] + public System.Collections.Generic.IList VMDisks {get; set; } /// /// Gets or sets the list of vm managed disk details. /// - [JsonProperty(PropertyName = "vmManagedDisks")] - public IList VmManagedDisks { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vmManagedDisks")] + public System.Collections.Generic.IList VMManagedDisks {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AApplyRecoveryPointInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AApplyRecoveryPointInput.cs index 7de9c30b7a8f..d70d78b4f756 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AApplyRecoveryPointInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AApplyRecoveryPointInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public A2AApplyRecoveryPointInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AContainerCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AContainerCreationInput.cs index aed305ddacc1..357f9be748ad 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AContainerCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AContainerCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public A2AContainerCreationInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AContainerMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AContainerMappingInput.cs index edf6cc9d87ce..25bf66c82dd7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AContainerMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AContainerMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,20 +24,21 @@ public A2AContainerMappingInput() /// /// Initializes a new instance of the A2AContainerMappingInput class. /// - /// A value indicating whether the - /// auto update is enabled. Possible values include: 'Disabled', - /// 'Enabled' - /// The automation account arm - /// id. - /// A value - /// indicating the type authentication to use for automation Account. - /// Possible values include: 'RunAsAccount', - /// 'SystemAssignedIdentity' + + /// A value indicating whether the auto update is enabled. + /// Possible values include: 'Disabled', 'Enabled' + + /// The automation account arm id. + /// + + /// A value indicating the type authentication to use for automation Account. + /// Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' public A2AContainerMappingInput(string agentAutoUpdateStatus = default(string), string automationAccountArmId = default(string), string automationAccountAuthenticationType = default(string)) + { - AgentAutoUpdateStatus = agentAutoUpdateStatus; - AutomationAccountArmId = automationAccountArmId; - AutomationAccountAuthenticationType = automationAccountAuthenticationType; + this.AgentAutoUpdateStatus = agentAutoUpdateStatus; + this.AutomationAccountArmId = automationAccountArmId; + this.AutomationAccountAuthenticationType = automationAccountAuthenticationType; CustomInit(); } @@ -52,26 +47,24 @@ public A2AContainerMappingInput() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether the auto update is enabled. - /// Possible values include: 'Disabled', 'Enabled' + /// Gets or sets a value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "agentAutoUpdateStatus")] - public string AgentAutoUpdateStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentAutoUpdateStatus")] + public string AgentAutoUpdateStatus {get; set; } /// /// Gets or sets the automation account arm id. /// - [JsonProperty(PropertyName = "automationAccountArmId")] - public string AutomationAccountArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountArmId")] + public string AutomationAccountArmId {get; set; } /// /// Gets or sets a value indicating the type authentication to use for - /// automation Account. Possible values include: 'RunAsAccount', - /// 'SystemAssignedIdentity' + /// automation Account. Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' /// - [JsonProperty(PropertyName = "automationAccountAuthenticationType")] - public string AutomationAccountAuthenticationType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountAuthenticationType")] + public string AutomationAccountAuthenticationType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACreateProtectionIntentInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACreateProtectionIntentInput.cs index dd7e65bed270..b35abb1a1389 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACreateProtectionIntentInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACreateProtectionIntentInput.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2ACreateProtectionIntentInput : CreateProtectionIntentProviderSpecificDetails { /// - /// Initializes a new instance of the A2ACreateProtectionIntentInput - /// class. + /// Initializes a new instance of the A2ACreateProtectionIntentInput class. /// public A2ACreateProtectionIntentInput() { @@ -32,79 +22,100 @@ public A2ACreateProtectionIntentInput() } /// - /// Initializes a new instance of the A2ACreateProtectionIntentInput - /// class. + /// Initializes a new instance of the A2ACreateProtectionIntentInput class. /// - /// The fabric specific object Id of the - /// virtual machine. - /// The primary location for the virtual - /// machine. - /// The recovery location for the - /// virtual machine. - /// The recovery subscription Id - /// of the virtual machine. - /// The recovery availability - /// type of the virtual machine. Possible values include: 'Single', - /// 'AvailabilitySet', 'AvailabilityZone' - /// The recovery resource group - /// Id. Valid for V2 scenarios. - /// The protection profile - /// custom inputs. - /// The primary - /// staging storage account input. - /// The recovery - /// availability set input. - /// The recovery - /// virtual network input. - /// The - /// recovery proximity placement group custom input. - /// A value indicating whether - /// the auto protection is enabled. Possible values include: - /// 'Disabled', 'Enabled' - /// The list of vm disk inputs. - /// The list of vm managed disk - /// inputs. - /// The multi vm group name. - /// The multi vm group id. - /// The boot diagnostic - /// storage account. - /// The recovery disk encryption - /// information (for two pass flows). - /// The recovery availability - /// zone. - /// A value indicating whether the - /// auto update is enabled. Possible values include: 'Disabled', - /// 'Enabled' - /// A value - /// indicating the authentication type for automation account. The - /// default value is "RunAsAccount". Possible values include: - /// 'RunAsAccount', 'SystemAssignedIdentity' - /// The automation account arm - /// id. - public A2ACreateProtectionIntentInput(string fabricObjectId, string primaryLocation, string recoveryLocation, string recoverySubscriptionId, string recoveryAvailabilityType, string recoveryResourceGroupId, ProtectionProfileCustomDetails protectionProfileCustomInput = default(ProtectionProfileCustomDetails), StorageAccountCustomDetails primaryStagingStorageAccountCustomInput = default(StorageAccountCustomDetails), RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySetCustomInput = default(RecoveryAvailabilitySetCustomDetails), RecoveryVirtualNetworkCustomDetails recoveryVirtualNetworkCustomInput = default(RecoveryVirtualNetworkCustomDetails), RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroupCustomInput = default(RecoveryProximityPlacementGroupCustomDetails), string autoProtectionOfDataDisk = default(string), IList vmDisks = default(IList), IList vmManagedDisks = default(IList), string multiVmGroupName = default(string), string multiVmGroupId = default(string), StorageAccountCustomDetails recoveryBootDiagStorageAccount = default(StorageAccountCustomDetails), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo), string recoveryAvailabilityZone = default(string), string agentAutoUpdateStatus = default(string), string automationAccountAuthenticationType = default(string), string automationAccountArmId = default(string)) + + /// The fabric specific object Id of the virtual machine. + /// + + /// The primary location for the virtual machine. + /// + + /// The recovery location for the virtual machine. + /// + + /// The recovery subscription Id of the virtual machine. + /// + + /// The recovery availability type of the virtual machine. + /// Possible values include: 'Single', 'AvailabilitySet', 'AvailabilityZone' + + /// The protection profile custom inputs. + /// + + /// The recovery resource group Id. Valid for V2 scenarios. + /// + + /// The primary staging storage account input. + /// + + /// The recovery availability set input. + /// + + /// The recovery virtual network input. + /// + + /// The recovery proximity placement group custom input. + /// + + /// A value indicating whether the auto protection is enabled. + /// Possible values include: 'Disabled', 'Enabled' + + /// The list of vm disk inputs. + /// + + /// The list of vm managed disk inputs. + /// + + /// The multi vm group name. + /// + + /// The multi vm group id. + /// + + /// The boot diagnostic storage account. + /// + + /// The recovery disk encryption information (for two pass flows). + /// + + /// The recovery availability zone. + /// + + /// A value indicating whether the auto update is enabled. + /// Possible values include: 'Disabled', 'Enabled' + + /// A value indicating the authentication type for automation account. The + /// default value is "RunAsAccount". + /// Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' + + /// The automation account arm id. + /// + public A2ACreateProtectionIntentInput(string fabricObjectId, string primaryLocation, string recoveryLocation, string recoverySubscriptionId, string recoveryAvailabilityType, string recoveryResourceGroupId, ProtectionProfileCustomDetails protectionProfileCustomInput = default(ProtectionProfileCustomDetails), StorageAccountCustomDetails primaryStagingStorageAccountCustomInput = default(StorageAccountCustomDetails), RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySetCustomInput = default(RecoveryAvailabilitySetCustomDetails), RecoveryVirtualNetworkCustomDetails recoveryVirtualNetworkCustomInput = default(RecoveryVirtualNetworkCustomDetails), RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroupCustomInput = default(RecoveryProximityPlacementGroupCustomDetails), string autoProtectionOfDataDisk = default(string), System.Collections.Generic.IList vmDisks = default(System.Collections.Generic.IList), System.Collections.Generic.IList vmManagedDisks = default(System.Collections.Generic.IList), string multiVMGroupName = default(string), string multiVMGroupId = default(string), StorageAccountCustomDetails recoveryBootDiagStorageAccount = default(StorageAccountCustomDetails), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo), string recoveryAvailabilityZone = default(string), string agentAutoUpdateStatus = default(string), string automationAccountAuthenticationType = default(string), string automationAccountArmId = default(string)) + { - FabricObjectId = fabricObjectId; - PrimaryLocation = primaryLocation; - RecoveryLocation = recoveryLocation; - RecoverySubscriptionId = recoverySubscriptionId; - RecoveryAvailabilityType = recoveryAvailabilityType; - ProtectionProfileCustomInput = protectionProfileCustomInput; - RecoveryResourceGroupId = recoveryResourceGroupId; - PrimaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput; - RecoveryAvailabilitySetCustomInput = recoveryAvailabilitySetCustomInput; - RecoveryVirtualNetworkCustomInput = recoveryVirtualNetworkCustomInput; - RecoveryProximityPlacementGroupCustomInput = recoveryProximityPlacementGroupCustomInput; - AutoProtectionOfDataDisk = autoProtectionOfDataDisk; - VmDisks = vmDisks; - VmManagedDisks = vmManagedDisks; - MultiVmGroupName = multiVmGroupName; - MultiVmGroupId = multiVmGroupId; - RecoveryBootDiagStorageAccount = recoveryBootDiagStorageAccount; - DiskEncryptionInfo = diskEncryptionInfo; - RecoveryAvailabilityZone = recoveryAvailabilityZone; - AgentAutoUpdateStatus = agentAutoUpdateStatus; - AutomationAccountAuthenticationType = automationAccountAuthenticationType; - AutomationAccountArmId = automationAccountArmId; + this.FabricObjectId = fabricObjectId; + this.PrimaryLocation = primaryLocation; + this.RecoveryLocation = recoveryLocation; + this.RecoverySubscriptionId = recoverySubscriptionId; + this.RecoveryAvailabilityType = recoveryAvailabilityType; + this.ProtectionProfileCustomInput = protectionProfileCustomInput; + this.RecoveryResourceGroupId = recoveryResourceGroupId; + this.PrimaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput; + this.RecoveryAvailabilitySetCustomInput = recoveryAvailabilitySetCustomInput; + this.RecoveryVirtualNetworkCustomInput = recoveryVirtualNetworkCustomInput; + this.RecoveryProximityPlacementGroupCustomInput = recoveryProximityPlacementGroupCustomInput; + this.AutoProtectionOfDataDisk = autoProtectionOfDataDisk; + this.VMDisks = vmDisks; + this.VMManagedDisks = vmManagedDisks; + this.MultiVMGroupName = multiVMGroupName; + this.MultiVMGroupId = multiVMGroupId; + this.RecoveryBootDiagStorageAccount = recoveryBootDiagStorageAccount; + this.DiskEncryptionInfo = diskEncryptionInfo; + this.RecoveryAvailabilityZone = recoveryAvailabilityZone; + this.AgentAutoUpdateStatus = agentAutoUpdateStatus; + this.AutomationAccountAuthenticationType = automationAccountAuthenticationType; + this.AutomationAccountArmId = automationAccountArmId; CustomInit(); } @@ -113,181 +124,186 @@ public A2ACreateProtectionIntentInput() /// partial void CustomInit(); + /// /// Gets or sets the fabric specific object Id of the virtual machine. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; set; } /// /// Gets or sets the primary location for the virtual machine. /// - [JsonProperty(PropertyName = "primaryLocation")] - public string PrimaryLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryLocation")] + public string PrimaryLocation {get; set; } /// /// Gets or sets the recovery location for the virtual machine. /// - [JsonProperty(PropertyName = "recoveryLocation")] - public string RecoveryLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryLocation")] + public string RecoveryLocation {get; set; } /// /// Gets or sets the recovery subscription Id of the virtual machine. /// - [JsonProperty(PropertyName = "recoverySubscriptionId")] - public string RecoverySubscriptionId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoverySubscriptionId")] + public string RecoverySubscriptionId {get; set; } /// - /// Gets or sets the recovery availability type of the virtual machine. - /// Possible values include: 'Single', 'AvailabilitySet', - /// 'AvailabilityZone' + /// Gets or sets the recovery availability type of the virtual machine. Possible values include: 'Single', 'AvailabilitySet', 'AvailabilityZone' /// - [JsonProperty(PropertyName = "recoveryAvailabilityType")] - public string RecoveryAvailabilityType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilityType")] + public string RecoveryAvailabilityType {get; set; } /// /// Gets or sets the protection profile custom inputs. /// - [JsonProperty(PropertyName = "protectionProfileCustomInput")] - public ProtectionProfileCustomDetails ProtectionProfileCustomInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionProfileCustomInput")] + public ProtectionProfileCustomDetails ProtectionProfileCustomInput {get; set; } /// - /// Gets or sets the recovery resource group Id. Valid for V2 - /// scenarios. + /// Gets or sets the recovery resource group Id. Valid for V2 scenarios. /// - [JsonProperty(PropertyName = "recoveryResourceGroupId")] - public string RecoveryResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId {get; set; } /// /// Gets or sets the primary staging storage account input. /// - [JsonProperty(PropertyName = "primaryStagingStorageAccountCustomInput")] - public StorageAccountCustomDetails PrimaryStagingStorageAccountCustomInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryStagingStorageAccountCustomInput")] + public StorageAccountCustomDetails PrimaryStagingStorageAccountCustomInput {get; set; } /// /// Gets or sets the recovery availability set input. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySetCustomInput")] - public RecoveryAvailabilitySetCustomDetails RecoveryAvailabilitySetCustomInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySetCustomInput")] + public RecoveryAvailabilitySetCustomDetails RecoveryAvailabilitySetCustomInput {get; set; } /// /// Gets or sets the recovery virtual network input. /// - [JsonProperty(PropertyName = "recoveryVirtualNetworkCustomInput")] - public RecoveryVirtualNetworkCustomDetails RecoveryVirtualNetworkCustomInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVirtualNetworkCustomInput")] + public RecoveryVirtualNetworkCustomDetails RecoveryVirtualNetworkCustomInput {get; set; } /// /// Gets or sets the recovery proximity placement group custom input. /// - [JsonProperty(PropertyName = "recoveryProximityPlacementGroupCustomInput")] - public RecoveryProximityPlacementGroupCustomDetails RecoveryProximityPlacementGroupCustomInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProximityPlacementGroupCustomInput")] + public RecoveryProximityPlacementGroupCustomDetails RecoveryProximityPlacementGroupCustomInput {get; set; } /// - /// Gets or sets a value indicating whether the auto protection is - /// enabled. Possible values include: 'Disabled', 'Enabled' + /// Gets or sets a value indicating whether the auto protection is enabled. Possible values include: 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "autoProtectionOfDataDisk")] - public string AutoProtectionOfDataDisk { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "autoProtectionOfDataDisk")] + public string AutoProtectionOfDataDisk {get; set; } /// /// Gets or sets the list of vm disk inputs. /// - [JsonProperty(PropertyName = "vmDisks")] - public IList VmDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisks")] + public System.Collections.Generic.IList VMDisks {get; set; } /// /// Gets or sets the list of vm managed disk inputs. /// - [JsonProperty(PropertyName = "vmManagedDisks")] - public IList VmManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmManagedDisks")] + public System.Collections.Generic.IList VMManagedDisks {get; set; } /// /// Gets or sets the multi vm group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; set; } /// /// Gets or sets the multi vm group id. /// - [JsonProperty(PropertyName = "multiVmGroupId")] - public string MultiVmGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVMGroupId {get; set; } /// /// Gets or sets the boot diagnostic storage account. /// - [JsonProperty(PropertyName = "recoveryBootDiagStorageAccount")] - public StorageAccountCustomDetails RecoveryBootDiagStorageAccount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryBootDiagStorageAccount")] + public StorageAccountCustomDetails RecoveryBootDiagStorageAccount {get; set; } /// - /// Gets or sets the recovery disk encryption information (for two pass - /// flows). + /// Gets or sets the recovery disk encryption information (for two pass flows). /// - [JsonProperty(PropertyName = "diskEncryptionInfo")] - public DiskEncryptionInfo DiskEncryptionInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo {get; set; } /// /// Gets or sets the recovery availability zone. /// - [JsonProperty(PropertyName = "recoveryAvailabilityZone")] - public string RecoveryAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilityZone")] + public string RecoveryAvailabilityZone {get; set; } /// - /// Gets or sets a value indicating whether the auto update is enabled. - /// Possible values include: 'Disabled', 'Enabled' + /// Gets or sets a value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "agentAutoUpdateStatus")] - public string AgentAutoUpdateStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentAutoUpdateStatus")] + public string AgentAutoUpdateStatus {get; set; } /// - /// Gets or sets a value indicating the authentication type for - /// automation account. The default value is "RunAsAccount". Possible - /// values include: 'RunAsAccount', 'SystemAssignedIdentity' + /// Gets or sets a value indicating the authentication type for automation + /// account. The default value is "RunAsAccount". Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' /// - [JsonProperty(PropertyName = "automationAccountAuthenticationType")] - public string AutomationAccountAuthenticationType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountAuthenticationType")] + public string AutomationAccountAuthenticationType {get; set; } /// /// Gets or sets the automation account arm id. /// - [JsonProperty(PropertyName = "automationAccountArmId")] - public string AutomationAccountArmId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountArmId")] + public string AutomationAccountArmId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (FabricObjectId == null) + if (this.FabricObjectId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FabricObjectId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FabricObjectId"); } - if (PrimaryLocation == null) + if (this.PrimaryLocation == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryLocation"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PrimaryLocation"); } - if (RecoveryLocation == null) + if (this.RecoveryLocation == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryLocation"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryLocation"); } - if (RecoverySubscriptionId == null) + if (this.RecoverySubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoverySubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoverySubscriptionId"); } - if (RecoveryAvailabilityType == null) + if (this.RecoveryAvailabilityType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryAvailabilityType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryAvailabilityType"); } - if (RecoveryResourceGroupId == null) + if (this.RecoveryResourceGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryResourceGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryResourceGroupId"); } - if (VmDisks != null) + + + + + + + + + + + + + if (this.VMDisks != null) { - foreach (var element in VmDisks) + foreach (var element in this.VMDisks) { if (element != null) { @@ -295,16 +311,24 @@ public virtual void Validate() } } } - if (VmManagedDisks != null) + if (this.VMManagedDisks != null) { - foreach (var element1 in VmManagedDisks) + foreach (var element in this.VMManagedDisks) { - if (element1 != null) + if (element != null) { - element1.Validate(); + element.Validate(); } } } + + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationApplyRecoveryPointInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationApplyRecoveryPointInput.cs index 4fb0b5ba8844..6e4a367c1f92 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationApplyRecoveryPointInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationApplyRecoveryPointInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2ACrossClusterMigrationApplyRecoveryPointInput : ApplyRecoveryPointProviderSpecificInput { /// - /// Initializes a new instance of the - /// A2ACrossClusterMigrationApplyRecoveryPointInput class. + /// Initializes a new instance of the A2ACrossClusterMigrationApplyRecoveryPointInput class. /// public A2ACrossClusterMigrationApplyRecoveryPointInput() { @@ -35,4 +28,4 @@ public A2ACrossClusterMigrationApplyRecoveryPointInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationContainerCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationContainerCreationInput.cs index a89c59d5a4bd..268bd99f7541 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationContainerCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationContainerCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2ACrossClusterMigrationContainerCreationInput : ReplicationProviderSpecificContainerCreationInput { /// - /// Initializes a new instance of the - /// A2ACrossClusterMigrationContainerCreationInput class. + /// Initializes a new instance of the A2ACrossClusterMigrationContainerCreationInput class. /// public A2ACrossClusterMigrationContainerCreationInput() { @@ -35,4 +28,4 @@ public A2ACrossClusterMigrationContainerCreationInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationEnableProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationEnableProtectionInput.cs index fb608a110a9e..4dabb0865ef4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationEnableProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationEnableProtectionInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2ACrossClusterMigrationEnableProtectionInput : EnableProtectionProviderSpecificInput { /// - /// Initializes a new instance of the - /// A2ACrossClusterMigrationEnableProtectionInput class. + /// Initializes a new instance of the A2ACrossClusterMigrationEnableProtectionInput class. /// public A2ACrossClusterMigrationEnableProtectionInput() { @@ -29,17 +22,19 @@ public A2ACrossClusterMigrationEnableProtectionInput() } /// - /// Initializes a new instance of the - /// A2ACrossClusterMigrationEnableProtectionInput class. + /// Initializes a new instance of the A2ACrossClusterMigrationEnableProtectionInput class. /// - /// The fabric specific object Id of the - /// virtual machine. - /// The recovery container - /// Id. + + /// The fabric specific object Id of the virtual machine. + /// + + /// The recovery container Id. + /// public A2ACrossClusterMigrationEnableProtectionInput(string fabricObjectId = default(string), string recoveryContainerId = default(string)) + { - FabricObjectId = fabricObjectId; - RecoveryContainerId = recoveryContainerId; + this.FabricObjectId = fabricObjectId; + this.RecoveryContainerId = recoveryContainerId; CustomInit(); } @@ -48,17 +43,17 @@ public A2ACrossClusterMigrationEnableProtectionInput() /// partial void CustomInit(); + /// /// Gets or sets the fabric specific object Id of the virtual machine. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; set; } /// /// Gets or sets the recovery container Id. /// - [JsonProperty(PropertyName = "recoveryContainerId")] - public string RecoveryContainerId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryContainerId")] + public string RecoveryContainerId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationPolicyCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationPolicyCreationInput.cs index 911c7a212b93..2dd762856757 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationPolicyCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationPolicyCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2ACrossClusterMigrationPolicyCreationInput : PolicyProviderSpecificInput { /// - /// Initializes a new instance of the - /// A2ACrossClusterMigrationPolicyCreationInput class. + /// Initializes a new instance of the A2ACrossClusterMigrationPolicyCreationInput class. /// public A2ACrossClusterMigrationPolicyCreationInput() { @@ -35,4 +28,4 @@ public A2ACrossClusterMigrationPolicyCreationInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationReplicationDetails.cs index d05d6117f7ba..480e16e8bc71 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ACrossClusterMigrationReplicationDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2ACrossClusterMigrationReplicationDetails : ReplicationProviderSpecificSettings { /// - /// Initializes a new instance of the - /// A2ACrossClusterMigrationReplicationDetails class. + /// Initializes a new instance of the A2ACrossClusterMigrationReplicationDetails class. /// public A2ACrossClusterMigrationReplicationDetails() { @@ -29,32 +22,39 @@ public A2ACrossClusterMigrationReplicationDetails() } /// - /// Initializes a new instance of the - /// A2ACrossClusterMigrationReplicationDetails class. + /// Initializes a new instance of the A2ACrossClusterMigrationReplicationDetails class. /// - /// The fabric specific object Id of the - /// virtual machine. - /// Primary fabric - /// location. - /// The type of operating system. - /// The protection state for the - /// vm. - /// The protection state - /// description for the vm. - /// An id associated with the PE that - /// survives actions like switch protection which change the backing - /// PE/CPE objects internally.The lifecycle id gets carried forward to - /// have a link/continuity in being able to have an Id that denotes the - /// "same" protected item even though other internal Ids/ARM Id might - /// be changing. + + /// The fabric specific object Id of the virtual machine. + /// + + /// Primary fabric location. + /// + + /// The type of operating system. + /// + + /// The protection state for the vm. + /// + + /// The protection state description for the vm. + /// + + /// An id associated with the PE that survives actions like switch protection + /// which change the backing PE/CPE objects internally.The lifecycle id gets + /// carried forward to have a link/continuity in being able to have an Id that + /// denotes the "same" protected item even though other internal Ids/ARM Id + /// might be changing. + /// public A2ACrossClusterMigrationReplicationDetails(string fabricObjectId = default(string), string primaryFabricLocation = default(string), string osType = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), string lifecycleId = default(string)) + { - FabricObjectId = fabricObjectId; - PrimaryFabricLocation = primaryFabricLocation; - OsType = osType; - VmProtectionState = vmProtectionState; - VmProtectionStateDescription = vmProtectionStateDescription; - LifecycleId = lifecycleId; + this.FabricObjectId = fabricObjectId; + this.PrimaryFabricLocation = primaryFabricLocation; + this.OSType = osType; + this.VMProtectionState = vmProtectionState; + this.VMProtectionStateDescription = vmProtectionStateDescription; + this.LifecycleId = lifecycleId; CustomInit(); } @@ -63,46 +63,45 @@ public A2ACrossClusterMigrationReplicationDetails() /// partial void CustomInit(); + /// /// Gets or sets the fabric specific object Id of the virtual machine. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; set; } /// /// Gets or sets primary fabric location. /// - [JsonProperty(PropertyName = "primaryFabricLocation")] - public string PrimaryFabricLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricLocation")] + public string PrimaryFabricLocation {get; set; } /// /// Gets or sets the type of operating system. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the protection state for the vm. /// - [JsonProperty(PropertyName = "vmProtectionState")] - public string VmProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionState")] + public string VMProtectionState {get; set; } /// /// Gets or sets the protection state description for the vm. /// - [JsonProperty(PropertyName = "vmProtectionStateDescription")] - public string VmProtectionStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VMProtectionStateDescription {get; set; } /// - /// Gets or sets an id associated with the PE that survives actions - /// like switch protection which change the backing PE/CPE objects - /// internally.The lifecycle id gets carried forward to have a - /// link/continuity in being able to have an Id that denotes the "same" - /// protected item even though other internal Ids/ARM Id might be - /// changing. + /// Gets or sets an id associated with the PE that survives actions like switch + /// protection which change the backing PE/CPE objects internally.The lifecycle + /// id gets carried forward to have a link/continuity in being able to have an + /// Id that denotes the "same" protected item even though other internal + /// Ids/ARM Id might be changing. /// - [JsonProperty(PropertyName = "lifecycleId")] - public string LifecycleId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lifecycleId")] + public string LifecycleId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AEnableProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AEnableProtectionInput.cs index 27b5775aaa6d..e7627854ecad 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AEnableProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AEnableProtectionInput.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -33,58 +24,81 @@ public A2AEnableProtectionInput() /// /// Initializes a new instance of the A2AEnableProtectionInput class. /// - /// The fabric specific object Id of the - /// virtual machine. - /// The recovery container - /// Id. - /// The recovery resource group - /// Id. Valid for V2 scenarios. - /// The recovery cloud service Id. - /// Valid for V1 scenarios. - /// The recovery availability - /// set Id. - /// The recovery - /// proximity placement group Id. - /// The list of vm disk details. - /// The list of vm managed disk - /// details. - /// The multi vm group name. - /// The multi vm group id. - /// The boot diagnostic - /// storage account. - /// The recovery disk encryption - /// information (for two pass flows). - /// The recovery availability - /// zone. - /// The recovery extended - /// location. - /// The recovery Azure virtual - /// network ARM id. - /// The recovery subnet name. - /// The virtual machine - /// scale set Id. - /// The recovery - /// capacity reservation group Id. - public A2AEnableProtectionInput(string fabricObjectId, string recoveryContainerId = default(string), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string recoveryProximityPlacementGroupId = default(string), IList vmDisks = default(IList), IList vmManagedDisks = default(IList), string multiVmGroupName = default(string), string multiVmGroupId = default(string), string recoveryBootDiagStorageAccountId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo), string recoveryAvailabilityZone = default(string), ExtendedLocation recoveryExtendedLocation = default(ExtendedLocation), string recoveryAzureNetworkId = default(string), string recoverySubnetName = default(string), string recoveryVirtualMachineScaleSetId = default(string), string recoveryCapacityReservationGroupId = default(string)) + + /// The fabric specific object Id of the virtual machine. + /// + + /// The recovery container Id. + /// + + /// The recovery resource group Id. Valid for V2 scenarios. + /// + + /// The recovery cloud service Id. Valid for V1 scenarios. + /// + + /// The recovery availability set Id. + /// + + /// The recovery proximity placement group Id. + /// + + /// The list of vm disk details. + /// + + /// The list of vm managed disk details. + /// + + /// The multi vm group name. + /// + + /// The multi vm group id. + /// + + /// The boot diagnostic storage account. + /// + + /// The recovery disk encryption information (for two pass flows). + /// + + /// The recovery availability zone. + /// + + /// The recovery extended location. + /// + + /// The recovery Azure virtual network ARM id. + /// + + /// The recovery subnet name. + /// + + /// The virtual machine scale set Id. + /// + + /// The recovery capacity reservation group Id. + /// + public A2AEnableProtectionInput(string fabricObjectId, string recoveryContainerId = default(string), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string recoveryProximityPlacementGroupId = default(string), System.Collections.Generic.IList vmDisks = default(System.Collections.Generic.IList), System.Collections.Generic.IList vmManagedDisks = default(System.Collections.Generic.IList), string multiVMGroupName = default(string), string multiVMGroupId = default(string), string recoveryBootDiagStorageAccountId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo), string recoveryAvailabilityZone = default(string), ExtendedLocation recoveryExtendedLocation = default(ExtendedLocation), string recoveryAzureNetworkId = default(string), string recoverySubnetName = default(string), string recoveryVirtualMachineScaleSetId = default(string), string recoveryCapacityReservationGroupId = default(string)) + { - FabricObjectId = fabricObjectId; - RecoveryContainerId = recoveryContainerId; - RecoveryResourceGroupId = recoveryResourceGroupId; - RecoveryCloudServiceId = recoveryCloudServiceId; - RecoveryAvailabilitySetId = recoveryAvailabilitySetId; - RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; - VmDisks = vmDisks; - VmManagedDisks = vmManagedDisks; - MultiVmGroupName = multiVmGroupName; - MultiVmGroupId = multiVmGroupId; - RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; - DiskEncryptionInfo = diskEncryptionInfo; - RecoveryAvailabilityZone = recoveryAvailabilityZone; - RecoveryExtendedLocation = recoveryExtendedLocation; - RecoveryAzureNetworkId = recoveryAzureNetworkId; - RecoverySubnetName = recoverySubnetName; - RecoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; - RecoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; + this.FabricObjectId = fabricObjectId; + this.RecoveryContainerId = recoveryContainerId; + this.RecoveryResourceGroupId = recoveryResourceGroupId; + this.RecoveryCloudServiceId = recoveryCloudServiceId; + this.RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + this.RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; + this.VMDisks = vmDisks; + this.VMManagedDisks = vmManagedDisks; + this.MultiVMGroupName = multiVMGroupName; + this.MultiVMGroupId = multiVMGroupId; + this.RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; + this.DiskEncryptionInfo = diskEncryptionInfo; + this.RecoveryAvailabilityZone = recoveryAvailabilityZone; + this.RecoveryExtendedLocation = recoveryExtendedLocation; + this.RecoveryAzureNetworkId = recoveryAzureNetworkId; + this.RecoverySubnetName = recoverySubnetName; + this.RecoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; + this.RecoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; CustomInit(); } @@ -93,131 +107,135 @@ public A2AEnableProtectionInput() /// partial void CustomInit(); + /// /// Gets or sets the fabric specific object Id of the virtual machine. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; set; } /// /// Gets or sets the recovery container Id. /// - [JsonProperty(PropertyName = "recoveryContainerId")] - public string RecoveryContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryContainerId")] + public string RecoveryContainerId {get; set; } /// - /// Gets or sets the recovery resource group Id. Valid for V2 - /// scenarios. + /// Gets or sets the recovery resource group Id. Valid for V2 scenarios. /// - [JsonProperty(PropertyName = "recoveryResourceGroupId")] - public string RecoveryResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId {get; set; } /// /// Gets or sets the recovery cloud service Id. Valid for V1 scenarios. /// - [JsonProperty(PropertyName = "recoveryCloudServiceId")] - public string RecoveryCloudServiceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryCloudServiceId")] + public string RecoveryCloudServiceId {get; set; } /// /// Gets or sets the recovery availability set Id. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] - public string RecoveryAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId {get; set; } /// /// Gets or sets the recovery proximity placement group Id. /// - [JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] - public string RecoveryProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] + public string RecoveryProximityPlacementGroupId {get; set; } /// /// Gets or sets the list of vm disk details. /// - [JsonProperty(PropertyName = "vmDisks")] - public IList VmDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisks")] + public System.Collections.Generic.IList VMDisks {get; set; } /// /// Gets or sets the list of vm managed disk details. /// - [JsonProperty(PropertyName = "vmManagedDisks")] - public IList VmManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmManagedDisks")] + public System.Collections.Generic.IList VMManagedDisks {get; set; } /// /// Gets or sets the multi vm group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; set; } /// /// Gets or sets the multi vm group id. /// - [JsonProperty(PropertyName = "multiVmGroupId")] - public string MultiVmGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVMGroupId {get; set; } /// /// Gets or sets the boot diagnostic storage account. /// - [JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] - public string RecoveryBootDiagStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] + public string RecoveryBootDiagStorageAccountId {get; set; } /// - /// Gets or sets the recovery disk encryption information (for two pass - /// flows). + /// Gets or sets the recovery disk encryption information (for two pass flows). /// - [JsonProperty(PropertyName = "diskEncryptionInfo")] - public DiskEncryptionInfo DiskEncryptionInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo {get; set; } /// /// Gets or sets the recovery availability zone. /// - [JsonProperty(PropertyName = "recoveryAvailabilityZone")] - public string RecoveryAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilityZone")] + public string RecoveryAvailabilityZone {get; set; } /// /// Gets or sets the recovery extended location. /// - [JsonProperty(PropertyName = "recoveryExtendedLocation")] - public ExtendedLocation RecoveryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryExtendedLocation")] + public ExtendedLocation RecoveryExtendedLocation {get; set; } /// /// Gets or sets the recovery Azure virtual network ARM id. /// - [JsonProperty(PropertyName = "recoveryAzureNetworkId")] - public string RecoveryAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureNetworkId")] + public string RecoveryAzureNetworkId {get; set; } /// /// Gets or sets the recovery subnet name. /// - [JsonProperty(PropertyName = "recoverySubnetName")] - public string RecoverySubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoverySubnetName")] + public string RecoverySubnetName {get; set; } /// /// Gets or sets the virtual machine scale set Id. /// - [JsonProperty(PropertyName = "recoveryVirtualMachineScaleSetId")] - public string RecoveryVirtualMachineScaleSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVirtualMachineScaleSetId")] + public string RecoveryVirtualMachineScaleSetId {get; set; } /// /// Gets or sets the recovery capacity reservation group Id. /// - [JsonProperty(PropertyName = "recoveryCapacityReservationGroupId")] - public string RecoveryCapacityReservationGroupId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryCapacityReservationGroupId")] + public string RecoveryCapacityReservationGroupId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (FabricObjectId == null) + if (this.FabricObjectId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FabricObjectId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FabricObjectId"); } - if (VmDisks != null) + + + + + + + if (this.VMDisks != null) { - foreach (var element in VmDisks) + foreach (var element in this.VMDisks) { if (element != null) { @@ -225,20 +243,29 @@ public virtual void Validate() } } } - if (VmManagedDisks != null) + if (this.VMManagedDisks != null) { - foreach (var element1 in VmManagedDisks) + foreach (var element in this.VMManagedDisks) { - if (element1 != null) + if (element != null) { - element1.Validate(); + element.Validate(); } } } - if (RecoveryExtendedLocation != null) + + + + + + if (this.RecoveryExtendedLocation != null) { - RecoveryExtendedLocation.Validate(); + this.RecoveryExtendedLocation.Validate(); } + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AEventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AEventDetails.cs index d17d12172ce5..d3a2d5e23d9c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AEventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AEventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,21 +24,33 @@ public A2AEventDetails() /// /// Initializes a new instance of the A2AEventDetails class. /// - /// The protected item arm - /// name. - /// The azure vm arm id. - /// Fabric arm name. - /// The fabric location. - /// Remote fabric arm name. - /// Remote fabric location. + + /// The protected item arm name. + /// + + /// The azure vm arm id. + /// + + /// Fabric arm name. + /// + + /// The fabric location. + /// + + /// Remote fabric arm name. + /// + + /// Remote fabric location. + /// public A2AEventDetails(string protectedItemName = default(string), string fabricObjectId = default(string), string fabricName = default(string), string fabricLocation = default(string), string remoteFabricName = default(string), string remoteFabricLocation = default(string)) + { - ProtectedItemName = protectedItemName; - FabricObjectId = fabricObjectId; - FabricName = fabricName; - FabricLocation = fabricLocation; - RemoteFabricName = remoteFabricName; - RemoteFabricLocation = remoteFabricLocation; + this.ProtectedItemName = protectedItemName; + this.FabricObjectId = fabricObjectId; + this.FabricName = fabricName; + this.FabricLocation = fabricLocation; + this.RemoteFabricName = remoteFabricName; + this.RemoteFabricLocation = remoteFabricLocation; CustomInit(); } @@ -53,41 +59,41 @@ public A2AEventDetails() /// partial void CustomInit(); + /// /// Gets or sets the protected item arm name. /// - [JsonProperty(PropertyName = "protectedItemName")] - public string ProtectedItemName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemName")] + public string ProtectedItemName {get; set; } /// /// Gets or sets the azure vm arm id. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; set; } /// /// Gets or sets fabric arm name. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// /// Gets or sets the fabric location. /// - [JsonProperty(PropertyName = "fabricLocation")] - public string FabricLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricLocation")] + public string FabricLocation {get; set; } /// /// Gets or sets remote fabric arm name. /// - [JsonProperty(PropertyName = "remoteFabricName")] - public string RemoteFabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "remoteFabricName")] + public string RemoteFabricName {get; set; } /// /// Gets or sets remote fabric location. /// - [JsonProperty(PropertyName = "remoteFabricLocation")] - public string RemoteFabricLocation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "remoteFabricLocation")] + public string RemoteFabricLocation {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AExtendedLocationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AExtendedLocationDetails.cs index ca6e093b6477..2efc19931dc7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AExtendedLocationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AExtendedLocationDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,17 @@ public A2AExtendedLocationDetails() /// /// Initializes a new instance of the A2AExtendedLocationDetails class. /// - /// The primary - /// ExtendedLocation. - /// The recovery - /// ExtendedLocation. + + /// The primary ExtendedLocation. + /// + + /// The recovery ExtendedLocation. + /// public A2AExtendedLocationDetails(ExtendedLocation primaryExtendedLocation = default(ExtendedLocation), ExtendedLocation recoveryExtendedLocation = default(ExtendedLocation)) + { - PrimaryExtendedLocation = primaryExtendedLocation; - RecoveryExtendedLocation = recoveryExtendedLocation; + this.PrimaryExtendedLocation = primaryExtendedLocation; + this.RecoveryExtendedLocation = recoveryExtendedLocation; CustomInit(); } @@ -45,34 +42,34 @@ public A2AExtendedLocationDetails() /// partial void CustomInit(); + /// /// Gets or sets the primary ExtendedLocation. /// - [JsonProperty(PropertyName = "primaryExtendedLocation")] - public ExtendedLocation PrimaryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryExtendedLocation")] + public ExtendedLocation PrimaryExtendedLocation {get; set; } /// /// Gets or sets the recovery ExtendedLocation. /// - [JsonProperty(PropertyName = "recoveryExtendedLocation")] - public ExtendedLocation RecoveryExtendedLocation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryExtendedLocation")] + public ExtendedLocation RecoveryExtendedLocation {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PrimaryExtendedLocation != null) + if (this.PrimaryExtendedLocation != null) { - PrimaryExtendedLocation.Validate(); + this.PrimaryExtendedLocation.Validate(); } - if (RecoveryExtendedLocation != null) + if (this.RecoveryExtendedLocation != null) { - RecoveryExtendedLocation.Validate(); + this.RecoveryExtendedLocation.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AFabricSpecificLocationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AFabricSpecificLocationDetails.cs index 969604c1c824..5650c5ba26bb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AFabricSpecificLocationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AFabricSpecificLocationDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AFabricSpecificLocationDetails { /// - /// Initializes a new instance of the A2AFabricSpecificLocationDetails - /// class. + /// Initializes a new instance of the A2AFabricSpecificLocationDetails class. /// public A2AFabricSpecificLocationDetails() { @@ -28,45 +21,59 @@ public A2AFabricSpecificLocationDetails() } /// - /// Initializes a new instance of the A2AFabricSpecificLocationDetails - /// class. - /// - /// The initial source zone - /// info. - /// The initial target zone - /// info. - /// The initial primary - /// ExtendedLocation. - /// The initial recovery - /// ExtendedLocation. - /// Initial primary fabric - /// location info. - /// The initial recovery - /// fabric location info. - /// Source zone info. - /// The target zone info. - /// The primary - /// ExtendedLocation. - /// The recovery - /// ExtendedLocation. - /// Primary fabric location - /// info. - /// The recovery fabric location - /// info. + /// Initializes a new instance of the A2AFabricSpecificLocationDetails class. + /// + + /// The initial source zone info. + /// + + /// The initial target zone info. + /// + + /// The initial primary ExtendedLocation. + /// + + /// The initial recovery ExtendedLocation. + /// + + /// Initial primary fabric location info. + /// + + /// The initial recovery fabric location info. + /// + + /// Source zone info. + /// + + /// The target zone info. + /// + + /// The primary ExtendedLocation. + /// + + /// The recovery ExtendedLocation. + /// + + /// Primary fabric location info. + /// + + /// The recovery fabric location info. + /// public A2AFabricSpecificLocationDetails(string initialPrimaryZone = default(string), string initialRecoveryZone = default(string), ExtendedLocation initialPrimaryExtendedLocation = default(ExtendedLocation), ExtendedLocation initialRecoveryExtendedLocation = default(ExtendedLocation), string initialPrimaryFabricLocation = default(string), string initialRecoveryFabricLocation = default(string), string primaryZone = default(string), string recoveryZone = default(string), ExtendedLocation primaryExtendedLocation = default(ExtendedLocation), ExtendedLocation recoveryExtendedLocation = default(ExtendedLocation), string primaryFabricLocation = default(string), string recoveryFabricLocation = default(string)) + { - InitialPrimaryZone = initialPrimaryZone; - InitialRecoveryZone = initialRecoveryZone; - InitialPrimaryExtendedLocation = initialPrimaryExtendedLocation; - InitialRecoveryExtendedLocation = initialRecoveryExtendedLocation; - InitialPrimaryFabricLocation = initialPrimaryFabricLocation; - InitialRecoveryFabricLocation = initialRecoveryFabricLocation; - PrimaryZone = primaryZone; - RecoveryZone = recoveryZone; - PrimaryExtendedLocation = primaryExtendedLocation; - RecoveryExtendedLocation = recoveryExtendedLocation; - PrimaryFabricLocation = primaryFabricLocation; - RecoveryFabricLocation = recoveryFabricLocation; + this.InitialPrimaryZone = initialPrimaryZone; + this.InitialRecoveryZone = initialRecoveryZone; + this.InitialPrimaryExtendedLocation = initialPrimaryExtendedLocation; + this.InitialRecoveryExtendedLocation = initialRecoveryExtendedLocation; + this.InitialPrimaryFabricLocation = initialPrimaryFabricLocation; + this.InitialRecoveryFabricLocation = initialRecoveryFabricLocation; + this.PrimaryZone = primaryZone; + this.RecoveryZone = recoveryZone; + this.PrimaryExtendedLocation = primaryExtendedLocation; + this.RecoveryExtendedLocation = recoveryExtendedLocation; + this.PrimaryFabricLocation = primaryFabricLocation; + this.RecoveryFabricLocation = recoveryFabricLocation; CustomInit(); } @@ -75,102 +82,110 @@ public A2AFabricSpecificLocationDetails() /// partial void CustomInit(); + /// /// Gets or sets the initial source zone info. /// - [JsonProperty(PropertyName = "initialPrimaryZone")] - public string InitialPrimaryZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialPrimaryZone")] + public string InitialPrimaryZone {get; set; } /// /// Gets or sets the initial target zone info. /// - [JsonProperty(PropertyName = "initialRecoveryZone")] - public string InitialRecoveryZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialRecoveryZone")] + public string InitialRecoveryZone {get; set; } /// /// Gets or sets the initial primary ExtendedLocation. /// - [JsonProperty(PropertyName = "initialPrimaryExtendedLocation")] - public ExtendedLocation InitialPrimaryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialPrimaryExtendedLocation")] + public ExtendedLocation InitialPrimaryExtendedLocation {get; set; } /// /// Gets or sets the initial recovery ExtendedLocation. /// - [JsonProperty(PropertyName = "initialRecoveryExtendedLocation")] - public ExtendedLocation InitialRecoveryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialRecoveryExtendedLocation")] + public ExtendedLocation InitialRecoveryExtendedLocation {get; set; } /// /// Gets or sets initial primary fabric location info. /// - [JsonProperty(PropertyName = "initialPrimaryFabricLocation")] - public string InitialPrimaryFabricLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialPrimaryFabricLocation")] + public string InitialPrimaryFabricLocation {get; set; } /// /// Gets or sets the initial recovery fabric location info. /// - [JsonProperty(PropertyName = "initialRecoveryFabricLocation")] - public string InitialRecoveryFabricLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialRecoveryFabricLocation")] + public string InitialRecoveryFabricLocation {get; set; } /// /// Gets or sets source zone info. /// - [JsonProperty(PropertyName = "primaryZone")] - public string PrimaryZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryZone")] + public string PrimaryZone {get; set; } /// /// Gets or sets the target zone info. /// - [JsonProperty(PropertyName = "recoveryZone")] - public string RecoveryZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryZone")] + public string RecoveryZone {get; set; } /// /// Gets or sets the primary ExtendedLocation. /// - [JsonProperty(PropertyName = "primaryExtendedLocation")] - public ExtendedLocation PrimaryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryExtendedLocation")] + public ExtendedLocation PrimaryExtendedLocation {get; set; } /// /// Gets or sets the recovery ExtendedLocation. /// - [JsonProperty(PropertyName = "recoveryExtendedLocation")] - public ExtendedLocation RecoveryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryExtendedLocation")] + public ExtendedLocation RecoveryExtendedLocation {get; set; } /// /// Gets or sets primary fabric location info. /// - [JsonProperty(PropertyName = "primaryFabricLocation")] - public string PrimaryFabricLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricLocation")] + public string PrimaryFabricLocation {get; set; } /// /// Gets or sets the recovery fabric location info. /// - [JsonProperty(PropertyName = "recoveryFabricLocation")] - public string RecoveryFabricLocation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricLocation")] + public string RecoveryFabricLocation {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (InitialPrimaryExtendedLocation != null) + + + if (this.InitialPrimaryExtendedLocation != null) { - InitialPrimaryExtendedLocation.Validate(); + this.InitialPrimaryExtendedLocation.Validate(); } - if (InitialRecoveryExtendedLocation != null) + if (this.InitialRecoveryExtendedLocation != null) { - InitialRecoveryExtendedLocation.Validate(); + this.InitialRecoveryExtendedLocation.Validate(); } - if (PrimaryExtendedLocation != null) + + + + + if (this.PrimaryExtendedLocation != null) { - PrimaryExtendedLocation.Validate(); + this.PrimaryExtendedLocation.Validate(); } - if (RecoveryExtendedLocation != null) + if (this.RecoveryExtendedLocation != null) { - RecoveryExtendedLocation.Validate(); + this.RecoveryExtendedLocation.Validate(); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2APolicyCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2APolicyCreationInput.cs index 7fabdda86540..f96a4ec1ea35 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2APolicyCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2APolicyCreationInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -31,21 +24,26 @@ public A2APolicyCreationInput() /// /// Initializes a new instance of the A2APolicyCreationInput class. /// - /// A value indicating whether multi-VM - /// sync has to be enabled. Value should be 'Enabled' or 'Disabled'. + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The crash consistent snapshot frequency (in minutes). + /// + + /// The app consistent snapshot frequency (in minutes). + /// + + /// A value indicating whether multi-VM sync has to be enabled. Value should be + /// 'Enabled' or 'Disabled'. /// Possible values include: 'Enable', 'Disable' - /// The duration in minutes until - /// which the recovery points need to be stored. - /// The crash - /// consistent snapshot frequency (in minutes). - /// The app consistent - /// snapshot frequency (in minutes). - public A2APolicyCreationInput(string multiVmSyncStatus, int? recoveryPointHistory = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + public A2APolicyCreationInput(string multiVMSyncStatus, int? recoveryPointHistory = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + { - RecoveryPointHistory = recoveryPointHistory; - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - MultiVmSyncStatus = multiVmSyncStatus; + this.RecoveryPointHistory = recoveryPointHistory; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.MultiVMSyncStatus = multiVMSyncStatus; CustomInit(); } @@ -54,45 +52,45 @@ public A2APolicyCreationInput() /// partial void CustomInit(); + /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistory")] - public int? RecoveryPointHistory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory {get; set; } /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the app consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. Value should be 'Enabled' or 'Disabled'. Possible values - /// include: 'Enable', 'Disable' + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (MultiVmSyncStatus == null) + if (this.MultiVMSyncStatus == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MultiVmSyncStatus"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MultiVMSyncStatus"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2APolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2APolicyDetails.cs index 4777211f25d3..a439e2d53ece 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2APolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2APolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,23 +24,29 @@ public A2APolicyDetails() /// /// Initializes a new instance of the A2APolicyDetails class. /// - /// The recovery point - /// threshold in minutes. - /// The duration in minutes until - /// which the recovery points need to be stored. - /// The app consistent - /// snapshot frequency in minutes. - /// A value indicating whether multi-VM - /// sync has to be enabled. - /// The crash - /// consistent snapshot frequency in minutes. - public A2APolicyDetails(int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVmSyncStatus = default(string), int? crashConsistentFrequencyInMinutes = default(int?)) + + /// The recovery point threshold in minutes. + /// + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The app consistent snapshot frequency in minutes. + /// + + /// A value indicating whether multi-VM sync has to be enabled. + /// + + /// The crash consistent snapshot frequency in minutes. + /// + public A2APolicyDetails(int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVMSyncStatus = default(string), int? crashConsistentFrequencyInMinutes = default(int?)) + { - RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; - RecoveryPointHistory = recoveryPointHistory; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - MultiVmSyncStatus = multiVmSyncStatus; - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + this.RecoveryPointHistory = recoveryPointHistory; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.MultiVMSyncStatus = multiVMSyncStatus; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; CustomInit(); } @@ -55,37 +55,36 @@ public A2APolicyDetails() /// partial void CustomInit(); + /// /// Gets or sets the recovery point threshold in minutes. /// - [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] - public int? RecoveryPointThresholdInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes {get; set; } /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistory")] - public int? RecoveryPointHistory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory {get; set; } /// /// Gets or sets the app consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } /// /// Gets or sets the crash consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectedDiskDetails.cs index 22b27bfa76d4..46ae777c7b03 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectedDiskDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,73 +23,103 @@ public A2AProtectedDiskDetails() /// /// Initializes a new instance of the A2AProtectedDiskDetails class. /// - /// The disk uri. - /// The recovery disk - /// storage account. - /// The primary disk - /// storage account. - /// Recovery disk uri. - /// The disk name. - /// The disk capacity in - /// bytes. - /// The primary - /// staging storage account. - /// The type of disk. - /// A value indicating whether resync is - /// required for this disk. - /// The percentage of the - /// monitoring job. The type of the monitoring job is defined by - /// MonitoringJobType property. - /// The type of the monitoring job. The - /// progress is contained in MonitoringPercentageCompletion - /// property. - /// The data - /// pending for replication in MB at staging account. - /// The data pending at - /// source virtual machine in MB. - /// The disk state. - /// The disk level operations - /// list. - /// A value indicating whether vm has - /// encrypted os disk or not. - /// The secret URL / identifier - /// (BEK). - /// The KeyVault resource id for secret - /// (BEK). - /// A value indicating whether disk - /// key got encrypted or not. - /// The key URL / identifier (KEK). - /// The KeyVault resource id for key - /// (KEK). - /// The failover name for the managed - /// disk. - /// The test failover name for the managed - /// disk. - public A2AProtectedDiskDetails(string diskUri = default(string), string recoveryAzureStorageAccountId = default(string), string primaryDiskAzureStorageAccountId = default(string), string recoveryDiskUri = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?), string diskState = default(string), IList allowedDiskLevelOperation = default(IList), bool? isDiskEncrypted = default(bool?), string secretIdentifier = default(string), string dekKeyVaultArmId = default(string), bool? isDiskKeyEncrypted = default(bool?), string keyIdentifier = default(string), string kekKeyVaultArmId = default(string), string failoverDiskName = default(string), string tfoDiskName = default(string)) + + /// The disk uri. + /// + + /// The recovery disk storage account. + /// + + /// The primary disk storage account. + /// + + /// Recovery disk uri. + /// + + /// The disk name. + /// + + /// The disk capacity in bytes. + /// + + /// The primary staging storage account. + /// + + /// The type of disk. + /// + + /// A value indicating whether resync is required for this disk. + /// + + /// The percentage of the monitoring job. The type of the monitoring job is + /// defined by MonitoringJobType property. + /// + + /// The type of the monitoring job. The progress is contained in + /// MonitoringPercentageCompletion property. + /// + + /// The data pending for replication in MB at staging account. + /// + + /// The data pending at source virtual machine in MB. + /// + + /// The disk state. + /// + + /// The disk level operations list. + /// + + /// A value indicating whether vm has encrypted os disk or not. + /// + + /// The secret URL / identifier (BEK). + /// + + /// The KeyVault resource id for secret (BEK). + /// + + /// A value indicating whether disk key got encrypted or not. + /// + + /// The key URL / identifier (KEK). + /// + + /// The KeyVault resource id for key (KEK). + /// + + /// The failover name for the managed disk. + /// + + /// The test failover name for the managed disk. + /// + public A2AProtectedDiskDetails(string diskUri = default(string), string recoveryAzureStorageAccountId = default(string), string primaryDiskAzureStorageAccountId = default(string), string recoveryDiskUri = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMb = default(double?), double? dataPendingAtSourceAgentInMb = default(double?), string diskState = default(string), System.Collections.Generic.IList allowedDiskLevelOperation = default(System.Collections.Generic.IList), bool? isDiskEncrypted = default(bool?), string secretIdentifier = default(string), string dekKeyVaultArmId = default(string), bool? isDiskKeyEncrypted = default(bool?), string keyIdentifier = default(string), string kekKeyVaultArmId = default(string), string failoverDiskName = default(string), string tfoDiskName = default(string)) + { - DiskUri = diskUri; - RecoveryAzureStorageAccountId = recoveryAzureStorageAccountId; - PrimaryDiskAzureStorageAccountId = primaryDiskAzureStorageAccountId; - RecoveryDiskUri = recoveryDiskUri; - DiskName = diskName; - DiskCapacityInBytes = diskCapacityInBytes; - PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; - DiskType = diskType; - ResyncRequired = resyncRequired; - MonitoringPercentageCompletion = monitoringPercentageCompletion; - MonitoringJobType = monitoringJobType; - DataPendingInStagingStorageAccountInMB = dataPendingInStagingStorageAccountInMB; - DataPendingAtSourceAgentInMB = dataPendingAtSourceAgentInMB; - DiskState = diskState; - AllowedDiskLevelOperation = allowedDiskLevelOperation; - IsDiskEncrypted = isDiskEncrypted; - SecretIdentifier = secretIdentifier; - DekKeyVaultArmId = dekKeyVaultArmId; - IsDiskKeyEncrypted = isDiskKeyEncrypted; - KeyIdentifier = keyIdentifier; - KekKeyVaultArmId = kekKeyVaultArmId; - FailoverDiskName = failoverDiskName; - TfoDiskName = tfoDiskName; + this.DiskUri = diskUri; + this.RecoveryAzureStorageAccountId = recoveryAzureStorageAccountId; + this.PrimaryDiskAzureStorageAccountId = primaryDiskAzureStorageAccountId; + this.RecoveryDiskUri = recoveryDiskUri; + this.DiskName = diskName; + this.DiskCapacityInBytes = diskCapacityInBytes; + this.PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + this.DiskType = diskType; + this.ResyncRequired = resyncRequired; + this.MonitoringPercentageCompletion = monitoringPercentageCompletion; + this.MonitoringJobType = monitoringJobType; + this.DataPendingInStagingStorageAccountInMb = dataPendingInStagingStorageAccountInMb; + this.DataPendingAtSourceAgentInMb = dataPendingAtSourceAgentInMb; + this.DiskState = diskState; + this.AllowedDiskLevelOperation = allowedDiskLevelOperation; + this.IsDiskEncrypted = isDiskEncrypted; + this.SecretIdentifier = secretIdentifier; + this.DekKeyVaultArmId = dekKeyVaultArmId; + this.IsDiskKeyEncrypted = isDiskKeyEncrypted; + this.KeyIdentifier = keyIdentifier; + this.KekKeyVaultArmId = kekKeyVaultArmId; + this.FailoverDiskName = failoverDiskName; + this.TfoDiskName = tfoDiskName; CustomInit(); } @@ -106,149 +128,145 @@ public A2AProtectedDiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk uri. /// - [JsonProperty(PropertyName = "diskUri")] - public string DiskUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskUri")] + public string DiskUri {get; set; } /// /// Gets or sets the recovery disk storage account. /// - [JsonProperty(PropertyName = "recoveryAzureStorageAccountId")] - public string RecoveryAzureStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureStorageAccountId")] + public string RecoveryAzureStorageAccountId {get; set; } /// /// Gets or sets the primary disk storage account. /// - [JsonProperty(PropertyName = "primaryDiskAzureStorageAccountId")] - public string PrimaryDiskAzureStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryDiskAzureStorageAccountId")] + public string PrimaryDiskAzureStorageAccountId {get; set; } /// /// Gets or sets recovery disk uri. /// - [JsonProperty(PropertyName = "recoveryDiskUri")] - public string RecoveryDiskUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryDiskUri")] + public string RecoveryDiskUri {get; set; } /// /// Gets or sets the disk name. /// - [JsonProperty(PropertyName = "diskName")] - public string DiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskName")] + public string DiskName {get; set; } /// /// Gets or sets the disk capacity in bytes. /// - [JsonProperty(PropertyName = "diskCapacityInBytes")] - public long? DiskCapacityInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskCapacityInBytes")] + public long? DiskCapacityInBytes {get; set; } /// /// Gets or sets the primary staging storage account. /// - [JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] - public string PrimaryStagingAzureStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] + public string PrimaryStagingAzureStorageAccountId {get; set; } /// /// Gets or sets the type of disk. /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// - /// Gets or sets a value indicating whether resync is required for this - /// disk. + /// Gets or sets a value indicating whether resync is required for this disk. /// - [JsonProperty(PropertyName = "resyncRequired")] - public bool? ResyncRequired { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncRequired")] + public bool? ResyncRequired {get; set; } /// /// Gets or sets the percentage of the monitoring job. The type of the /// monitoring job is defined by MonitoringJobType property. /// - [JsonProperty(PropertyName = "monitoringPercentageCompletion")] - public int? MonitoringPercentageCompletion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monitoringPercentageCompletion")] + public int? MonitoringPercentageCompletion {get; set; } /// - /// Gets or sets the type of the monitoring job. The progress is - /// contained in MonitoringPercentageCompletion property. + /// Gets or sets the type of the monitoring job. The progress is contained in + /// MonitoringPercentageCompletion property. /// - [JsonProperty(PropertyName = "monitoringJobType")] - public string MonitoringJobType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monitoringJobType")] + public string MonitoringJobType {get; set; } /// - /// Gets or sets the data pending for replication in MB at staging - /// account. + /// Gets or sets the data pending for replication in MB at staging account. /// - [JsonProperty(PropertyName = "dataPendingInStagingStorageAccountInMB")] - public double? DataPendingInStagingStorageAccountInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPendingInStagingStorageAccountInMB")] + public double? DataPendingInStagingStorageAccountInMb {get; set; } /// /// Gets or sets the data pending at source virtual machine in MB. /// - [JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] - public double? DataPendingAtSourceAgentInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] + public double? DataPendingAtSourceAgentInMb {get; set; } /// /// Gets or sets the disk state. /// - [JsonProperty(PropertyName = "diskState")] - public string DiskState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskState")] + public string DiskState {get; set; } /// /// Gets or sets the disk level operations list. /// - [JsonProperty(PropertyName = "allowedDiskLevelOperation")] - public IList AllowedDiskLevelOperation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedDiskLevelOperation")] + public System.Collections.Generic.IList AllowedDiskLevelOperation {get; set; } /// - /// Gets or sets a value indicating whether vm has encrypted os disk or - /// not. + /// Gets or sets a value indicating whether vm has encrypted os disk or not. /// - [JsonProperty(PropertyName = "isDiskEncrypted")] - public bool? IsDiskEncrypted { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isDiskEncrypted")] + public bool? IsDiskEncrypted {get; set; } /// /// Gets or sets the secret URL / identifier (BEK). /// - [JsonProperty(PropertyName = "secretIdentifier")] - public string SecretIdentifier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secretIdentifier")] + public string SecretIdentifier {get; set; } /// /// Gets or sets the KeyVault resource id for secret (BEK). /// - [JsonProperty(PropertyName = "dekKeyVaultArmId")] - public string DekKeyVaultArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dekKeyVaultArmId")] + public string DekKeyVaultArmId {get; set; } /// - /// Gets or sets a value indicating whether disk key got encrypted or - /// not. + /// Gets or sets a value indicating whether disk key got encrypted or not. /// - [JsonProperty(PropertyName = "isDiskKeyEncrypted")] - public bool? IsDiskKeyEncrypted { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isDiskKeyEncrypted")] + public bool? IsDiskKeyEncrypted {get; set; } /// /// Gets or sets the key URL / identifier (KEK). /// - [JsonProperty(PropertyName = "keyIdentifier")] - public string KeyIdentifier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyIdentifier")] + public string KeyIdentifier {get; set; } /// /// Gets or sets the KeyVault resource id for key (KEK). /// - [JsonProperty(PropertyName = "kekKeyVaultArmId")] - public string KekKeyVaultArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekKeyVaultArmId")] + public string KekKeyVaultArmId {get; set; } /// /// Gets or sets the failover name for the managed disk. /// - [JsonProperty(PropertyName = "failoverDiskName")] - public string FailoverDiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDiskName")] + public string FailoverDiskName {get; set; } /// /// Gets or sets the test failover name for the managed disk. /// - [JsonProperty(PropertyName = "tfoDiskName")] - public string TfoDiskName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoDiskName")] + public string TfoDiskName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectedManagedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectedManagedDiskDetails.cs index c2825bfc962d..720695dec419 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectedManagedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectedManagedDiskDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AProtectedManagedDiskDetails { /// - /// Initializes a new instance of the A2AProtectedManagedDiskDetails - /// class. + /// Initializes a new instance of the A2AProtectedManagedDiskDetails class. /// public A2AProtectedManagedDiskDetails() { @@ -30,94 +21,127 @@ public A2AProtectedManagedDiskDetails() } /// - /// Initializes a new instance of the A2AProtectedManagedDiskDetails - /// class. + /// Initializes a new instance of the A2AProtectedManagedDiskDetails class. /// - /// The managed disk Arm id. - /// The recovery disk resource - /// group Arm Id. - /// Recovery target disk Arm - /// Id. - /// Recovery replica disk Arm - /// Id. - /// Recovery original target - /// disk Arm Id. - /// The replica disk type. - /// Its an optional value and will be same as source disk type if not - /// user provided. - /// The target disk type - /// after failover. Its an optional value and will be same as source - /// disk type if not user provided. - /// The recovery disk - /// encryption set Id. - /// The primary disk - /// encryption set Id. - /// The disk name. - /// The disk capacity in - /// bytes. - /// The primary - /// staging storage account. - /// The type of disk. - /// A value indicating whether resync is - /// required for this disk. - /// The percentage of the - /// monitoring job. The type of the monitoring job is defined by - /// MonitoringJobType property. - /// The type of the monitoring job. The - /// progress is contained in MonitoringPercentageCompletion - /// property. - /// The data - /// pending for replication in MB at staging account. - /// The data pending at - /// source virtual machine in MB. - /// The disk state. - /// The disk level operations - /// list. - /// A value indicating whether vm has - /// encrypted os disk or not. - /// The secret URL / identifier - /// (BEK). - /// The KeyVault resource id for secret - /// (BEK). - /// A value indicating whether disk - /// key got encrypted or not. - /// The key URL / identifier (KEK). - /// The KeyVault resource id for key - /// (KEK). - /// The failover name for the managed - /// disk. - /// The test failover name for the managed - /// disk. - public A2AProtectedManagedDiskDetails(string diskId = default(string), string recoveryResourceGroupId = default(string), string recoveryTargetDiskId = default(string), string recoveryReplicaDiskId = default(string), string recoveryOrignalTargetDiskId = default(string), string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), string recoveryDiskEncryptionSetId = default(string), string primaryDiskEncryptionSetId = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?), string diskState = default(string), IList allowedDiskLevelOperation = default(IList), bool? isDiskEncrypted = default(bool?), string secretIdentifier = default(string), string dekKeyVaultArmId = default(string), bool? isDiskKeyEncrypted = default(bool?), string keyIdentifier = default(string), string kekKeyVaultArmId = default(string), string failoverDiskName = default(string), string tfoDiskName = default(string)) + + /// The managed disk Arm id. + /// + + /// The recovery disk resource group Arm Id. + /// + + /// Recovery target disk Arm Id. + /// + + /// Recovery replica disk Arm Id. + /// + + /// Recovery original target disk Arm Id. + /// + + /// The replica disk type. Its an optional value and will be same as source + /// disk type if not user provided. + /// + + /// The target disk type after failover. Its an optional value and will be same + /// as source disk type if not user provided. + /// + + /// The recovery disk encryption set Id. + /// + + /// The primary disk encryption set Id. + /// + + /// The disk name. + /// + + /// The disk capacity in bytes. + /// + + /// The primary staging storage account. + /// + + /// The type of disk. + /// + + /// A value indicating whether resync is required for this disk. + /// + + /// The percentage of the monitoring job. The type of the monitoring job is + /// defined by MonitoringJobType property. + /// + + /// The type of the monitoring job. The progress is contained in + /// MonitoringPercentageCompletion property. + /// + + /// The data pending for replication in MB at staging account. + /// + + /// The data pending at source virtual machine in MB. + /// + + /// The disk state. + /// + + /// The disk level operations list. + /// + + /// A value indicating whether vm has encrypted os disk or not. + /// + + /// The secret URL / identifier (BEK). + /// + + /// The KeyVault resource id for secret (BEK). + /// + + /// A value indicating whether disk key got encrypted or not. + /// + + /// The key URL / identifier (KEK). + /// + + /// The KeyVault resource id for key (KEK). + /// + + /// The failover name for the managed disk. + /// + + /// The test failover name for the managed disk. + /// + public A2AProtectedManagedDiskDetails(string diskId = default(string), string recoveryResourceGroupId = default(string), string recoveryTargetDiskId = default(string), string recoveryReplicaDiskId = default(string), string recoveryOrignalTargetDiskId = default(string), string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), string recoveryDiskEncryptionSetId = default(string), string primaryDiskEncryptionSetId = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMb = default(double?), double? dataPendingAtSourceAgentInMb = default(double?), string diskState = default(string), System.Collections.Generic.IList allowedDiskLevelOperation = default(System.Collections.Generic.IList), bool? isDiskEncrypted = default(bool?), string secretIdentifier = default(string), string dekKeyVaultArmId = default(string), bool? isDiskKeyEncrypted = default(bool?), string keyIdentifier = default(string), string kekKeyVaultArmId = default(string), string failoverDiskName = default(string), string tfoDiskName = default(string)) + { - DiskId = diskId; - RecoveryResourceGroupId = recoveryResourceGroupId; - RecoveryTargetDiskId = recoveryTargetDiskId; - RecoveryReplicaDiskId = recoveryReplicaDiskId; - RecoveryOrignalTargetDiskId = recoveryOrignalTargetDiskId; - RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; - RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType; - RecoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId; - PrimaryDiskEncryptionSetId = primaryDiskEncryptionSetId; - DiskName = diskName; - DiskCapacityInBytes = diskCapacityInBytes; - PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; - DiskType = diskType; - ResyncRequired = resyncRequired; - MonitoringPercentageCompletion = monitoringPercentageCompletion; - MonitoringJobType = monitoringJobType; - DataPendingInStagingStorageAccountInMB = dataPendingInStagingStorageAccountInMB; - DataPendingAtSourceAgentInMB = dataPendingAtSourceAgentInMB; - DiskState = diskState; - AllowedDiskLevelOperation = allowedDiskLevelOperation; - IsDiskEncrypted = isDiskEncrypted; - SecretIdentifier = secretIdentifier; - DekKeyVaultArmId = dekKeyVaultArmId; - IsDiskKeyEncrypted = isDiskKeyEncrypted; - KeyIdentifier = keyIdentifier; - KekKeyVaultArmId = kekKeyVaultArmId; - FailoverDiskName = failoverDiskName; - TfoDiskName = tfoDiskName; + this.DiskId = diskId; + this.RecoveryResourceGroupId = recoveryResourceGroupId; + this.RecoveryTargetDiskId = recoveryTargetDiskId; + this.RecoveryReplicaDiskId = recoveryReplicaDiskId; + this.RecoveryOrignalTargetDiskId = recoveryOrignalTargetDiskId; + this.RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; + this.RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType; + this.RecoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId; + this.PrimaryDiskEncryptionSetId = primaryDiskEncryptionSetId; + this.DiskName = diskName; + this.DiskCapacityInBytes = diskCapacityInBytes; + this.PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + this.DiskType = diskType; + this.ResyncRequired = resyncRequired; + this.MonitoringPercentageCompletion = monitoringPercentageCompletion; + this.MonitoringJobType = monitoringJobType; + this.DataPendingInStagingStorageAccountInMb = dataPendingInStagingStorageAccountInMb; + this.DataPendingAtSourceAgentInMb = dataPendingAtSourceAgentInMb; + this.DiskState = diskState; + this.AllowedDiskLevelOperation = allowedDiskLevelOperation; + this.IsDiskEncrypted = isDiskEncrypted; + this.SecretIdentifier = secretIdentifier; + this.DekKeyVaultArmId = dekKeyVaultArmId; + this.IsDiskKeyEncrypted = isDiskKeyEncrypted; + this.KeyIdentifier = keyIdentifier; + this.KekKeyVaultArmId = kekKeyVaultArmId; + this.FailoverDiskName = failoverDiskName; + this.TfoDiskName = tfoDiskName; CustomInit(); } @@ -126,181 +150,177 @@ public A2AProtectedManagedDiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the managed disk Arm id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the recovery disk resource group Arm Id. /// - [JsonProperty(PropertyName = "recoveryResourceGroupId")] - public string RecoveryResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId {get; set; } /// /// Gets or sets recovery target disk Arm Id. /// - [JsonProperty(PropertyName = "recoveryTargetDiskId")] - public string RecoveryTargetDiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryTargetDiskId")] + public string RecoveryTargetDiskId {get; set; } /// /// Gets or sets recovery replica disk Arm Id. /// - [JsonProperty(PropertyName = "recoveryReplicaDiskId")] - public string RecoveryReplicaDiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryReplicaDiskId")] + public string RecoveryReplicaDiskId {get; set; } /// /// Gets or sets recovery original target disk Arm Id. /// - [JsonProperty(PropertyName = "recoveryOrignalTargetDiskId")] - public string RecoveryOrignalTargetDiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryOrignalTargetDiskId")] + public string RecoveryOrignalTargetDiskId {get; set; } /// - /// Gets or sets the replica disk type. Its an optional value and will - /// be same as source disk type if not user provided. + /// Gets or sets the replica disk type. Its an optional value and will be same + /// as source disk type if not user provided. /// - [JsonProperty(PropertyName = "recoveryReplicaDiskAccountType")] - public string RecoveryReplicaDiskAccountType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryReplicaDiskAccountType")] + public string RecoveryReplicaDiskAccountType {get; set; } /// - /// Gets or sets the target disk type after failover. Its an optional - /// value and will be same as source disk type if not user provided. + /// Gets or sets the target disk type after failover. Its an optional value and + /// will be same as source disk type if not user provided. /// - [JsonProperty(PropertyName = "recoveryTargetDiskAccountType")] - public string RecoveryTargetDiskAccountType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryTargetDiskAccountType")] + public string RecoveryTargetDiskAccountType {get; set; } /// /// Gets or sets the recovery disk encryption set Id. /// - [JsonProperty(PropertyName = "recoveryDiskEncryptionSetId")] - public string RecoveryDiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryDiskEncryptionSetId")] + public string RecoveryDiskEncryptionSetId {get; set; } /// /// Gets or sets the primary disk encryption set Id. /// - [JsonProperty(PropertyName = "primaryDiskEncryptionSetId")] - public string PrimaryDiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryDiskEncryptionSetId")] + public string PrimaryDiskEncryptionSetId {get; set; } /// /// Gets or sets the disk name. /// - [JsonProperty(PropertyName = "diskName")] - public string DiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskName")] + public string DiskName {get; set; } /// /// Gets or sets the disk capacity in bytes. /// - [JsonProperty(PropertyName = "diskCapacityInBytes")] - public long? DiskCapacityInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskCapacityInBytes")] + public long? DiskCapacityInBytes {get; set; } /// /// Gets or sets the primary staging storage account. /// - [JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] - public string PrimaryStagingAzureStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] + public string PrimaryStagingAzureStorageAccountId {get; set; } /// /// Gets or sets the type of disk. /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// - /// Gets or sets a value indicating whether resync is required for this - /// disk. + /// Gets or sets a value indicating whether resync is required for this disk. /// - [JsonProperty(PropertyName = "resyncRequired")] - public bool? ResyncRequired { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncRequired")] + public bool? ResyncRequired {get; set; } /// /// Gets or sets the percentage of the monitoring job. The type of the /// monitoring job is defined by MonitoringJobType property. /// - [JsonProperty(PropertyName = "monitoringPercentageCompletion")] - public int? MonitoringPercentageCompletion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monitoringPercentageCompletion")] + public int? MonitoringPercentageCompletion {get; set; } /// - /// Gets or sets the type of the monitoring job. The progress is - /// contained in MonitoringPercentageCompletion property. + /// Gets or sets the type of the monitoring job. The progress is contained in + /// MonitoringPercentageCompletion property. /// - [JsonProperty(PropertyName = "monitoringJobType")] - public string MonitoringJobType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monitoringJobType")] + public string MonitoringJobType {get; set; } /// - /// Gets or sets the data pending for replication in MB at staging - /// account. + /// Gets or sets the data pending for replication in MB at staging account. /// - [JsonProperty(PropertyName = "dataPendingInStagingStorageAccountInMB")] - public double? DataPendingInStagingStorageAccountInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPendingInStagingStorageAccountInMB")] + public double? DataPendingInStagingStorageAccountInMb {get; set; } /// /// Gets or sets the data pending at source virtual machine in MB. /// - [JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] - public double? DataPendingAtSourceAgentInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] + public double? DataPendingAtSourceAgentInMb {get; set; } /// /// Gets or sets the disk state. /// - [JsonProperty(PropertyName = "diskState")] - public string DiskState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskState")] + public string DiskState {get; set; } /// /// Gets or sets the disk level operations list. /// - [JsonProperty(PropertyName = "allowedDiskLevelOperation")] - public IList AllowedDiskLevelOperation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedDiskLevelOperation")] + public System.Collections.Generic.IList AllowedDiskLevelOperation {get; set; } /// - /// Gets or sets a value indicating whether vm has encrypted os disk or - /// not. + /// Gets or sets a value indicating whether vm has encrypted os disk or not. /// - [JsonProperty(PropertyName = "isDiskEncrypted")] - public bool? IsDiskEncrypted { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isDiskEncrypted")] + public bool? IsDiskEncrypted {get; set; } /// /// Gets or sets the secret URL / identifier (BEK). /// - [JsonProperty(PropertyName = "secretIdentifier")] - public string SecretIdentifier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secretIdentifier")] + public string SecretIdentifier {get; set; } /// /// Gets or sets the KeyVault resource id for secret (BEK). /// - [JsonProperty(PropertyName = "dekKeyVaultArmId")] - public string DekKeyVaultArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dekKeyVaultArmId")] + public string DekKeyVaultArmId {get; set; } /// - /// Gets or sets a value indicating whether disk key got encrypted or - /// not. + /// Gets or sets a value indicating whether disk key got encrypted or not. /// - [JsonProperty(PropertyName = "isDiskKeyEncrypted")] - public bool? IsDiskKeyEncrypted { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isDiskKeyEncrypted")] + public bool? IsDiskKeyEncrypted {get; set; } /// /// Gets or sets the key URL / identifier (KEK). /// - [JsonProperty(PropertyName = "keyIdentifier")] - public string KeyIdentifier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyIdentifier")] + public string KeyIdentifier {get; set; } /// /// Gets or sets the KeyVault resource id for key (KEK). /// - [JsonProperty(PropertyName = "kekKeyVaultArmId")] - public string KekKeyVaultArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekKeyVaultArmId")] + public string KekKeyVaultArmId {get; set; } /// /// Gets or sets the failover name for the managed disk. /// - [JsonProperty(PropertyName = "failoverDiskName")] - public string FailoverDiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDiskName")] + public string FailoverDiskName {get; set; } /// /// Gets or sets the test failover name for the managed disk. /// - [JsonProperty(PropertyName = "tfoDiskName")] - public string TfoDiskName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoDiskName")] + public string TfoDiskName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionContainerMappingDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionContainerMappingDetails.cs index 3b9f1f92b968..4492f2289aa5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionContainerMappingDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionContainerMappingDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AProtectionContainerMappingDetails : ProtectionContainerMappingProviderSpecificDetails { /// - /// Initializes a new instance of the - /// A2AProtectionContainerMappingDetails class. + /// Initializes a new instance of the A2AProtectionContainerMappingDetails class. /// public A2AProtectionContainerMappingDetails() { @@ -29,27 +22,31 @@ public A2AProtectionContainerMappingDetails() } /// - /// Initializes a new instance of the - /// A2AProtectionContainerMappingDetails class. + /// Initializes a new instance of the A2AProtectionContainerMappingDetails class. /// - /// A value indicating whether the - /// auto update is enabled. Possible values include: 'Disabled', - /// 'Enabled' - /// The automation account arm - /// id. - /// A value - /// indicating the type authentication to use for automation Account. - /// Possible values include: 'RunAsAccount', - /// 'SystemAssignedIdentity' - /// The schedule arm name. - /// The job schedule arm name. + + /// A value indicating whether the auto update is enabled. + /// Possible values include: 'Disabled', 'Enabled' + + /// The automation account arm id. + /// + + /// A value indicating the type authentication to use for automation Account. + /// Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' + + /// The schedule arm name. + /// + + /// The job schedule arm name. + /// public A2AProtectionContainerMappingDetails(string agentAutoUpdateStatus = default(string), string automationAccountArmId = default(string), string automationAccountAuthenticationType = default(string), string scheduleName = default(string), string jobScheduleName = default(string)) + { - AgentAutoUpdateStatus = agentAutoUpdateStatus; - AutomationAccountArmId = automationAccountArmId; - AutomationAccountAuthenticationType = automationAccountAuthenticationType; - ScheduleName = scheduleName; - JobScheduleName = jobScheduleName; + this.AgentAutoUpdateStatus = agentAutoUpdateStatus; + this.AutomationAccountArmId = automationAccountArmId; + this.AutomationAccountAuthenticationType = automationAccountAuthenticationType; + this.ScheduleName = scheduleName; + this.JobScheduleName = jobScheduleName; CustomInit(); } @@ -58,38 +55,36 @@ public A2AProtectionContainerMappingDetails() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether the auto update is enabled. - /// Possible values include: 'Disabled', 'Enabled' + /// Gets or sets a value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "agentAutoUpdateStatus")] - public string AgentAutoUpdateStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentAutoUpdateStatus")] + public string AgentAutoUpdateStatus {get; set; } /// /// Gets or sets the automation account arm id. /// - [JsonProperty(PropertyName = "automationAccountArmId")] - public string AutomationAccountArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountArmId")] + public string AutomationAccountArmId {get; set; } /// /// Gets or sets a value indicating the type authentication to use for - /// automation Account. Possible values include: 'RunAsAccount', - /// 'SystemAssignedIdentity' + /// automation Account. Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' /// - [JsonProperty(PropertyName = "automationAccountAuthenticationType")] - public string AutomationAccountAuthenticationType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountAuthenticationType")] + public string AutomationAccountAuthenticationType {get; set; } /// /// Gets or sets the schedule arm name. /// - [JsonProperty(PropertyName = "scheduleName")] - public string ScheduleName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleName")] + public string ScheduleName {get; set; } /// /// Gets or sets the job schedule arm name. /// - [JsonProperty(PropertyName = "jobScheduleName")] - public string JobScheduleName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "jobScheduleName")] + public string JobScheduleName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionIntentDiskInputDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionIntentDiskInputDetails.cs index 7a654e3f1803..1bfee4995fbb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionIntentDiskInputDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionIntentDiskInputDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AProtectionIntentDiskInputDetails { /// - /// Initializes a new instance of the - /// A2AProtectionIntentDiskInputDetails class. + /// Initializes a new instance of the A2AProtectionIntentDiskInputDetails class. /// public A2AProtectionIntentDiskInputDetails() { @@ -29,19 +21,23 @@ public A2AProtectionIntentDiskInputDetails() } /// - /// Initializes a new instance of the - /// A2AProtectionIntentDiskInputDetails class. + /// Initializes a new instance of the A2AProtectionIntentDiskInputDetails class. /// - /// The disk Uri. - /// The recovery - /// VHD storage account input. - /// The primary - /// staging storage account input. + + /// The disk Uri. + /// + + /// The recovery VHD storage account input. + /// + + /// The primary staging storage account input. + /// public A2AProtectionIntentDiskInputDetails(string diskUri, StorageAccountCustomDetails recoveryAzureStorageAccountCustomInput = default(StorageAccountCustomDetails), StorageAccountCustomDetails primaryStagingStorageAccountCustomInput = default(StorageAccountCustomDetails)) + { - DiskUri = diskUri; - RecoveryAzureStorageAccountCustomInput = recoveryAzureStorageAccountCustomInput; - PrimaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput; + this.DiskUri = diskUri; + this.RecoveryAzureStorageAccountCustomInput = recoveryAzureStorageAccountCustomInput; + this.PrimaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput; CustomInit(); } @@ -50,36 +46,39 @@ public A2AProtectionIntentDiskInputDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk Uri. /// - [JsonProperty(PropertyName = "diskUri")] - public string DiskUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskUri")] + public string DiskUri {get; set; } /// /// Gets or sets the recovery VHD storage account input. /// - [JsonProperty(PropertyName = "recoveryAzureStorageAccountCustomInput")] - public StorageAccountCustomDetails RecoveryAzureStorageAccountCustomInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureStorageAccountCustomInput")] + public StorageAccountCustomDetails RecoveryAzureStorageAccountCustomInput {get; set; } /// /// Gets or sets the primary staging storage account input. /// - [JsonProperty(PropertyName = "primaryStagingStorageAccountCustomInput")] - public StorageAccountCustomDetails PrimaryStagingStorageAccountCustomInput { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryStagingStorageAccountCustomInput")] + public StorageAccountCustomDetails PrimaryStagingStorageAccountCustomInput {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (DiskUri == null) + if (this.DiskUri == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskUri"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskUri"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionIntentManagedDiskInputDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionIntentManagedDiskInputDetails.cs index 6bcaad089093..7ada9d28432b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionIntentManagedDiskInputDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AProtectionIntentManagedDiskInputDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AProtectionIntentManagedDiskInputDetails { /// - /// Initializes a new instance of the - /// A2AProtectionIntentManagedDiskInputDetails class. + /// Initializes a new instance of the A2AProtectionIntentManagedDiskInputDetails class. /// public A2AProtectionIntentManagedDiskInputDetails() { @@ -29,33 +21,41 @@ public A2AProtectionIntentManagedDiskInputDetails() } /// - /// Initializes a new instance of the - /// A2AProtectionIntentManagedDiskInputDetails class. + /// Initializes a new instance of the A2AProtectionIntentManagedDiskInputDetails class. /// - /// The disk Id. - /// The primary - /// staging storage account input. - /// The recovery - /// resource group input. - /// The replica disk type. - /// Its an optional value and will be same as source disk type if not - /// user provided. - /// The target disk type - /// after failover. Its an optional value and will be same as source - /// disk type if not user provided. - /// The recovery disk - /// encryption set Id. - /// The recovery disk encryption - /// information (for one / single pass flows). + + /// The disk Id. + /// + + /// The primary staging storage account input. + /// + + /// The recovery resource group input. + /// + + /// The replica disk type. Its an optional value and will be same as source + /// disk type if not user provided. + /// + + /// The target disk type after failover. Its an optional value and will be same + /// as source disk type if not user provided. + /// + + /// The recovery disk encryption set Id. + /// + + /// The recovery disk encryption information (for one / single pass flows). + /// public A2AProtectionIntentManagedDiskInputDetails(string diskId, StorageAccountCustomDetails primaryStagingStorageAccountCustomInput = default(StorageAccountCustomDetails), RecoveryResourceGroupCustomDetails recoveryResourceGroupCustomInput = default(RecoveryResourceGroupCustomDetails), string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), string recoveryDiskEncryptionSetId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo)) + { - DiskId = diskId; - PrimaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput; - RecoveryResourceGroupCustomInput = recoveryResourceGroupCustomInput; - RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; - RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType; - RecoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId; - DiskEncryptionInfo = diskEncryptionInfo; + this.DiskId = diskId; + this.PrimaryStagingStorageAccountCustomInput = primaryStagingStorageAccountCustomInput; + this.RecoveryResourceGroupCustomInput = recoveryResourceGroupCustomInput; + this.RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; + this.RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType; + this.RecoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId; + this.DiskEncryptionInfo = diskEncryptionInfo; CustomInit(); } @@ -64,63 +64,70 @@ public A2AProtectionIntentManagedDiskInputDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the primary staging storage account input. /// - [JsonProperty(PropertyName = "primaryStagingStorageAccountCustomInput")] - public StorageAccountCustomDetails PrimaryStagingStorageAccountCustomInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryStagingStorageAccountCustomInput")] + public StorageAccountCustomDetails PrimaryStagingStorageAccountCustomInput {get; set; } /// /// Gets or sets the recovery resource group input. /// - [JsonProperty(PropertyName = "recoveryResourceGroupCustomInput")] - public RecoveryResourceGroupCustomDetails RecoveryResourceGroupCustomInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupCustomInput")] + public RecoveryResourceGroupCustomDetails RecoveryResourceGroupCustomInput {get; set; } /// - /// Gets or sets the replica disk type. Its an optional value and will - /// be same as source disk type if not user provided. + /// Gets or sets the replica disk type. Its an optional value and will be same + /// as source disk type if not user provided. /// - [JsonProperty(PropertyName = "recoveryReplicaDiskAccountType")] - public string RecoveryReplicaDiskAccountType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryReplicaDiskAccountType")] + public string RecoveryReplicaDiskAccountType {get; set; } /// - /// Gets or sets the target disk type after failover. Its an optional - /// value and will be same as source disk type if not user provided. + /// Gets or sets the target disk type after failover. Its an optional value and + /// will be same as source disk type if not user provided. /// - [JsonProperty(PropertyName = "recoveryTargetDiskAccountType")] - public string RecoveryTargetDiskAccountType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryTargetDiskAccountType")] + public string RecoveryTargetDiskAccountType {get; set; } /// /// Gets or sets the recovery disk encryption set Id. /// - [JsonProperty(PropertyName = "recoveryDiskEncryptionSetId")] - public string RecoveryDiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryDiskEncryptionSetId")] + public string RecoveryDiskEncryptionSetId {get; set; } /// - /// Gets or sets the recovery disk encryption information (for one / - /// single pass flows). + /// Gets or sets the recovery disk encryption information (for one / single + /// pass flows). /// - [JsonProperty(PropertyName = "diskEncryptionInfo")] - public DiskEncryptionInfo DiskEncryptionInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (DiskId == null) + if (this.DiskId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskId"); } + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARecoveryAvailabilityType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARecoveryAvailabilityType.cs index 56e7dcf84c88..3eef5b531364 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARecoveryAvailabilityType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARecoveryAvailabilityType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for A2ARecoveryAvailabilityType. /// + + public static class A2ARecoveryAvailabilityType { public const string Single = "Single"; public const string AvailabilitySet = "AvailabilitySet"; public const string AvailabilityZone = "AvailabilityZone"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARecoveryPointDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARecoveryPointDetails.cs index b214b5dc21c6..cdc22bca4c74 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARecoveryPointDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARecoveryPointDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,15 +24,17 @@ public A2ARecoveryPointDetails() /// /// Initializes a new instance of the A2ARecoveryPointDetails class. /// - /// A value indicating whether the - /// recovery point is multi VM consistent. Possible values include: - /// 'MultiVmSyncRecoveryPoint', 'PerVmRecoveryPoint' - /// List of disk ids representing a recovery - /// point. - public A2ARecoveryPointDetails(string recoveryPointSyncType = default(string), IList disks = default(IList)) + + /// A value indicating whether the recovery point is multi VM consistent. + /// Possible values include: 'MultiVmSyncRecoveryPoint', 'PerVmRecoveryPoint' + + /// List of disk ids representing a recovery point. + /// + public A2ARecoveryPointDetails(string recoveryPointSyncType = default(string), System.Collections.Generic.IList disks = default(System.Collections.Generic.IList)) + { - RecoveryPointSyncType = recoveryPointSyncType; - Disks = disks; + this.RecoveryPointSyncType = recoveryPointSyncType; + this.Disks = disks; CustomInit(); } @@ -49,19 +43,18 @@ public A2ARecoveryPointDetails() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether the recovery point is multi - /// VM consistent. Possible values include: 'MultiVmSyncRecoveryPoint', - /// 'PerVmRecoveryPoint' + /// Gets or sets a value indicating whether the recovery point is multi VM + /// consistent. Possible values include: 'MultiVmSyncRecoveryPoint', 'PerVmRecoveryPoint' /// - [JsonProperty(PropertyName = "recoveryPointSyncType")] - public string RecoveryPointSyncType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointSyncType")] + public string RecoveryPointSyncType {get; set; } /// /// Gets or sets list of disk ids representing a recovery point. /// - [JsonProperty(PropertyName = "disks")] - public IList Disks { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "disks")] + public System.Collections.Generic.IList Disks {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARemoveDisksInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARemoveDisksInput.cs index a47003ab1da9..f9c17a5f13a9 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARemoveDisksInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARemoveDisksInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,13 +24,17 @@ public A2ARemoveDisksInput() /// /// Initializes a new instance of the A2ARemoveDisksInput class. /// - /// The list of vm disk vhd URIs. - /// The list of vm managed disk - /// Ids. - public A2ARemoveDisksInput(IList vmDisksUris = default(IList), IList vmManagedDisksIds = default(IList)) + + /// The list of vm disk vhd URIs. + /// + + /// The list of vm managed disk Ids. + /// + public A2ARemoveDisksInput(System.Collections.Generic.IList vmDisksUris = default(System.Collections.Generic.IList), System.Collections.Generic.IList vmManagedDisksIds = default(System.Collections.Generic.IList)) + { - VmDisksUris = vmDisksUris; - VmManagedDisksIds = vmManagedDisksIds; + this.VMDisksUris = vmDisksUris; + this.VMManagedDisksIds = vmManagedDisksIds; CustomInit(); } @@ -47,17 +43,17 @@ public A2ARemoveDisksInput() /// partial void CustomInit(); + /// /// Gets or sets the list of vm disk vhd URIs. /// - [JsonProperty(PropertyName = "vmDisksUris")] - public IList VmDisksUris { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisksUris")] + public System.Collections.Generic.IList VMDisksUris {get; set; } /// /// Gets or sets the list of vm managed disk Ids. /// - [JsonProperty(PropertyName = "vmManagedDisksIds")] - public IList VmManagedDisksIds { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vmManagedDisksIds")] + public System.Collections.Generic.IList VMManagedDisksIds {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReplicationDetails.cs index 411caaf92d44..80a78265ab08 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReplicationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,166 +24,229 @@ public A2AReplicationDetails() /// /// Initializes a new instance of the A2AReplicationDetails class. /// - /// The fabric specific object Id of the - /// virtual machine. - /// The initial primary availability - /// zone. - /// The initial primary - /// fabric location. - /// The initial recovery availability - /// zone. - /// The initial primary - /// extended location. - /// The initial recovery - /// extended location. - /// The initial recovery - /// fabric location. - /// The multi vm group Id. - /// The multi vm group name. - /// Whether Multi VM group is - /// auto created or specified by user. Possible values include: - /// 'AutoCreated', 'UserSpecified' - /// The management Id. - /// The list of protected disks. - /// The list of unprotected - /// disks. - /// The list of protected managed - /// disks. - /// The recovery boot - /// diagnostic storage account Arm Id. - /// Primary fabric - /// location. - /// The recovery fabric - /// location. - /// The type of operating system. - /// The size of recovery virtual - /// machine. - /// The name of recovery virtual - /// machine. - /// The recovery resource - /// group. - /// The recovery cloud - /// service. - /// The recovery availability - /// set. - /// The recovery virtual - /// network. - /// The test failover virtual - /// network. - /// The virtual machine nic details. - /// The synced configuration - /// details. - /// The percentage of the - /// monitoring job. The type of the monitoring job is defined by - /// MonitoringJobType property. - /// The type of the monitoring job. The - /// progress is contained in MonitoringPercentageCompletion - /// property. - /// The last heartbeat received from the - /// source server. - /// The agent version. - /// Agent expiry date. - /// A value indicating - /// whether replication agent update is required. - /// Agent certificate expiry - /// date. - /// A value - /// indicating whether agent certificate update is required. - /// The recovery fabric object - /// Id. - /// The protection state for the - /// vm. - /// The protection state - /// description for the vm. - /// An id associated with the PE that - /// survives actions like switch protection which change the backing - /// PE/CPE objects internally.The lifecycle id gets carried forward to - /// have a link/continuity in being able to have an Id that denotes the - /// "same" protected item even though other internal Ids/ARM Id might - /// be changing. - /// The test failover - /// fabric object Id. - /// The last RPO value in seconds. - /// The time (in UTC) when the last - /// RPO value was calculated by Protection Service. - /// The primary availability - /// zone. - /// The recovery availability - /// zone. - /// The primary Extended - /// Location. - /// The recovery Extended - /// Location. + + /// The fabric specific object Id of the virtual machine. + /// + + /// The initial primary availability zone. + /// + + /// The initial primary fabric location. + /// + + /// The initial recovery availability zone. + /// + + /// The initial primary extended location. + /// + + /// The initial recovery extended location. + /// + + /// The initial recovery fabric location. + /// + + /// The multi vm group Id. + /// + + /// The multi vm group name. + /// + + /// Whether Multi VM group is auto created or specified by user. + /// Possible values include: 'AutoCreated', 'UserSpecified' + + /// The management Id. + /// + + /// The list of protected disks. + /// + + /// The list of unprotected disks. + /// + + /// The list of protected managed disks. + /// + + /// The recovery boot diagnostic storage account Arm Id. + /// + + /// Primary fabric location. + /// + + /// The recovery fabric location. + /// + + /// The type of operating system. + /// + + /// The size of recovery virtual machine. + /// + + /// The name of recovery virtual machine. + /// + + /// The recovery resource group. + /// + + /// The recovery cloud service. + /// + + /// The recovery availability set. + /// + + /// The recovery virtual network. + /// + + /// The test failover virtual network. + /// + + /// The virtual machine nic details. + /// + + /// The synced configuration details. + /// + + /// The percentage of the monitoring job. The type of the monitoring job is + /// defined by MonitoringJobType property. + /// + + /// The type of the monitoring job. The progress is contained in + /// MonitoringPercentageCompletion property. + /// + + /// The last heartbeat received from the source server. + /// + + /// The agent version. + /// + + /// Agent expiry date. + /// + + /// A value indicating whether replication agent update is required. + /// + + /// Agent certificate expiry date. + /// + + /// A value indicating whether agent certificate update is required. + /// + + /// The recovery fabric object Id. + /// + + /// The protection state for the vm. + /// + + /// The protection state description for the vm. + /// + + /// An id associated with the PE that survives actions like switch protection + /// which change the backing PE/CPE objects internally.The lifecycle id gets + /// carried forward to have a link/continuity in being able to have an Id that + /// denotes the "same" protected item even though other internal Ids/ARM Id + /// might be changing. + /// + + /// The test failover fabric object Id. + /// + + /// The last RPO value in seconds. + /// + + /// The time (in UTC) when the last RPO value was calculated by Protection + /// Service. + /// + + /// The primary availability zone. + /// + + /// The recovery availability zone. + /// + + /// The primary Extended Location. + /// + + /// The recovery Extended Location. + /// + /// The encryption type of the VM. /// Possible values include: 'NotEncrypted', 'OnePassEncrypted', /// 'TwoPassEncrypted' - /// The test failover vm name. - /// The recovery azure - /// generation. - /// The recovery - /// proximity placement group Id. - /// A value indicating whether - /// the auto protection is enabled. Possible values include: - /// 'Disabled', 'Enabled' - /// The recovery virtual - /// machine scale set id. - /// The recovery - /// capacity reservation group Id. - public A2AReplicationDetails(string fabricObjectId = default(string), string initialPrimaryZone = default(string), string initialPrimaryFabricLocation = default(string), string initialRecoveryZone = default(string), ExtendedLocation initialPrimaryExtendedLocation = default(ExtendedLocation), ExtendedLocation initialRecoveryExtendedLocation = default(ExtendedLocation), string initialRecoveryFabricLocation = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), string multiVmGroupCreateOption = default(string), string managementId = default(string), IList protectedDisks = default(IList), IList unprotectedDisks = default(IList), IList protectedManagedDisks = default(IList), string recoveryBootDiagStorageAccountId = default(string), string primaryFabricLocation = default(string), string recoveryFabricLocation = default(string), string osType = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureVMName = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryCloudService = default(string), string recoveryAvailabilitySet = default(string), string selectedRecoveryAzureNetworkId = default(string), string selectedTfoAzureNetworkId = default(string), IList vmNics = default(IList), AzureToAzureVmSyncedConfigDetails vmSyncedConfigDetails = default(AzureToAzureVmSyncedConfigDetails), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string agentVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), bool? isReplicationAgentUpdateRequired = default(bool?), System.DateTime? agentCertificateExpiryDate = default(System.DateTime?), bool? isReplicationAgentCertificateUpdateRequired = default(bool?), string recoveryFabricObjectId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), string lifecycleId = default(string), string testFailoverRecoveryFabricObjectId = default(string), long? rpoInSeconds = default(long?), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), string primaryAvailabilityZone = default(string), string recoveryAvailabilityZone = default(string), ExtendedLocation primaryExtendedLocation = default(ExtendedLocation), ExtendedLocation recoveryExtendedLocation = default(ExtendedLocation), string vmEncryptionType = default(string), string tfoAzureVMName = default(string), string recoveryAzureGeneration = default(string), string recoveryProximityPlacementGroupId = default(string), string autoProtectionOfDataDisk = default(string), string recoveryVirtualMachineScaleSetId = default(string), string recoveryCapacityReservationGroupId = default(string)) + + /// The test failover vm name. + /// + + /// The recovery azure generation. + /// + + /// The recovery proximity placement group Id. + /// + + /// A value indicating whether the auto protection is enabled. + /// Possible values include: 'Disabled', 'Enabled' + + /// The recovery virtual machine scale set id. + /// + + /// The recovery capacity reservation group Id. + /// + public A2AReplicationDetails(string fabricObjectId = default(string), string initialPrimaryZone = default(string), string initialPrimaryFabricLocation = default(string), string initialRecoveryZone = default(string), ExtendedLocation initialPrimaryExtendedLocation = default(ExtendedLocation), ExtendedLocation initialRecoveryExtendedLocation = default(ExtendedLocation), string initialRecoveryFabricLocation = default(string), string multiVMGroupId = default(string), string multiVMGroupName = default(string), string multiVMGroupCreateOption = default(string), string managementId = default(string), System.Collections.Generic.IList protectedDisks = default(System.Collections.Generic.IList), System.Collections.Generic.IList unprotectedDisks = default(System.Collections.Generic.IList), System.Collections.Generic.IList protectedManagedDisks = default(System.Collections.Generic.IList), string recoveryBootDiagStorageAccountId = default(string), string primaryFabricLocation = default(string), string recoveryFabricLocation = default(string), string osType = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureVMName = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryCloudService = default(string), string recoveryAvailabilitySet = default(string), string selectedRecoveryAzureNetworkId = default(string), string selectedTfoAzureNetworkId = default(string), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), AzureToAzureVmSyncedConfigDetails vmSyncedConfigDetails = default(AzureToAzureVmSyncedConfigDetails), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string agentVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), bool? isReplicationAgentUpdateRequired = default(bool?), System.DateTime? agentCertificateExpiryDate = default(System.DateTime?), bool? isReplicationAgentCertificateUpdateRequired = default(bool?), string recoveryFabricObjectId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), string lifecycleId = default(string), string testFailoverRecoveryFabricObjectId = default(string), long? rpoInSeconds = default(long?), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), string primaryAvailabilityZone = default(string), string recoveryAvailabilityZone = default(string), ExtendedLocation primaryExtendedLocation = default(ExtendedLocation), ExtendedLocation recoveryExtendedLocation = default(ExtendedLocation), string vmEncryptionType = default(string), string tfoAzureVMName = default(string), string recoveryAzureGeneration = default(string), string recoveryProximityPlacementGroupId = default(string), string autoProtectionOfDataDisk = default(string), string recoveryVirtualMachineScaleSetId = default(string), string recoveryCapacityReservationGroupId = default(string)) + { - FabricObjectId = fabricObjectId; - InitialPrimaryZone = initialPrimaryZone; - InitialPrimaryFabricLocation = initialPrimaryFabricLocation; - InitialRecoveryZone = initialRecoveryZone; - InitialPrimaryExtendedLocation = initialPrimaryExtendedLocation; - InitialRecoveryExtendedLocation = initialRecoveryExtendedLocation; - InitialRecoveryFabricLocation = initialRecoveryFabricLocation; - MultiVmGroupId = multiVmGroupId; - MultiVmGroupName = multiVmGroupName; - MultiVmGroupCreateOption = multiVmGroupCreateOption; - ManagementId = managementId; - ProtectedDisks = protectedDisks; - UnprotectedDisks = unprotectedDisks; - ProtectedManagedDisks = protectedManagedDisks; - RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; - PrimaryFabricLocation = primaryFabricLocation; - RecoveryFabricLocation = recoveryFabricLocation; - OsType = osType; - RecoveryAzureVMSize = recoveryAzureVMSize; - RecoveryAzureVMName = recoveryAzureVMName; - RecoveryAzureResourceGroupId = recoveryAzureResourceGroupId; - RecoveryCloudService = recoveryCloudService; - RecoveryAvailabilitySet = recoveryAvailabilitySet; - SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; - SelectedTfoAzureNetworkId = selectedTfoAzureNetworkId; - VmNics = vmNics; - VmSyncedConfigDetails = vmSyncedConfigDetails; - MonitoringPercentageCompletion = monitoringPercentageCompletion; - MonitoringJobType = monitoringJobType; - LastHeartbeat = lastHeartbeat; - AgentVersion = agentVersion; - AgentExpiryDate = agentExpiryDate; - IsReplicationAgentUpdateRequired = isReplicationAgentUpdateRequired; - AgentCertificateExpiryDate = agentCertificateExpiryDate; - IsReplicationAgentCertificateUpdateRequired = isReplicationAgentCertificateUpdateRequired; - RecoveryFabricObjectId = recoveryFabricObjectId; - VmProtectionState = vmProtectionState; - VmProtectionStateDescription = vmProtectionStateDescription; - LifecycleId = lifecycleId; - TestFailoverRecoveryFabricObjectId = testFailoverRecoveryFabricObjectId; - RpoInSeconds = rpoInSeconds; - LastRpoCalculatedTime = lastRpoCalculatedTime; - PrimaryAvailabilityZone = primaryAvailabilityZone; - RecoveryAvailabilityZone = recoveryAvailabilityZone; - PrimaryExtendedLocation = primaryExtendedLocation; - RecoveryExtendedLocation = recoveryExtendedLocation; - VmEncryptionType = vmEncryptionType; - TfoAzureVMName = tfoAzureVMName; - RecoveryAzureGeneration = recoveryAzureGeneration; - RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; - AutoProtectionOfDataDisk = autoProtectionOfDataDisk; - RecoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; - RecoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; + this.FabricObjectId = fabricObjectId; + this.InitialPrimaryZone = initialPrimaryZone; + this.InitialPrimaryFabricLocation = initialPrimaryFabricLocation; + this.InitialRecoveryZone = initialRecoveryZone; + this.InitialPrimaryExtendedLocation = initialPrimaryExtendedLocation; + this.InitialRecoveryExtendedLocation = initialRecoveryExtendedLocation; + this.InitialRecoveryFabricLocation = initialRecoveryFabricLocation; + this.MultiVMGroupId = multiVMGroupId; + this.MultiVMGroupName = multiVMGroupName; + this.MultiVMGroupCreateOption = multiVMGroupCreateOption; + this.ManagementId = managementId; + this.ProtectedDisks = protectedDisks; + this.UnprotectedDisks = unprotectedDisks; + this.ProtectedManagedDisks = protectedManagedDisks; + this.RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; + this.PrimaryFabricLocation = primaryFabricLocation; + this.RecoveryFabricLocation = recoveryFabricLocation; + this.OSType = osType; + this.RecoveryAzureVMSize = recoveryAzureVMSize; + this.RecoveryAzureVMName = recoveryAzureVMName; + this.RecoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + this.RecoveryCloudService = recoveryCloudService; + this.RecoveryAvailabilitySet = recoveryAvailabilitySet; + this.SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + this.SelectedTfoAzureNetworkId = selectedTfoAzureNetworkId; + this.VMNics = vmNics; + this.VMSyncedConfigDetails = vmSyncedConfigDetails; + this.MonitoringPercentageCompletion = monitoringPercentageCompletion; + this.MonitoringJobType = monitoringJobType; + this.LastHeartbeat = lastHeartbeat; + this.AgentVersion = agentVersion; + this.AgentExpiryDate = agentExpiryDate; + this.IsReplicationAgentUpdateRequired = isReplicationAgentUpdateRequired; + this.AgentCertificateExpiryDate = agentCertificateExpiryDate; + this.IsReplicationAgentCertificateUpdateRequired = isReplicationAgentCertificateUpdateRequired; + this.RecoveryFabricObjectId = recoveryFabricObjectId; + this.VMProtectionState = vmProtectionState; + this.VMProtectionStateDescription = vmProtectionStateDescription; + this.LifecycleId = lifecycleId; + this.TestFailoverRecoveryFabricObjectId = testFailoverRecoveryFabricObjectId; + this.RpoInSeconds = rpoInSeconds; + this.LastRpoCalculatedTime = lastRpoCalculatedTime; + this.PrimaryAvailabilityZone = primaryAvailabilityZone; + this.RecoveryAvailabilityZone = recoveryAvailabilityZone; + this.PrimaryExtendedLocation = primaryExtendedLocation; + this.RecoveryExtendedLocation = recoveryExtendedLocation; + this.VMEncryptionType = vmEncryptionType; + this.TfoAzureVMName = tfoAzureVMName; + this.RecoveryAzureGeneration = recoveryAzureGeneration; + this.RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; + this.AutoProtectionOfDataDisk = autoProtectionOfDataDisk; + this.RecoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; + this.RecoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; CustomInit(); } @@ -200,361 +255,398 @@ public A2AReplicationDetails() /// partial void CustomInit(); + /// /// Gets or sets the fabric specific object Id of the virtual machine. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; set; } /// /// Gets the initial primary availability zone. /// - [JsonProperty(PropertyName = "initialPrimaryZone")] - public string InitialPrimaryZone { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialPrimaryZone")] + public string InitialPrimaryZone {get; private set; } /// /// Gets the initial primary fabric location. /// - [JsonProperty(PropertyName = "initialPrimaryFabricLocation")] - public string InitialPrimaryFabricLocation { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialPrimaryFabricLocation")] + public string InitialPrimaryFabricLocation {get; private set; } /// /// Gets the initial recovery availability zone. /// - [JsonProperty(PropertyName = "initialRecoveryZone")] - public string InitialRecoveryZone { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialRecoveryZone")] + public string InitialRecoveryZone {get; private set; } /// /// Gets or sets the initial primary extended location. /// - [JsonProperty(PropertyName = "initialPrimaryExtendedLocation")] - public ExtendedLocation InitialPrimaryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialPrimaryExtendedLocation")] + public ExtendedLocation InitialPrimaryExtendedLocation {get; set; } /// /// Gets or sets the initial recovery extended location. /// - [JsonProperty(PropertyName = "initialRecoveryExtendedLocation")] - public ExtendedLocation InitialRecoveryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialRecoveryExtendedLocation")] + public ExtendedLocation InitialRecoveryExtendedLocation {get; set; } /// /// Gets the initial recovery fabric location. /// - [JsonProperty(PropertyName = "initialRecoveryFabricLocation")] - public string InitialRecoveryFabricLocation { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialRecoveryFabricLocation")] + public string InitialRecoveryFabricLocation {get; private set; } /// /// Gets or sets the multi vm group Id. /// - [JsonProperty(PropertyName = "multiVmGroupId")] - public string MultiVmGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVMGroupId {get; set; } /// /// Gets or sets the multi vm group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; set; } /// - /// Gets or sets whether Multi VM group is auto created or specified by - /// user. Possible values include: 'AutoCreated', 'UserSpecified' + /// Gets or sets whether Multi VM group is auto created or specified by user. Possible values include: 'AutoCreated', 'UserSpecified' /// - [JsonProperty(PropertyName = "multiVmGroupCreateOption")] - public string MultiVmGroupCreateOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupCreateOption")] + public string MultiVMGroupCreateOption {get; set; } /// /// Gets or sets the management Id. /// - [JsonProperty(PropertyName = "managementId")] - public string ManagementId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "managementId")] + public string ManagementId {get; set; } /// /// Gets or sets the list of protected disks. /// - [JsonProperty(PropertyName = "protectedDisks")] - public IList ProtectedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedDisks")] + public System.Collections.Generic.IList ProtectedDisks {get; set; } /// /// Gets or sets the list of unprotected disks. /// - [JsonProperty(PropertyName = "unprotectedDisks")] - public IList UnprotectedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "unprotectedDisks")] + public System.Collections.Generic.IList UnprotectedDisks {get; set; } /// /// Gets or sets the list of protected managed disks. /// - [JsonProperty(PropertyName = "protectedManagedDisks")] - public IList ProtectedManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedManagedDisks")] + public System.Collections.Generic.IList ProtectedManagedDisks {get; set; } /// /// Gets or sets the recovery boot diagnostic storage account Arm Id. /// - [JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] - public string RecoveryBootDiagStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] + public string RecoveryBootDiagStorageAccountId {get; set; } /// /// Gets or sets primary fabric location. /// - [JsonProperty(PropertyName = "primaryFabricLocation")] - public string PrimaryFabricLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricLocation")] + public string PrimaryFabricLocation {get; set; } /// /// Gets or sets the recovery fabric location. /// - [JsonProperty(PropertyName = "recoveryFabricLocation")] - public string RecoveryFabricLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricLocation")] + public string RecoveryFabricLocation {get; set; } /// /// Gets or sets the type of operating system. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the size of recovery virtual machine. /// - [JsonProperty(PropertyName = "recoveryAzureVMSize")] - public string RecoveryAzureVMSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureVMSize")] + public string RecoveryAzureVMSize {get; set; } /// /// Gets or sets the name of recovery virtual machine. /// - [JsonProperty(PropertyName = "recoveryAzureVMName")] - public string RecoveryAzureVMName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureVMName")] + public string RecoveryAzureVMName {get; set; } /// /// Gets or sets the recovery resource group. /// - [JsonProperty(PropertyName = "recoveryAzureResourceGroupId")] - public string RecoveryAzureResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureResourceGroupId")] + public string RecoveryAzureResourceGroupId {get; set; } /// /// Gets or sets the recovery cloud service. /// - [JsonProperty(PropertyName = "recoveryCloudService")] - public string RecoveryCloudService { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryCloudService")] + public string RecoveryCloudService {get; set; } /// /// Gets or sets the recovery availability set. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySet")] - public string RecoveryAvailabilitySet { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySet")] + public string RecoveryAvailabilitySet {get; set; } /// /// Gets or sets the recovery virtual network. /// - [JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] - public string SelectedRecoveryAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] + public string SelectedRecoveryAzureNetworkId {get; set; } /// /// Gets or sets the test failover virtual network. /// - [JsonProperty(PropertyName = "selectedTfoAzureNetworkId")] - public string SelectedTfoAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedTfoAzureNetworkId")] + public string SelectedTfoAzureNetworkId {get; set; } /// /// Gets or sets the virtual machine nic details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets the synced configuration details. /// - [JsonProperty(PropertyName = "vmSyncedConfigDetails")] - public AzureToAzureVmSyncedConfigDetails VmSyncedConfigDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmSyncedConfigDetails")] + public AzureToAzureVmSyncedConfigDetails VMSyncedConfigDetails {get; set; } /// /// Gets or sets the percentage of the monitoring job. The type of the /// monitoring job is defined by MonitoringJobType property. /// - [JsonProperty(PropertyName = "monitoringPercentageCompletion")] - public int? MonitoringPercentageCompletion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monitoringPercentageCompletion")] + public int? MonitoringPercentageCompletion {get; set; } /// - /// Gets or sets the type of the monitoring job. The progress is - /// contained in MonitoringPercentageCompletion property. + /// Gets or sets the type of the monitoring job. The progress is contained in + /// MonitoringPercentageCompletion property. /// - [JsonProperty(PropertyName = "monitoringJobType")] - public string MonitoringJobType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "monitoringJobType")] + public string MonitoringJobType {get; set; } /// /// Gets or sets the last heartbeat received from the source server. /// - [JsonProperty(PropertyName = "lastHeartbeat")] - public System.DateTime? LastHeartbeat { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat {get; set; } /// /// Gets or sets the agent version. /// - [JsonProperty(PropertyName = "agentVersion")] - public string AgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion {get; set; } /// /// Gets or sets agent expiry date. /// - [JsonProperty(PropertyName = "agentExpiryDate")] - public System.DateTime? AgentExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentExpiryDate")] + public System.DateTime? AgentExpiryDate {get; set; } /// /// Gets or sets a value indicating whether replication agent update is /// required. /// - [JsonProperty(PropertyName = "isReplicationAgentUpdateRequired")] - public bool? IsReplicationAgentUpdateRequired { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isReplicationAgentUpdateRequired")] + public bool? IsReplicationAgentUpdateRequired {get; set; } /// /// Gets agent certificate expiry date. /// - [JsonProperty(PropertyName = "agentCertificateExpiryDate")] - public System.DateTime? AgentCertificateExpiryDate { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentCertificateExpiryDate")] + public System.DateTime? AgentCertificateExpiryDate {get; private set; } /// /// Gets or sets a value indicating whether agent certificate update is /// required. /// - [JsonProperty(PropertyName = "isReplicationAgentCertificateUpdateRequired")] - public bool? IsReplicationAgentCertificateUpdateRequired { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isReplicationAgentCertificateUpdateRequired")] + public bool? IsReplicationAgentCertificateUpdateRequired {get; set; } /// /// Gets or sets the recovery fabric object Id. /// - [JsonProperty(PropertyName = "recoveryFabricObjectId")] - public string RecoveryFabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricObjectId")] + public string RecoveryFabricObjectId {get; set; } /// /// Gets or sets the protection state for the vm. /// - [JsonProperty(PropertyName = "vmProtectionState")] - public string VmProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionState")] + public string VMProtectionState {get; set; } /// /// Gets or sets the protection state description for the vm. /// - [JsonProperty(PropertyName = "vmProtectionStateDescription")] - public string VmProtectionStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VMProtectionStateDescription {get; set; } /// - /// Gets or sets an id associated with the PE that survives actions - /// like switch protection which change the backing PE/CPE objects - /// internally.The lifecycle id gets carried forward to have a - /// link/continuity in being able to have an Id that denotes the "same" - /// protected item even though other internal Ids/ARM Id might be - /// changing. + /// Gets or sets an id associated with the PE that survives actions like switch + /// protection which change the backing PE/CPE objects internally.The lifecycle + /// id gets carried forward to have a link/continuity in being able to have an + /// Id that denotes the "same" protected item even though other internal + /// Ids/ARM Id might be changing. /// - [JsonProperty(PropertyName = "lifecycleId")] - public string LifecycleId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lifecycleId")] + public string LifecycleId {get; set; } /// /// Gets or sets the test failover fabric object Id. /// - [JsonProperty(PropertyName = "testFailoverRecoveryFabricObjectId")] - public string TestFailoverRecoveryFabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testFailoverRecoveryFabricObjectId")] + public string TestFailoverRecoveryFabricObjectId {get; set; } /// /// Gets or sets the last RPO value in seconds. /// - [JsonProperty(PropertyName = "rpoInSeconds")] - public long? RpoInSeconds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds {get; set; } /// - /// Gets or sets the time (in UTC) when the last RPO value was - /// calculated by Protection Service. + /// Gets or sets the time (in UTC) when the last RPO value was calculated by + /// Protection Service. /// - [JsonProperty(PropertyName = "lastRpoCalculatedTime")] - public System.DateTime? LastRpoCalculatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRpoCalculatedTime")] + public System.DateTime? LastRpoCalculatedTime {get; set; } /// /// Gets or sets the primary availability zone. /// - [JsonProperty(PropertyName = "primaryAvailabilityZone")] - public string PrimaryAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryAvailabilityZone")] + public string PrimaryAvailabilityZone {get; set; } /// /// Gets or sets the recovery availability zone. /// - [JsonProperty(PropertyName = "recoveryAvailabilityZone")] - public string RecoveryAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilityZone")] + public string RecoveryAvailabilityZone {get; set; } /// /// Gets or sets the primary Extended Location. /// - [JsonProperty(PropertyName = "primaryExtendedLocation")] - public ExtendedLocation PrimaryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryExtendedLocation")] + public ExtendedLocation PrimaryExtendedLocation {get; set; } /// /// Gets or sets the recovery Extended Location. /// - [JsonProperty(PropertyName = "recoveryExtendedLocation")] - public ExtendedLocation RecoveryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryExtendedLocation")] + public ExtendedLocation RecoveryExtendedLocation {get; set; } /// - /// Gets the encryption type of the VM. Possible values include: - /// 'NotEncrypted', 'OnePassEncrypted', 'TwoPassEncrypted' + /// Gets the encryption type of the VM. Possible values include: 'NotEncrypted', 'OnePassEncrypted', 'TwoPassEncrypted' /// - [JsonProperty(PropertyName = "vmEncryptionType")] - public string VmEncryptionType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmEncryptionType")] + public string VMEncryptionType {get; private set; } /// /// Gets or sets the test failover vm name. /// - [JsonProperty(PropertyName = "tfoAzureVMName")] - public string TfoAzureVMName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoAzureVMName")] + public string TfoAzureVMName {get; set; } /// /// Gets the recovery azure generation. /// - [JsonProperty(PropertyName = "recoveryAzureGeneration")] - public string RecoveryAzureGeneration { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureGeneration")] + public string RecoveryAzureGeneration {get; private set; } /// /// Gets or sets the recovery proximity placement group Id. /// - [JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] - public string RecoveryProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] + public string RecoveryProximityPlacementGroupId {get; set; } /// - /// Gets or sets a value indicating whether the auto protection is - /// enabled. Possible values include: 'Disabled', 'Enabled' + /// Gets or sets a value indicating whether the auto protection is enabled. Possible values include: 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "autoProtectionOfDataDisk")] - public string AutoProtectionOfDataDisk { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "autoProtectionOfDataDisk")] + public string AutoProtectionOfDataDisk {get; set; } /// /// Gets or sets the recovery virtual machine scale set id. /// - [JsonProperty(PropertyName = "recoveryVirtualMachineScaleSetId")] - public string RecoveryVirtualMachineScaleSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVirtualMachineScaleSetId")] + public string RecoveryVirtualMachineScaleSetId {get; set; } /// /// Gets or sets the recovery capacity reservation group Id. /// - [JsonProperty(PropertyName = "recoveryCapacityReservationGroupId")] - public string RecoveryCapacityReservationGroupId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryCapacityReservationGroupId")] + public string RecoveryCapacityReservationGroupId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (InitialPrimaryExtendedLocation != null) + + + + + if (this.InitialPrimaryExtendedLocation != null) { - InitialPrimaryExtendedLocation.Validate(); + this.InitialPrimaryExtendedLocation.Validate(); } - if (InitialRecoveryExtendedLocation != null) + if (this.InitialRecoveryExtendedLocation != null) { - InitialRecoveryExtendedLocation.Validate(); + this.InitialRecoveryExtendedLocation.Validate(); } - if (PrimaryExtendedLocation != null) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if (this.PrimaryExtendedLocation != null) { - PrimaryExtendedLocation.Validate(); + this.PrimaryExtendedLocation.Validate(); } - if (RecoveryExtendedLocation != null) + if (this.RecoveryExtendedLocation != null) { - RecoveryExtendedLocation.Validate(); + this.RecoveryExtendedLocation.Validate(); } + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReplicationIntentDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReplicationIntentDetails.cs index 2a0f2bbabdd7..19e473b09f8f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReplicationIntentDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReplicationIntentDetails.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AReplicationIntentDetails : ReplicationProtectionIntentProviderSpecificSettings { /// - /// Initializes a new instance of the A2AReplicationIntentDetails - /// class. + /// Initializes a new instance of the A2AReplicationIntentDetails class. /// public A2AReplicationIntentDetails() { @@ -32,78 +22,99 @@ public A2AReplicationIntentDetails() } /// - /// Initializes a new instance of the A2AReplicationIntentDetails - /// class. + /// Initializes a new instance of the A2AReplicationIntentDetails class. /// - /// The recovery availability - /// type of the virtual machine. - /// The fabric specific object Id of the - /// virtual machine. - /// The primary location for the virtual - /// machine. - /// The recovery location for the - /// virtual machine. - /// The recovery subscription Id - /// of the virtual machine. - /// The list of vm disk details. - /// The list of vm managed disk - /// details. - /// The recovery resource group - /// id. - /// The protection profile custom - /// details. - /// The primary staging - /// storage account details. - /// The recovery availability set - /// details. - /// The recovery virtual network - /// details. - /// The recovery - /// proximity placement group custom details. - /// A value indicating whether - /// the auto protection is enabled. Possible values include: - /// 'Disabled', 'Enabled' - /// The multi vm group name. - /// The multi vm group id. - /// The boot diagnostic - /// storage account. - /// The recovery disk encryption - /// information (for two pass flows). - /// The recovery availability - /// zone. - /// A value indicating whether the - /// auto update is enabled. Possible values include: 'Disabled', - /// 'Enabled' - /// The automation account arm - /// id. - /// A value - /// indicating the type authentication to use for automation Account. - /// Possible values include: 'RunAsAccount', - /// 'SystemAssignedIdentity' - public A2AReplicationIntentDetails(string recoveryAvailabilityType, string fabricObjectId = default(string), string primaryLocation = default(string), string recoveryLocation = default(string), string recoverySubscriptionId = default(string), IList vmDisks = default(IList), IList vmManagedDisks = default(IList), string recoveryResourceGroupId = default(string), ProtectionProfileCustomDetails protectionProfile = default(ProtectionProfileCustomDetails), StorageAccountCustomDetails primaryStagingStorageAccount = default(StorageAccountCustomDetails), RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySet = default(RecoveryAvailabilitySetCustomDetails), RecoveryVirtualNetworkCustomDetails recoveryVirtualNetwork = default(RecoveryVirtualNetworkCustomDetails), RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroup = default(RecoveryProximityPlacementGroupCustomDetails), string autoProtectionOfDataDisk = default(string), string multiVmGroupName = default(string), string multiVmGroupId = default(string), StorageAccountCustomDetails recoveryBootDiagStorageAccount = default(StorageAccountCustomDetails), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo), string recoveryAvailabilityZone = default(string), string agentAutoUpdateStatus = default(string), string automationAccountArmId = default(string), string automationAccountAuthenticationType = default(string)) + + /// The fabric specific object Id of the virtual machine. + /// + + /// The primary location for the virtual machine. + /// + + /// The recovery location for the virtual machine. + /// + + /// The recovery subscription Id of the virtual machine. + /// + + /// The list of vm disk details. + /// + + /// The list of vm managed disk details. + /// + + /// The recovery resource group id. + /// + + /// The protection profile custom details. + /// + + /// The primary staging storage account details. + /// + + /// The recovery availability set details. + /// + + /// The recovery virtual network details. + /// + + /// The recovery proximity placement group custom details. + /// + + /// A value indicating whether the auto protection is enabled. + /// Possible values include: 'Disabled', 'Enabled' + + /// The multi vm group name. + /// + + /// The multi vm group id. + /// + + /// The boot diagnostic storage account. + /// + + /// The recovery disk encryption information (for two pass flows). + /// + + /// The recovery availability zone. + /// + + /// The recovery availability type of the virtual machine. + /// + + /// A value indicating whether the auto update is enabled. + /// Possible values include: 'Disabled', 'Enabled' + + /// The automation account arm id. + /// + + /// A value indicating the type authentication to use for automation Account. + /// Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' + public A2AReplicationIntentDetails(string recoveryAvailabilityType, string fabricObjectId = default(string), string primaryLocation = default(string), string recoveryLocation = default(string), string recoverySubscriptionId = default(string), System.Collections.Generic.IList vmDisks = default(System.Collections.Generic.IList), System.Collections.Generic.IList vmManagedDisks = default(System.Collections.Generic.IList), string recoveryResourceGroupId = default(string), ProtectionProfileCustomDetails protectionProfile = default(ProtectionProfileCustomDetails), StorageAccountCustomDetails primaryStagingStorageAccount = default(StorageAccountCustomDetails), RecoveryAvailabilitySetCustomDetails recoveryAvailabilitySet = default(RecoveryAvailabilitySetCustomDetails), RecoveryVirtualNetworkCustomDetails recoveryVirtualNetwork = default(RecoveryVirtualNetworkCustomDetails), RecoveryProximityPlacementGroupCustomDetails recoveryProximityPlacementGroup = default(RecoveryProximityPlacementGroupCustomDetails), string autoProtectionOfDataDisk = default(string), string multiVMGroupName = default(string), string multiVMGroupId = default(string), StorageAccountCustomDetails recoveryBootDiagStorageAccount = default(StorageAccountCustomDetails), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo), string recoveryAvailabilityZone = default(string), string agentAutoUpdateStatus = default(string), string automationAccountArmId = default(string), string automationAccountAuthenticationType = default(string)) + { - FabricObjectId = fabricObjectId; - PrimaryLocation = primaryLocation; - RecoveryLocation = recoveryLocation; - RecoverySubscriptionId = recoverySubscriptionId; - VmDisks = vmDisks; - VmManagedDisks = vmManagedDisks; - RecoveryResourceGroupId = recoveryResourceGroupId; - ProtectionProfile = protectionProfile; - PrimaryStagingStorageAccount = primaryStagingStorageAccount; - RecoveryAvailabilitySet = recoveryAvailabilitySet; - RecoveryVirtualNetwork = recoveryVirtualNetwork; - RecoveryProximityPlacementGroup = recoveryProximityPlacementGroup; - AutoProtectionOfDataDisk = autoProtectionOfDataDisk; - MultiVmGroupName = multiVmGroupName; - MultiVmGroupId = multiVmGroupId; - RecoveryBootDiagStorageAccount = recoveryBootDiagStorageAccount; - DiskEncryptionInfo = diskEncryptionInfo; - RecoveryAvailabilityZone = recoveryAvailabilityZone; - RecoveryAvailabilityType = recoveryAvailabilityType; - AgentAutoUpdateStatus = agentAutoUpdateStatus; - AutomationAccountArmId = automationAccountArmId; - AutomationAccountAuthenticationType = automationAccountAuthenticationType; + this.FabricObjectId = fabricObjectId; + this.PrimaryLocation = primaryLocation; + this.RecoveryLocation = recoveryLocation; + this.RecoverySubscriptionId = recoverySubscriptionId; + this.VMDisks = vmDisks; + this.VMManagedDisks = vmManagedDisks; + this.RecoveryResourceGroupId = recoveryResourceGroupId; + this.ProtectionProfile = protectionProfile; + this.PrimaryStagingStorageAccount = primaryStagingStorageAccount; + this.RecoveryAvailabilitySet = recoveryAvailabilitySet; + this.RecoveryVirtualNetwork = recoveryVirtualNetwork; + this.RecoveryProximityPlacementGroup = recoveryProximityPlacementGroup; + this.AutoProtectionOfDataDisk = autoProtectionOfDataDisk; + this.MultiVMGroupName = multiVMGroupName; + this.MultiVMGroupId = multiVMGroupId; + this.RecoveryBootDiagStorageAccount = recoveryBootDiagStorageAccount; + this.DiskEncryptionInfo = diskEncryptionInfo; + this.RecoveryAvailabilityZone = recoveryAvailabilityZone; + this.RecoveryAvailabilityType = recoveryAvailabilityType; + this.AgentAutoUpdateStatus = agentAutoUpdateStatus; + this.AutomationAccountArmId = automationAccountArmId; + this.AutomationAccountAuthenticationType = automationAccountAuthenticationType; CustomInit(); } @@ -112,158 +123,158 @@ public A2AReplicationIntentDetails() /// partial void CustomInit(); + /// /// Gets or sets the fabric specific object Id of the virtual machine. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; set; } /// /// Gets or sets the primary location for the virtual machine. /// - [JsonProperty(PropertyName = "primaryLocation")] - public string PrimaryLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryLocation")] + public string PrimaryLocation {get; set; } /// /// Gets or sets the recovery location for the virtual machine. /// - [JsonProperty(PropertyName = "recoveryLocation")] - public string RecoveryLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryLocation")] + public string RecoveryLocation {get; set; } /// /// Gets or sets the recovery subscription Id of the virtual machine. /// - [JsonProperty(PropertyName = "recoverySubscriptionId")] - public string RecoverySubscriptionId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoverySubscriptionId")] + public string RecoverySubscriptionId {get; set; } /// /// Gets or sets the list of vm disk details. /// - [JsonProperty(PropertyName = "vmDisks")] - public IList VmDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisks")] + public System.Collections.Generic.IList VMDisks {get; set; } /// /// Gets or sets the list of vm managed disk details. /// - [JsonProperty(PropertyName = "vmManagedDisks")] - public IList VmManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmManagedDisks")] + public System.Collections.Generic.IList VMManagedDisks {get; set; } /// /// Gets or sets the recovery resource group id. /// - [JsonProperty(PropertyName = "recoveryResourceGroupId")] - public string RecoveryResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId {get; set; } /// /// Gets or sets the protection profile custom details. /// - [JsonProperty(PropertyName = "protectionProfile")] - public ProtectionProfileCustomDetails ProtectionProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionProfile")] + public ProtectionProfileCustomDetails ProtectionProfile {get; set; } /// /// Gets or sets the primary staging storage account details. /// - [JsonProperty(PropertyName = "primaryStagingStorageAccount")] - public StorageAccountCustomDetails PrimaryStagingStorageAccount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryStagingStorageAccount")] + public StorageAccountCustomDetails PrimaryStagingStorageAccount {get; set; } /// /// Gets or sets the recovery availability set details. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySet")] - public RecoveryAvailabilitySetCustomDetails RecoveryAvailabilitySet { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySet")] + public RecoveryAvailabilitySetCustomDetails RecoveryAvailabilitySet {get; set; } /// /// Gets or sets the recovery virtual network details. /// - [JsonProperty(PropertyName = "recoveryVirtualNetwork")] - public RecoveryVirtualNetworkCustomDetails RecoveryVirtualNetwork { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVirtualNetwork")] + public RecoveryVirtualNetworkCustomDetails RecoveryVirtualNetwork {get; set; } /// /// Gets or sets the recovery proximity placement group custom details. /// - [JsonProperty(PropertyName = "recoveryProximityPlacementGroup")] - public RecoveryProximityPlacementGroupCustomDetails RecoveryProximityPlacementGroup { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProximityPlacementGroup")] + public RecoveryProximityPlacementGroupCustomDetails RecoveryProximityPlacementGroup {get; set; } /// - /// Gets or sets a value indicating whether the auto protection is - /// enabled. Possible values include: 'Disabled', 'Enabled' + /// Gets or sets a value indicating whether the auto protection is enabled. Possible values include: 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "autoProtectionOfDataDisk")] - public string AutoProtectionOfDataDisk { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "autoProtectionOfDataDisk")] + public string AutoProtectionOfDataDisk {get; set; } /// /// Gets or sets the multi vm group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; set; } /// /// Gets or sets the multi vm group id. /// - [JsonProperty(PropertyName = "multiVmGroupId")] - public string MultiVmGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVMGroupId {get; set; } /// /// Gets or sets the boot diagnostic storage account. /// - [JsonProperty(PropertyName = "recoveryBootDiagStorageAccount")] - public StorageAccountCustomDetails RecoveryBootDiagStorageAccount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryBootDiagStorageAccount")] + public StorageAccountCustomDetails RecoveryBootDiagStorageAccount {get; set; } /// - /// Gets or sets the recovery disk encryption information (for two pass - /// flows). + /// Gets or sets the recovery disk encryption information (for two pass flows). /// - [JsonProperty(PropertyName = "diskEncryptionInfo")] - public DiskEncryptionInfo DiskEncryptionInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo {get; set; } /// /// Gets or sets the recovery availability zone. /// - [JsonProperty(PropertyName = "recoveryAvailabilityZone")] - public string RecoveryAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilityZone")] + public string RecoveryAvailabilityZone {get; set; } /// /// Gets or sets the recovery availability type of the virtual machine. /// - [JsonProperty(PropertyName = "recoveryAvailabilityType")] - public string RecoveryAvailabilityType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilityType")] + public string RecoveryAvailabilityType {get; set; } /// - /// Gets or sets a value indicating whether the auto update is enabled. - /// Possible values include: 'Disabled', 'Enabled' + /// Gets or sets a value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "agentAutoUpdateStatus")] - public string AgentAutoUpdateStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentAutoUpdateStatus")] + public string AgentAutoUpdateStatus {get; set; } /// /// Gets or sets the automation account arm id. /// - [JsonProperty(PropertyName = "automationAccountArmId")] - public string AutomationAccountArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountArmId")] + public string AutomationAccountArmId {get; set; } /// /// Gets or sets a value indicating the type authentication to use for - /// automation Account. Possible values include: 'RunAsAccount', - /// 'SystemAssignedIdentity' + /// automation Account. Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' /// - [JsonProperty(PropertyName = "automationAccountAuthenticationType")] - public string AutomationAccountAuthenticationType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountAuthenticationType")] + public string AutomationAccountAuthenticationType {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryAvailabilityType == null) + if (this.RecoveryAvailabilityType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryAvailabilityType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryAvailabilityType"); } - if (VmDisks != null) + + + + + if (this.VMDisks != null) { - foreach (var element in VmDisks) + foreach (var element in this.VMDisks) { if (element != null) { @@ -271,16 +282,32 @@ public virtual void Validate() } } } - if (VmManagedDisks != null) + if (this.VMManagedDisks != null) { - foreach (var element1 in VmManagedDisks) + foreach (var element in this.VMManagedDisks) { - if (element1 != null) + if (element != null) { - element1.Validate(); + element.Validate(); } } } + + + + + + + + + + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReprotectInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReprotectInput.cs index 72a89808ffb6..3f59502eb3ad 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReprotectInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AReprotectInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,24 +24,33 @@ public A2AReprotectInput() /// /// Initializes a new instance of the A2AReprotectInput class. /// - /// The recovery container - /// Id. - /// The list of vm disk details. - /// The recovery resource group - /// Id. Valid for V2 scenarios. - /// The recovery cloud service Id. - /// Valid for V1 scenarios. - /// The recovery availability - /// set. - /// The Policy Id. - public A2AReprotectInput(string recoveryContainerId = default(string), IList vmDisks = default(IList), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string policyId = default(string)) + + /// The recovery container Id. + /// + + /// The list of vm disk details. + /// + + /// The recovery resource group Id. Valid for V2 scenarios. + /// + + /// The recovery cloud service Id. Valid for V1 scenarios. + /// + + /// The recovery availability set. + /// + + /// The Policy Id. + /// + public A2AReprotectInput(string recoveryContainerId = default(string), System.Collections.Generic.IList vmDisks = default(System.Collections.Generic.IList), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string policyId = default(string)) + { - RecoveryContainerId = recoveryContainerId; - VmDisks = vmDisks; - RecoveryResourceGroupId = recoveryResourceGroupId; - RecoveryCloudServiceId = recoveryCloudServiceId; - RecoveryAvailabilitySetId = recoveryAvailabilitySetId; - PolicyId = policyId; + this.RecoveryContainerId = recoveryContainerId; + this.VMDisks = vmDisks; + this.RecoveryResourceGroupId = recoveryResourceGroupId; + this.RecoveryCloudServiceId = recoveryCloudServiceId; + this.RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + this.PolicyId = policyId; CustomInit(); } @@ -58,42 +59,41 @@ public A2AReprotectInput() /// partial void CustomInit(); + /// /// Gets or sets the recovery container Id. /// - [JsonProperty(PropertyName = "recoveryContainerId")] - public string RecoveryContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryContainerId")] + public string RecoveryContainerId {get; set; } /// /// Gets or sets the list of vm disk details. /// - [JsonProperty(PropertyName = "vmDisks")] - public IList VmDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisks")] + public System.Collections.Generic.IList VMDisks {get; set; } /// - /// Gets or sets the recovery resource group Id. Valid for V2 - /// scenarios. + /// Gets or sets the recovery resource group Id. Valid for V2 scenarios. /// - [JsonProperty(PropertyName = "recoveryResourceGroupId")] - public string RecoveryResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId {get; set; } /// /// Gets or sets the recovery cloud service Id. Valid for V1 scenarios. /// - [JsonProperty(PropertyName = "recoveryCloudServiceId")] - public string RecoveryCloudServiceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryCloudServiceId")] + public string RecoveryCloudServiceId {get; set; } /// /// Gets or sets the recovery availability set. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] - public string RecoveryAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId {get; set; } /// /// Gets or sets the Policy Id. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARpRecoveryPointType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARpRecoveryPointType.cs index 012b270347d9..60d78e753dd1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARpRecoveryPointType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ARpRecoveryPointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for A2ARpRecoveryPointType. /// + + public static class A2ARpRecoveryPointType { public const string Latest = "Latest"; @@ -21,4 +18,4 @@ public static class A2ARpRecoveryPointType public const string LatestCrashConsistent = "LatestCrashConsistent"; public const string LatestProcessed = "LatestProcessed"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ASwitchProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ASwitchProtectionInput.cs index 7b816463ccaa..8f4e2d931ecf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ASwitchProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ASwitchProtectionInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,45 +24,61 @@ public A2ASwitchProtectionInput() /// /// Initializes a new instance of the A2ASwitchProtectionInput class. /// - /// The recovery container - /// Id. - /// The list of vm disk details. - /// The list of vm managed disk - /// details. - /// The recovery resource group - /// Id. Valid for V2 scenarios. - /// The recovery cloud service Id. - /// Valid for V1 scenarios. - /// The recovery availability - /// set. - /// The Policy Id. - /// The boot diagnostic - /// storage account. - /// The recovery availability - /// zone. - /// The recovery - /// proximity placement group Id. - /// The virtual machine - /// scale set id. - /// The recovery - /// capacity reservation group Id. - /// The recovery disk encryption - /// information. - public A2ASwitchProtectionInput(string recoveryContainerId = default(string), IList vmDisks = default(IList), IList vmManagedDisks = default(IList), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string policyId = default(string), string recoveryBootDiagStorageAccountId = default(string), string recoveryAvailabilityZone = default(string), string recoveryProximityPlacementGroupId = default(string), string recoveryVirtualMachineScaleSetId = default(string), string recoveryCapacityReservationGroupId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo)) + + /// The recovery container Id. + /// + + /// The list of vm disk details. + /// + + /// The list of vm managed disk details. + /// + + /// The recovery resource group Id. Valid for V2 scenarios. + /// + + /// The recovery cloud service Id. Valid for V1 scenarios. + /// + + /// The recovery availability set. + /// + + /// The Policy Id. + /// + + /// The boot diagnostic storage account. + /// + + /// The recovery availability zone. + /// + + /// The recovery proximity placement group Id. + /// + + /// The virtual machine scale set id. + /// + + /// The recovery capacity reservation group Id. + /// + + /// The recovery disk encryption information. + /// + public A2ASwitchProtectionInput(string recoveryContainerId = default(string), System.Collections.Generic.IList vmDisks = default(System.Collections.Generic.IList), System.Collections.Generic.IList vmManagedDisks = default(System.Collections.Generic.IList), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string policyId = default(string), string recoveryBootDiagStorageAccountId = default(string), string recoveryAvailabilityZone = default(string), string recoveryProximityPlacementGroupId = default(string), string recoveryVirtualMachineScaleSetId = default(string), string recoveryCapacityReservationGroupId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo)) + { - RecoveryContainerId = recoveryContainerId; - VmDisks = vmDisks; - VmManagedDisks = vmManagedDisks; - RecoveryResourceGroupId = recoveryResourceGroupId; - RecoveryCloudServiceId = recoveryCloudServiceId; - RecoveryAvailabilitySetId = recoveryAvailabilitySetId; - PolicyId = policyId; - RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; - RecoveryAvailabilityZone = recoveryAvailabilityZone; - RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; - RecoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; - RecoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; - DiskEncryptionInfo = diskEncryptionInfo; + this.RecoveryContainerId = recoveryContainerId; + this.VMDisks = vmDisks; + this.VMManagedDisks = vmManagedDisks; + this.RecoveryResourceGroupId = recoveryResourceGroupId; + this.RecoveryCloudServiceId = recoveryCloudServiceId; + this.RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + this.PolicyId = policyId; + this.RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; + this.RecoveryAvailabilityZone = recoveryAvailabilityZone; + this.RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; + this.RecoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; + this.RecoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; + this.DiskEncryptionInfo = diskEncryptionInfo; CustomInit(); } @@ -79,84 +87,83 @@ public A2ASwitchProtectionInput() /// partial void CustomInit(); + /// /// Gets or sets the recovery container Id. /// - [JsonProperty(PropertyName = "recoveryContainerId")] - public string RecoveryContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryContainerId")] + public string RecoveryContainerId {get; set; } /// /// Gets or sets the list of vm disk details. /// - [JsonProperty(PropertyName = "vmDisks")] - public IList VmDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisks")] + public System.Collections.Generic.IList VMDisks {get; set; } /// /// Gets or sets the list of vm managed disk details. /// - [JsonProperty(PropertyName = "vmManagedDisks")] - public IList VmManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmManagedDisks")] + public System.Collections.Generic.IList VMManagedDisks {get; set; } /// - /// Gets or sets the recovery resource group Id. Valid for V2 - /// scenarios. + /// Gets or sets the recovery resource group Id. Valid for V2 scenarios. /// - [JsonProperty(PropertyName = "recoveryResourceGroupId")] - public string RecoveryResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId {get; set; } /// /// Gets or sets the recovery cloud service Id. Valid for V1 scenarios. /// - [JsonProperty(PropertyName = "recoveryCloudServiceId")] - public string RecoveryCloudServiceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryCloudServiceId")] + public string RecoveryCloudServiceId {get; set; } /// /// Gets or sets the recovery availability set. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] - public string RecoveryAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId {get; set; } /// /// Gets or sets the Policy Id. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// /// Gets or sets the boot diagnostic storage account. /// - [JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] - public string RecoveryBootDiagStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] + public string RecoveryBootDiagStorageAccountId {get; set; } /// /// Gets or sets the recovery availability zone. /// - [JsonProperty(PropertyName = "recoveryAvailabilityZone")] - public string RecoveryAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilityZone")] + public string RecoveryAvailabilityZone {get; set; } /// /// Gets or sets the recovery proximity placement group Id. /// - [JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] - public string RecoveryProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] + public string RecoveryProximityPlacementGroupId {get; set; } /// /// Gets or sets the virtual machine scale set id. /// - [JsonProperty(PropertyName = "recoveryVirtualMachineScaleSetId")] - public string RecoveryVirtualMachineScaleSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVirtualMachineScaleSetId")] + public string RecoveryVirtualMachineScaleSetId {get; set; } /// /// Gets or sets the recovery capacity reservation group Id. /// - [JsonProperty(PropertyName = "recoveryCapacityReservationGroupId")] - public string RecoveryCapacityReservationGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryCapacityReservationGroupId")] + public string RecoveryCapacityReservationGroupId {get; set; } /// /// Gets or sets the recovery disk encryption information. /// - [JsonProperty(PropertyName = "diskEncryptionInfo")] - public DiskEncryptionInfo DiskEncryptionInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ATestFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ATestFailoverInput.cs index c162d5c6c7db..2d85a47b8b58 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ATestFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2ATestFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,15 +24,18 @@ public A2ATestFailoverInput() /// /// Initializes a new instance of the A2ATestFailoverInput class. /// - /// The recovery point id to be passed to - /// test failover to a particular recovery point. In case of latest - /// recovery point, null should be passed. - /// A value indicating whether - /// to use recovery cloud service for TFO or not. + + /// The recovery point id to be passed to test failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. + /// + + /// A value indicating whether to use recovery cloud service for TFO or not. + /// public A2ATestFailoverInput(string recoveryPointId = default(string), string cloudServiceCreationOption = default(string)) + { - RecoveryPointId = recoveryPointId; - CloudServiceCreationOption = cloudServiceCreationOption; + this.RecoveryPointId = recoveryPointId; + this.CloudServiceCreationOption = cloudServiceCreationOption; CustomInit(); } @@ -47,20 +44,20 @@ public A2ATestFailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point id to be passed to test failover to - /// a particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to test failover to a + /// particular recovery point. In case of latest recovery point, null should be + /// passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// - /// Gets or sets a value indicating whether to use recovery cloud - /// service for TFO or not. + /// Gets or sets a value indicating whether to use recovery cloud service for + /// TFO or not. /// - [JsonProperty(PropertyName = "cloudServiceCreationOption")] - public string CloudServiceCreationOption { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "cloudServiceCreationOption")] + public string CloudServiceCreationOption {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUnplannedFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUnplannedFailoverInput.cs index a08da451d866..64764db1838f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUnplannedFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUnplannedFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,15 +24,19 @@ public A2AUnplannedFailoverInput() /// /// Initializes a new instance of the A2AUnplannedFailoverInput class. /// - /// The recovery point id to be passed to - /// failover to a particular recovery point. In case of latest recovery - /// point, null should be passed. - /// A value indicating whether - /// to use recovery cloud service for failover or not. + + /// The recovery point id to be passed to failover to a particular recovery + /// point. In case of latest recovery point, null should be passed. + /// + + /// A value indicating whether to use recovery cloud service for failover or + /// not. + /// public A2AUnplannedFailoverInput(string recoveryPointId = default(string), string cloudServiceCreationOption = default(string)) + { - RecoveryPointId = recoveryPointId; - CloudServiceCreationOption = cloudServiceCreationOption; + this.RecoveryPointId = recoveryPointId; + this.CloudServiceCreationOption = cloudServiceCreationOption; CustomInit(); } @@ -47,20 +45,19 @@ public A2AUnplannedFailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point id to be passed to failover to a - /// particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// - /// Gets or sets a value indicating whether to use recovery cloud - /// service for failover or not. + /// Gets or sets a value indicating whether to use recovery cloud service for + /// failover or not. /// - [JsonProperty(PropertyName = "cloudServiceCreationOption")] - public string CloudServiceCreationOption { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "cloudServiceCreationOption")] + public string CloudServiceCreationOption {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUnprotectedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUnprotectedDiskDetails.cs index 62057a109977..4681927b30f3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUnprotectedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUnprotectedDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,17 @@ public A2AUnprotectedDiskDetails() /// /// Initializes a new instance of the A2AUnprotectedDiskDetails class. /// - /// The source lun Id for the data - /// disk. - /// A value indicating whether - /// the disk auto protection is enabled. Possible values include: - /// 'Disabled', 'Enabled' + + /// The source lun Id for the data disk. + /// + + /// A value indicating whether the disk auto protection is enabled. + /// Possible values include: 'Disabled', 'Enabled' public A2AUnprotectedDiskDetails(int? diskLunId = default(int?), string diskAutoProtectionStatus = default(string)) + { - DiskLunId = diskLunId; - DiskAutoProtectionStatus = diskAutoProtectionStatus; + this.DiskLunId = diskLunId; + this.DiskAutoProtectionStatus = diskAutoProtectionStatus; CustomInit(); } @@ -46,18 +42,18 @@ public A2AUnprotectedDiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the source lun Id for the data disk. /// - [JsonProperty(PropertyName = "diskLunId")] - public int? DiskLunId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskLunId")] + public int? DiskLunId {get; set; } /// /// Gets or sets a value indicating whether the disk auto protection is - /// enabled. Possible values include: 'Disabled', 'Enabled' + /// enabled. Possible values include: 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "diskAutoProtectionStatus")] - public string DiskAutoProtectionStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskAutoProtectionStatus")] + public string DiskAutoProtectionStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUpdateContainerMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUpdateContainerMappingInput.cs index 99b2fcfed0e1..32e2dbc74c0f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUpdateContainerMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUpdateContainerMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AUpdateContainerMappingInput : ReplicationProviderSpecificUpdateContainerMappingInput { /// - /// Initializes a new instance of the A2AUpdateContainerMappingInput - /// class. + /// Initializes a new instance of the A2AUpdateContainerMappingInput class. /// public A2AUpdateContainerMappingInput() { @@ -29,23 +22,23 @@ public A2AUpdateContainerMappingInput() } /// - /// Initializes a new instance of the A2AUpdateContainerMappingInput - /// class. + /// Initializes a new instance of the A2AUpdateContainerMappingInput class. /// - /// A value indicating whether the - /// auto update is enabled. Possible values include: 'Disabled', - /// 'Enabled' - /// The automation account arm - /// id. - /// A value - /// indicating the type authentication to use for automation Account. - /// Possible values include: 'RunAsAccount', - /// 'SystemAssignedIdentity' + + /// A value indicating whether the auto update is enabled. + /// Possible values include: 'Disabled', 'Enabled' + + /// The automation account arm id. + /// + + /// A value indicating the type authentication to use for automation Account. + /// Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' public A2AUpdateContainerMappingInput(string agentAutoUpdateStatus = default(string), string automationAccountArmId = default(string), string automationAccountAuthenticationType = default(string)) + { - AgentAutoUpdateStatus = agentAutoUpdateStatus; - AutomationAccountArmId = automationAccountArmId; - AutomationAccountAuthenticationType = automationAccountAuthenticationType; + this.AgentAutoUpdateStatus = agentAutoUpdateStatus; + this.AutomationAccountArmId = automationAccountArmId; + this.AutomationAccountAuthenticationType = automationAccountAuthenticationType; CustomInit(); } @@ -54,26 +47,24 @@ public A2AUpdateContainerMappingInput() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether the auto update is enabled. - /// Possible values include: 'Disabled', 'Enabled' + /// Gets or sets a value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' /// - [JsonProperty(PropertyName = "agentAutoUpdateStatus")] - public string AgentAutoUpdateStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentAutoUpdateStatus")] + public string AgentAutoUpdateStatus {get; set; } /// /// Gets or sets the automation account arm id. /// - [JsonProperty(PropertyName = "automationAccountArmId")] - public string AutomationAccountArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountArmId")] + public string AutomationAccountArmId {get; set; } /// /// Gets or sets a value indicating the type authentication to use for - /// automation Account. Possible values include: 'RunAsAccount', - /// 'SystemAssignedIdentity' + /// automation Account. Possible values include: 'RunAsAccount', 'SystemAssignedIdentity' /// - [JsonProperty(PropertyName = "automationAccountAuthenticationType")] - public string AutomationAccountAuthenticationType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "automationAccountAuthenticationType")] + public string AutomationAccountAuthenticationType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs index f0881a7dea31..72159c83e76d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AUpdateReplicationProtectedItemInput : UpdateReplicationProtectedItemProviderInput { /// - /// Initializes a new instance of the - /// A2AUpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the A2AUpdateReplicationProtectedItemInput class. /// public A2AUpdateReplicationProtectedItemInput() { @@ -31,38 +22,47 @@ public A2AUpdateReplicationProtectedItemInput() } /// - /// Initializes a new instance of the - /// A2AUpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the A2AUpdateReplicationProtectedItemInput class. /// - /// The target cloud service ARM - /// Id (for V1). - /// The target resource group ARM - /// Id (for V2). - /// Managed disk update - /// details. - /// The boot diagnostic - /// storage account. - /// The recovery os disk encryption - /// information. - /// The user given name for Test Failover - /// VM. - /// The recovery - /// proximity placement group Id. - /// The recovery virtual - /// machine scale set Id. - /// The recovery - /// capacity reservation group Id. - public A2AUpdateReplicationProtectedItemInput(string recoveryCloudServiceId = default(string), string recoveryResourceGroupId = default(string), IList managedDiskUpdateDetails = default(IList), string recoveryBootDiagStorageAccountId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo), string tfoAzureVMName = default(string), string recoveryProximityPlacementGroupId = default(string), string recoveryVirtualMachineScaleSetId = default(string), string recoveryCapacityReservationGroupId = default(string)) + + /// The target cloud service ARM Id (for V1). + /// + + /// The target resource group ARM Id (for V2). + /// + + /// Managed disk update details. + /// + + /// The boot diagnostic storage account. + /// + + /// The recovery os disk encryption information. + /// + + /// The user given name for Test Failover VM. + /// + + /// The recovery proximity placement group Id. + /// + + /// The recovery virtual machine scale set Id. + /// + + /// The recovery capacity reservation group Id. + /// + public A2AUpdateReplicationProtectedItemInput(string recoveryCloudServiceId = default(string), string recoveryResourceGroupId = default(string), System.Collections.Generic.IList managedDiskUpdateDetails = default(System.Collections.Generic.IList), string recoveryBootDiagStorageAccountId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo), string tfoAzureVMName = default(string), string recoveryProximityPlacementGroupId = default(string), string recoveryVirtualMachineScaleSetId = default(string), string recoveryCapacityReservationGroupId = default(string)) + { - RecoveryCloudServiceId = recoveryCloudServiceId; - RecoveryResourceGroupId = recoveryResourceGroupId; - ManagedDiskUpdateDetails = managedDiskUpdateDetails; - RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; - DiskEncryptionInfo = diskEncryptionInfo; - TfoAzureVMName = tfoAzureVMName; - RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; - RecoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; - RecoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; + this.RecoveryCloudServiceId = recoveryCloudServiceId; + this.RecoveryResourceGroupId = recoveryResourceGroupId; + this.ManagedDiskUpdateDetails = managedDiskUpdateDetails; + this.RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; + this.DiskEncryptionInfo = diskEncryptionInfo; + this.TfoAzureVMName = tfoAzureVMName; + this.RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; + this.RecoveryVirtualMachineScaleSetId = recoveryVirtualMachineScaleSetId; + this.RecoveryCapacityReservationGroupId = recoveryCapacityReservationGroupId; CustomInit(); } @@ -71,59 +71,59 @@ public A2AUpdateReplicationProtectedItemInput() /// partial void CustomInit(); + /// /// Gets or sets the target cloud service ARM Id (for V1). /// - [JsonProperty(PropertyName = "recoveryCloudServiceId")] - public string RecoveryCloudServiceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryCloudServiceId")] + public string RecoveryCloudServiceId {get; set; } /// /// Gets or sets the target resource group ARM Id (for V2). /// - [JsonProperty(PropertyName = "recoveryResourceGroupId")] - public string RecoveryResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId {get; set; } /// /// Gets or sets managed disk update details. /// - [JsonProperty(PropertyName = "managedDiskUpdateDetails")] - public IList ManagedDiskUpdateDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "managedDiskUpdateDetails")] + public System.Collections.Generic.IList ManagedDiskUpdateDetails {get; set; } /// /// Gets or sets the boot diagnostic storage account. /// - [JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] - public string RecoveryBootDiagStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] + public string RecoveryBootDiagStorageAccountId {get; set; } /// /// Gets or sets the recovery os disk encryption information. /// - [JsonProperty(PropertyName = "diskEncryptionInfo")] - public DiskEncryptionInfo DiskEncryptionInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo {get; set; } /// /// Gets or sets the user given name for Test Failover VM. /// - [JsonProperty(PropertyName = "tfoAzureVMName")] - public string TfoAzureVMName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoAzureVMName")] + public string TfoAzureVMName {get; set; } /// /// Gets or sets the recovery proximity placement group Id. /// - [JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] - public string RecoveryProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] + public string RecoveryProximityPlacementGroupId {get; set; } /// /// Gets or sets the recovery virtual machine scale set Id. /// - [JsonProperty(PropertyName = "recoveryVirtualMachineScaleSetId")] - public string RecoveryVirtualMachineScaleSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVirtualMachineScaleSetId")] + public string RecoveryVirtualMachineScaleSetId {get; set; } /// /// Gets or sets the recovery capacity reservation group Id. /// - [JsonProperty(PropertyName = "recoveryCapacityReservationGroupId")] - public string RecoveryCapacityReservationGroupId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryCapacityReservationGroupId")] + public string RecoveryCapacityReservationGroupId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmDiskInputDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmDiskInputDetails.cs index 2eba97ba3c0e..6dd0da91116a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmDiskInputDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmDiskInputDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,16 +23,21 @@ public A2AVmDiskInputDetails() /// /// Initializes a new instance of the A2AVmDiskInputDetails class. /// - /// The disk Uri. - /// The recovery VHD - /// storage account Id. - /// The primary - /// staging storage account Id. + + /// The disk Uri. + /// + + /// The recovery VHD storage account Id. + /// + + /// The primary staging storage account Id. + /// public A2AVmDiskInputDetails(string diskUri, string recoveryAzureStorageAccountId, string primaryStagingAzureStorageAccountId) + { - DiskUri = diskUri; - RecoveryAzureStorageAccountId = recoveryAzureStorageAccountId; - PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + this.DiskUri = diskUri; + this.RecoveryAzureStorageAccountId = recoveryAzureStorageAccountId; + this.PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; CustomInit(); } @@ -48,44 +46,47 @@ public A2AVmDiskInputDetails(string diskUri, string recoveryAzureStorageAccountI /// partial void CustomInit(); + /// /// Gets or sets the disk Uri. /// - [JsonProperty(PropertyName = "diskUri")] - public string DiskUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskUri")] + public string DiskUri {get; set; } /// /// Gets or sets the recovery VHD storage account Id. /// - [JsonProperty(PropertyName = "recoveryAzureStorageAccountId")] - public string RecoveryAzureStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureStorageAccountId")] + public string RecoveryAzureStorageAccountId {get; set; } /// /// Gets or sets the primary staging storage account Id. /// - [JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] - public string PrimaryStagingAzureStorageAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] + public string PrimaryStagingAzureStorageAccountId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (DiskUri == null) + if (this.DiskUri == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskUri"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskUri"); } - if (RecoveryAzureStorageAccountId == null) + if (this.RecoveryAzureStorageAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryAzureStorageAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryAzureStorageAccountId"); } - if (PrimaryStagingAzureStorageAccountId == null) + if (this.PrimaryStagingAzureStorageAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryStagingAzureStorageAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PrimaryStagingAzureStorageAccountId"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmManagedDiskInputDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmManagedDiskInputDetails.cs index 1348e6c18055..76ce747363d6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmManagedDiskInputDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmManagedDiskInputDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AVmManagedDiskInputDetails { /// - /// Initializes a new instance of the A2AVmManagedDiskInputDetails - /// class. + /// Initializes a new instance of the A2AVmManagedDiskInputDetails class. /// public A2AVmManagedDiskInputDetails() { @@ -29,33 +21,41 @@ public A2AVmManagedDiskInputDetails() } /// - /// Initializes a new instance of the A2AVmManagedDiskInputDetails - /// class. + /// Initializes a new instance of the A2AVmManagedDiskInputDetails class. /// - /// The disk Id. - /// The primary - /// staging storage account Arm Id. - /// The target resource group Arm - /// Id. - /// The replica disk type. - /// Its an optional value and will be same as source disk type if not - /// user provided. - /// The target disk type - /// after failover. Its an optional value and will be same as source - /// disk type if not user provided. - /// The recovery disk - /// encryption set Id. - /// The recovery disk encryption - /// information (for one / single pass flows). + + /// The disk Id. + /// + + /// The primary staging storage account Arm Id. + /// + + /// The target resource group Arm Id. + /// + + /// The replica disk type. Its an optional value and will be same as source + /// disk type if not user provided. + /// + + /// The target disk type after failover. Its an optional value and will be same + /// as source disk type if not user provided. + /// + + /// The recovery disk encryption set Id. + /// + + /// The recovery disk encryption information (for one / single pass flows). + /// public A2AVmManagedDiskInputDetails(string diskId, string primaryStagingAzureStorageAccountId, string recoveryResourceGroupId, string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), string recoveryDiskEncryptionSetId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo)) + { - DiskId = diskId; - PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; - RecoveryResourceGroupId = recoveryResourceGroupId; - RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; - RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType; - RecoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId; - DiskEncryptionInfo = diskEncryptionInfo; + this.DiskId = diskId; + this.PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + this.RecoveryResourceGroupId = recoveryResourceGroupId; + this.RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; + this.RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType; + this.RecoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId; + this.DiskEncryptionInfo = diskEncryptionInfo; CustomInit(); } @@ -64,71 +64,78 @@ public A2AVmManagedDiskInputDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the primary staging storage account Arm Id. /// - [JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] - public string PrimaryStagingAzureStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] + public string PrimaryStagingAzureStorageAccountId {get; set; } /// /// Gets or sets the target resource group Arm Id. /// - [JsonProperty(PropertyName = "recoveryResourceGroupId")] - public string RecoveryResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId {get; set; } /// - /// Gets or sets the replica disk type. Its an optional value and will - /// be same as source disk type if not user provided. + /// Gets or sets the replica disk type. Its an optional value and will be same + /// as source disk type if not user provided. /// - [JsonProperty(PropertyName = "recoveryReplicaDiskAccountType")] - public string RecoveryReplicaDiskAccountType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryReplicaDiskAccountType")] + public string RecoveryReplicaDiskAccountType {get; set; } /// - /// Gets or sets the target disk type after failover. Its an optional - /// value and will be same as source disk type if not user provided. + /// Gets or sets the target disk type after failover. Its an optional value and + /// will be same as source disk type if not user provided. /// - [JsonProperty(PropertyName = "recoveryTargetDiskAccountType")] - public string RecoveryTargetDiskAccountType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryTargetDiskAccountType")] + public string RecoveryTargetDiskAccountType {get; set; } /// /// Gets or sets the recovery disk encryption set Id. /// - [JsonProperty(PropertyName = "recoveryDiskEncryptionSetId")] - public string RecoveryDiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryDiskEncryptionSetId")] + public string RecoveryDiskEncryptionSetId {get; set; } /// - /// Gets or sets the recovery disk encryption information (for one / - /// single pass flows). + /// Gets or sets the recovery disk encryption information (for one / single + /// pass flows). /// - [JsonProperty(PropertyName = "diskEncryptionInfo")] - public DiskEncryptionInfo DiskEncryptionInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (DiskId == null) + if (this.DiskId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskId"); } - if (PrimaryStagingAzureStorageAccountId == null) + if (this.PrimaryStagingAzureStorageAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryStagingAzureStorageAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PrimaryStagingAzureStorageAccountId"); } - if (RecoveryResourceGroupId == null) + if (this.RecoveryResourceGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryResourceGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryResourceGroupId"); } + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmManagedDiskUpdateDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmManagedDiskUpdateDetails.cs index 918a8de29bb5..8a5094284545 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmManagedDiskUpdateDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AVmManagedDiskUpdateDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class A2AVmManagedDiskUpdateDetails { /// - /// Initializes a new instance of the A2AVmManagedDiskUpdateDetails - /// class. + /// Initializes a new instance of the A2AVmManagedDiskUpdateDetails class. /// public A2AVmManagedDiskUpdateDetails() { @@ -28,28 +21,35 @@ public A2AVmManagedDiskUpdateDetails() } /// - /// Initializes a new instance of the A2AVmManagedDiskUpdateDetails - /// class. + /// Initializes a new instance of the A2AVmManagedDiskUpdateDetails class. /// - /// The disk Id. - /// The target disk type - /// before failover. - /// The replica disk type - /// before failover. - /// The recovery os disk encryption - /// information. - /// The target disk name for unplanned - /// failover operation. - /// The target disk name for test failover - /// operation. + + /// The disk Id. + /// + + /// The target disk type before failover. + /// + + /// The replica disk type before failover. + /// + + /// The recovery os disk encryption information. + /// + + /// The target disk name for unplanned failover operation. + /// + + /// The target disk name for test failover operation. + /// public A2AVmManagedDiskUpdateDetails(string diskId = default(string), string recoveryTargetDiskAccountType = default(string), string recoveryReplicaDiskAccountType = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo), string failoverDiskName = default(string), string tfoDiskName = default(string)) + { - DiskId = diskId; - RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType; - RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; - DiskEncryptionInfo = diskEncryptionInfo; - FailoverDiskName = failoverDiskName; - TfoDiskName = tfoDiskName; + this.DiskId = diskId; + this.RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType; + this.RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType; + this.DiskEncryptionInfo = diskEncryptionInfo; + this.FailoverDiskName = failoverDiskName; + this.TfoDiskName = tfoDiskName; CustomInit(); } @@ -58,41 +58,41 @@ public A2AVmManagedDiskUpdateDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the target disk type before failover. /// - [JsonProperty(PropertyName = "recoveryTargetDiskAccountType")] - public string RecoveryTargetDiskAccountType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryTargetDiskAccountType")] + public string RecoveryTargetDiskAccountType {get; set; } /// /// Gets or sets the replica disk type before failover. /// - [JsonProperty(PropertyName = "recoveryReplicaDiskAccountType")] - public string RecoveryReplicaDiskAccountType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryReplicaDiskAccountType")] + public string RecoveryReplicaDiskAccountType {get; set; } /// /// Gets or sets the recovery os disk encryption information. /// - [JsonProperty(PropertyName = "diskEncryptionInfo")] - public DiskEncryptionInfo DiskEncryptionInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo {get; set; } /// /// Gets or sets the target disk name for unplanned failover operation. /// - [JsonProperty(PropertyName = "failoverDiskName")] - public string FailoverDiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDiskName")] + public string FailoverDiskName {get; set; } /// /// Gets or sets the target disk name for test failover operation. /// - [JsonProperty(PropertyName = "tfoDiskName")] - public string TfoDiskName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoDiskName")] + public string TfoDiskName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AZoneDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AZoneDetails.cs index b4bc38b6a84a..fd69476a3953 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AZoneDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/A2AZoneDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public A2AZoneDetails() /// /// Initializes a new instance of the A2AZoneDetails class. /// - /// Source zone info. - /// The target zone info. + + /// Source zone info. + /// + + /// The target zone info. + /// public A2AZoneDetails(string source = default(string), string target = default(string)) + { - Source = source; - Target = target; + this.Source = source; + this.Target = target; CustomInit(); } @@ -43,17 +42,17 @@ public A2AZoneDetails() /// partial void CustomInit(); + /// /// Gets or sets source zone info. /// - [JsonProperty(PropertyName = "source")] - public string Source { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "source")] + public string Source {get; set; } /// /// Gets or sets the target zone info. /// - [JsonProperty(PropertyName = "target")] - public string Target { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "target")] + public string Target {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ASRTask.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ASRTask.cs index b93a905e72d0..a8f7e044bb82 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ASRTask.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ASRTask.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,41 +23,61 @@ public ASRTask() /// /// Initializes a new instance of the ASRTask class. /// - /// The Id. - /// The unique Task name. - /// The start time. - /// The end time. - /// The state/actions applicable on this - /// task. - /// The name. - /// The State. It is one of these values - - /// NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or - /// Other. - /// The description of the task state. - /// For example - For Succeeded state, description can be Completed, - /// PartiallySucceeded, CompletedWithInformation or Skipped. - /// The type of task. Details in CustomDetails - /// property depend on this type. - /// The custom task details based on the - /// task type. - /// The custom task details based - /// on the task type, if the task type is GroupTaskDetails or one of - /// the types derived from it. - /// The task error details. - public ASRTask(string taskId = default(string), string name = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), IList allowedActions = default(IList), string friendlyName = default(string), string state = default(string), string stateDescription = default(string), string taskType = default(string), TaskTypeDetails customDetails = default(TaskTypeDetails), GroupTaskDetails groupTaskCustomDetails = default(GroupTaskDetails), IList errors = default(IList)) + + /// The Id. + /// + + /// The unique Task name. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// The state/actions applicable on this task. + /// + + /// The name. + /// + + /// The State. It is one of these values - NotStarted, InProgress, Succeeded, + /// Failed, Cancelled, Suspended or Other. + /// + + /// The description of the task state. For example - For Succeeded state, + /// description can be Completed, PartiallySucceeded, CompletedWithInformation + /// or Skipped. + /// + + /// The type of task. Details in CustomDetails property depend on this type. + /// + + /// The custom task details based on the task type. + /// + + /// The custom task details based on the task type, if the task type is + /// GroupTaskDetails or one of the types derived from it. + /// + + /// The task error details. + /// + public ASRTask(string taskId = default(string), string name = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.Collections.Generic.IList allowedActions = default(System.Collections.Generic.IList), string friendlyName = default(string), string state = default(string), string stateDescription = default(string), string taskType = default(string), TaskTypeDetails customDetails = default(TaskTypeDetails), GroupTaskDetails groupTaskCustomDetails = default(GroupTaskDetails), System.Collections.Generic.IList errors = default(System.Collections.Generic.IList)) + { - TaskId = taskId; - Name = name; - StartTime = startTime; - EndTime = endTime; - AllowedActions = allowedActions; - FriendlyName = friendlyName; - State = state; - StateDescription = stateDescription; - TaskType = taskType; - CustomDetails = customDetails; - GroupTaskCustomDetails = groupTaskCustomDetails; - Errors = errors; + this.TaskId = taskId; + this.Name = name; + this.StartTime = startTime; + this.EndTime = endTime; + this.AllowedActions = allowedActions; + this.FriendlyName = friendlyName; + this.State = state; + this.StateDescription = stateDescription; + this.TaskType = taskType; + this.CustomDetails = customDetails; + this.GroupTaskCustomDetails = groupTaskCustomDetails; + this.Errors = errors; CustomInit(); } @@ -74,82 +86,82 @@ public ASRTask() /// partial void CustomInit(); + /// /// Gets or sets the Id. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } /// /// Gets or sets the unique Task name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets the state/actions applicable on this task. /// - [JsonProperty(PropertyName = "allowedActions")] - public IList AllowedActions { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedActions")] + public System.Collections.Generic.IList AllowedActions {get; set; } /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets the State. It is one of these values - NotStarted, - /// InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + /// Gets or sets the State. It is one of these values - NotStarted, InProgress, + /// Succeeded, Failed, Cancelled, Suspended or Other. /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } /// - /// Gets or sets the description of the task state. For example - For - /// Succeeded state, description can be Completed, PartiallySucceeded, + /// Gets or sets the description of the task state. For example - For Succeeded + /// state, description can be Completed, PartiallySucceeded, /// CompletedWithInformation or Skipped. /// - [JsonProperty(PropertyName = "stateDescription")] - public string StateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "stateDescription")] + public string StateDescription {get; set; } /// - /// Gets or sets the type of task. Details in CustomDetails property - /// depend on this type. + /// Gets or sets the type of task. Details in CustomDetails property depend on + /// this type. /// - [JsonProperty(PropertyName = "taskType")] - public string TaskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "taskType")] + public string TaskType {get; set; } /// /// Gets or sets the custom task details based on the task type. /// - [JsonProperty(PropertyName = "customDetails")] - public TaskTypeDetails CustomDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "customDetails")] + public TaskTypeDetails CustomDetails {get; set; } /// - /// Gets or sets the custom task details based on the task type, if the - /// task type is GroupTaskDetails or one of the types derived from it. + /// Gets or sets the custom task details based on the task type, if the task + /// type is GroupTaskDetails or one of the types derived from it. /// - [JsonProperty(PropertyName = "groupTaskCustomDetails")] - public GroupTaskDetails GroupTaskCustomDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "groupTaskCustomDetails")] + public GroupTaskDetails GroupTaskCustomDetails {get; set; } /// /// Gets or sets the task error details. /// - [JsonProperty(PropertyName = "errors")] - public IList Errors { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "errors")] + public System.Collections.Generic.IList Errors {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksInput.cs index a0e278f9ee47..c2e0c54887cf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public AddDisksInput() /// /// Initializes a new instance of the AddDisksInput class. /// - /// Add disks input properties. + + /// Add disks input properties. + /// public AddDisksInput(AddDisksInputProperties properties = default(AddDisksInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,24 +38,24 @@ public AddDisksInput() /// partial void CustomInit(); + /// /// Gets or sets add disks input properties. /// - [JsonProperty(PropertyName = "properties")] - public AddDisksInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public AddDisksInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksInputProperties.cs index d9baff412a2f..db6c40aba188 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,14 +23,16 @@ public AddDisksInputProperties() /// /// Initializes a new instance of the AddDisksInputProperties class. /// - /// The ReplicationProviderInput. - /// For HyperVReplicaAzure provider, it will be + + /// The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be /// AzureEnableProtectionInput object. For San provider, it will be - /// SanEnableProtectionInput object. For HyperVReplicaAzure provider, - /// it can be null. + /// SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be + /// null. + /// public AddDisksInputProperties(AddDisksProviderSpecificInput providerSpecificDetails) + { - ProviderSpecificDetails = providerSpecificDetails; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -46,27 +41,28 @@ public AddDisksInputProperties(AddDisksProviderSpecificInput providerSpecificDet /// partial void CustomInit(); + /// - /// Gets or sets the ReplicationProviderInput. For HyperVReplicaAzure - /// provider, it will be AzureEnableProtectionInput object. For San - /// provider, it will be SanEnableProtectionInput object. For - /// HyperVReplicaAzure provider, it can be null. + /// Gets or sets the ReplicationProviderInput. For HyperVReplicaAzure provider, + /// it will be AzureEnableProtectionInput object. For San provider, it will be + /// SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be + /// null. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public AddDisksProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public AddDisksProviderSpecificInput ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ProviderSpecificDetails == null) + if (this.ProviderSpecificDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProviderSpecificDetails"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksProviderSpecificInput.cs index f80fb3c2cab4..4983260ec653 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddDisksProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class AddDisksProviderSpecificInput { /// - /// Initializes a new instance of the AddDisksProviderSpecificInput - /// class. + /// Initializes a new instance of the AddDisksProviderSpecificInput class. /// public AddDisksProviderSpecificInput() { @@ -35,4 +28,4 @@ public AddDisksProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddRecoveryServicesProviderInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddRecoveryServicesProviderInput.cs index 0aa122f3ed46..e45d5ea27e17 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddRecoveryServicesProviderInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddRecoveryServicesProviderInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class AddRecoveryServicesProviderInput { /// - /// Initializes a new instance of the AddRecoveryServicesProviderInput - /// class. + /// Initializes a new instance of the AddRecoveryServicesProviderInput class. /// public AddRecoveryServicesProviderInput() { @@ -29,14 +21,15 @@ public AddRecoveryServicesProviderInput() } /// - /// Initializes a new instance of the AddRecoveryServicesProviderInput - /// class. + /// Initializes a new instance of the AddRecoveryServicesProviderInput class. /// - /// The properties of an add provider - /// request. + + /// The properties of an add provider request. + /// public AddRecoveryServicesProviderInput(AddRecoveryServicesProviderInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -45,28 +38,28 @@ public AddRecoveryServicesProviderInput(AddRecoveryServicesProviderInputProperti /// partial void CustomInit(); + /// /// Gets or sets the properties of an add provider request. /// - [JsonProperty(PropertyName = "properties")] - public AddRecoveryServicesProviderInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public AddRecoveryServicesProviderInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddRecoveryServicesProviderInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddRecoveryServicesProviderInputProperties.cs index 021833f83923..a02f2109aefc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddRecoveryServicesProviderInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddRecoveryServicesProviderInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class AddRecoveryServicesProviderInputProperties { /// - /// Initializes a new instance of the - /// AddRecoveryServicesProviderInputProperties class. + /// Initializes a new instance of the AddRecoveryServicesProviderInputProperties class. /// public AddRecoveryServicesProviderInputProperties() { @@ -29,28 +21,35 @@ public AddRecoveryServicesProviderInputProperties() } /// - /// Initializes a new instance of the - /// AddRecoveryServicesProviderInputProperties class. + /// Initializes a new instance of the AddRecoveryServicesProviderInputProperties class. /// - /// The name of the machine where the - /// provider is getting added. - /// The identity provider - /// input for DRA authentication. - /// The identity provider - /// input for resource access. - /// The Id of the machine where the provider is - /// getting added. - /// The Bios Id of the machine. - /// The identity - /// provider input for data plane authentication. + + /// The name of the machine where the provider is getting added. + /// + + /// The Id of the machine where the provider is getting added. + /// + + /// The Bios Id of the machine. + /// + + /// The identity provider input for DRA authentication. + /// + + /// The identity provider input for resource access. + /// + + /// The identity provider input for data plane authentication. + /// public AddRecoveryServicesProviderInputProperties(string machineName, IdentityProviderInput authenticationIdentityInput, IdentityProviderInput resourceAccessIdentityInput, string machineId = default(string), string biosId = default(string), IdentityProviderInput dataPlaneAuthenticationIdentityInput = default(IdentityProviderInput)) + { - MachineName = machineName; - MachineId = machineId; - BiosId = biosId; - AuthenticationIdentityInput = authenticationIdentityInput; - ResourceAccessIdentityInput = resourceAccessIdentityInput; - DataPlaneAuthenticationIdentityInput = dataPlaneAuthenticationIdentityInput; + this.MachineName = machineName; + this.MachineId = machineId; + this.BiosId = biosId; + this.AuthenticationIdentityInput = authenticationIdentityInput; + this.ResourceAccessIdentityInput = resourceAccessIdentityInput; + this.DataPlaneAuthenticationIdentityInput = dataPlaneAuthenticationIdentityInput; CustomInit(); } @@ -59,77 +58,77 @@ public AddRecoveryServicesProviderInputProperties() /// partial void CustomInit(); + /// - /// Gets or sets the name of the machine where the provider is getting - /// added. + /// Gets or sets the name of the machine where the provider is getting added. /// - [JsonProperty(PropertyName = "machineName")] - public string MachineName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "machineName")] + public string MachineName {get; set; } /// - /// Gets or sets the Id of the machine where the provider is getting - /// added. + /// Gets or sets the Id of the machine where the provider is getting added. /// - [JsonProperty(PropertyName = "machineId")] - public string MachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "machineId")] + public string MachineId {get; set; } /// /// Gets or sets the Bios Id of the machine. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; set; } /// /// Gets or sets the identity provider input for DRA authentication. /// - [JsonProperty(PropertyName = "authenticationIdentityInput")] - public IdentityProviderInput AuthenticationIdentityInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "authenticationIdentityInput")] + public IdentityProviderInput AuthenticationIdentityInput {get; set; } /// /// Gets or sets the identity provider input for resource access. /// - [JsonProperty(PropertyName = "resourceAccessIdentityInput")] - public IdentityProviderInput ResourceAccessIdentityInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceAccessIdentityInput")] + public IdentityProviderInput ResourceAccessIdentityInput {get; set; } /// - /// Gets or sets the identity provider input for data plane - /// authentication. + /// Gets or sets the identity provider input for data plane authentication. /// - [JsonProperty(PropertyName = "dataPlaneAuthenticationIdentityInput")] - public IdentityProviderInput DataPlaneAuthenticationIdentityInput { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPlaneAuthenticationIdentityInput")] + public IdentityProviderInput DataPlaneAuthenticationIdentityInput {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (MachineName == null) + if (this.MachineName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MachineName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MachineName"); } - if (AuthenticationIdentityInput == null) + if (this.AuthenticationIdentityInput == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationIdentityInput"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AuthenticationIdentityInput"); } - if (ResourceAccessIdentityInput == null) + if (this.ResourceAccessIdentityInput == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ResourceAccessIdentityInput"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ResourceAccessIdentityInput"); } - if (AuthenticationIdentityInput != null) + + + + if (this.AuthenticationIdentityInput != null) { - AuthenticationIdentityInput.Validate(); + this.AuthenticationIdentityInput.Validate(); } - if (ResourceAccessIdentityInput != null) + if (this.ResourceAccessIdentityInput != null) { - ResourceAccessIdentityInput.Validate(); + this.ResourceAccessIdentityInput.Validate(); } - if (DataPlaneAuthenticationIdentityInput != null) + if (this.DataPlaneAuthenticationIdentityInput != null) { - DataPlaneAuthenticationIdentityInput.Validate(); + this.DataPlaneAuthenticationIdentityInput.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddVCenterRequest.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddVCenterRequest.cs index 915c1c432640..16d0e0a2a7a0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddVCenterRequest.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddVCenterRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public AddVCenterRequest() /// /// Initializes a new instance of the AddVCenterRequest class. /// - /// The properties of an add vCenter - /// request. + + /// The properties of an add vCenter request. + /// public AddVCenterRequest(AddVCenterRequestProperties properties = default(AddVCenterRequestProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,11 +38,11 @@ public AddVCenterRequest() /// partial void CustomInit(); + /// /// Gets or sets the properties of an add vCenter request. /// - [JsonProperty(PropertyName = "properties")] - public AddVCenterRequestProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public AddVCenterRequestProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddVCenterRequestProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddVCenterRequestProperties.cs index 2e9f7ce39bba..bebdc437b80f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddVCenterRequestProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AddVCenterRequestProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class AddVCenterRequestProperties { /// - /// Initializes a new instance of the AddVCenterRequestProperties - /// class. + /// Initializes a new instance of the AddVCenterRequestProperties class. /// public AddVCenterRequestProperties() { @@ -28,25 +21,31 @@ public AddVCenterRequestProperties() } /// - /// Initializes a new instance of the AddVCenterRequestProperties - /// class. + /// Initializes a new instance of the AddVCenterRequestProperties class. /// - /// The friendly name of the - /// vCenter. - /// The IP address of the vCenter to be - /// discovered. - /// The process server Id from where the - /// discovery is orchestrated. - /// The port number for discovery. - /// The account Id which has privileges to - /// discover the vCenter. + + /// The friendly name of the vCenter. + /// + + /// The IP address of the vCenter to be discovered. + /// + + /// The process server Id from where the discovery is orchestrated. + /// + + /// The port number for discovery. + /// + + /// The account Id which has privileges to discover the vCenter. + /// public AddVCenterRequestProperties(string friendlyName = default(string), string ipAddress = default(string), string processServerId = default(string), string port = default(string), string runAsAccountId = default(string)) + { - FriendlyName = friendlyName; - IpAddress = ipAddress; - ProcessServerId = processServerId; - Port = port; - RunAsAccountId = runAsAccountId; + this.FriendlyName = friendlyName; + this.IPAddress = ipAddress; + this.ProcessServerId = processServerId; + this.Port = port; + this.RunAsAccountId = runAsAccountId; CustomInit(); } @@ -55,37 +54,36 @@ public AddVCenterRequestProperties() /// partial void CustomInit(); + /// /// Gets or sets the friendly name of the vCenter. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the IP address of the vCenter to be discovered. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the process server Id from where the discovery is /// orchestrated. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the port number for discovery. /// - [JsonProperty(PropertyName = "port")] - public string Port { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "port")] + public string Port {get; set; } /// - /// Gets or sets the account Id which has privileges to discover the - /// vCenter. + /// Gets or sets the account Id which has privileges to discover the vCenter. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentAutoUpdateStatus.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentAutoUpdateStatus.cs index 4ad5eb581005..9133cf6a8a44 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentAutoUpdateStatus.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentAutoUpdateStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for AgentAutoUpdateStatus. /// + + public static class AgentAutoUpdateStatus { public const string Disabled = "Disabled"; public const string Enabled = "Enabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentDetails.cs index 129b8b99e431..3b35a3ae3f90 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,20 +23,29 @@ public AgentDetails() /// /// Initializes a new instance of the AgentDetails class. /// - /// The Id of the agent running on the - /// server. - /// The Id of the machine to which the agent is - /// registered. - /// The machine BIOS Id. - /// The machine FQDN. - /// The disks. - public AgentDetails(string agentId = default(string), string machineId = default(string), string biosId = default(string), string fqdn = default(string), IList disks = default(IList)) + + /// The Id of the agent running on the server. + /// + + /// The Id of the machine to which the agent is registered. + /// + + /// The machine BIOS Id. + /// + + /// The machine FQDN. + /// + + /// The disks. + /// + public AgentDetails(string agentId = default(string), string machineId = default(string), string biosId = default(string), string fqdn = default(string), System.Collections.Generic.IList disks = default(System.Collections.Generic.IList)) + { - AgentId = agentId; - MachineId = machineId; - BiosId = biosId; - Fqdn = fqdn; - Disks = disks; + this.AgentId = agentId; + this.MachineId = machineId; + this.BiosId = biosId; + this.Fqdn = fqdn; + this.Disks = disks; CustomInit(); } @@ -53,35 +54,35 @@ public AgentDetails() /// partial void CustomInit(); + /// /// Gets the Id of the agent running on the server. /// - [JsonProperty(PropertyName = "agentId")] - public string AgentId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentId")] + public string AgentId {get; private set; } /// /// Gets the Id of the machine to which the agent is registered. /// - [JsonProperty(PropertyName = "machineId")] - public string MachineId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "machineId")] + public string MachineId {get; private set; } /// /// Gets the machine BIOS Id. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; private set; } /// /// Gets the machine FQDN. /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdn")] + public string Fqdn {get; private set; } /// /// Gets the disks. /// - [JsonProperty(PropertyName = "disks")] - public IList Disks { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "disks")] + public System.Collections.Generic.IList Disks {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentDiskDetails.cs index 476dc7a684ff..ad42e4b4f3ea 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,19 +23,29 @@ public AgentDiskDetails() /// /// Initializes a new instance of the AgentDiskDetails class. /// - /// The disk Id. - /// The disk name. - /// A value indicating whether the disk is the - /// OS disk. - /// The disk capacity in bytes. - /// The lun of disk. + + /// The disk Id. + /// + + /// The disk name. + /// + + /// A value indicating whether the disk is the OS disk. + /// + + /// The disk capacity in bytes. + /// + + /// The lun of disk. + /// public AgentDiskDetails(string diskId = default(string), string diskName = default(string), string isOSDisk = default(string), long? capacityInBytes = default(long?), int? lunId = default(int?)) + { - DiskId = diskId; - DiskName = diskName; - IsOSDisk = isOSDisk; - CapacityInBytes = capacityInBytes; - LunId = lunId; + this.DiskId = diskId; + this.DiskName = diskName; + this.IsOSDisk = isOSDisk; + this.CapacityInBytes = capacityInBytes; + this.LunId = lunId; CustomInit(); } @@ -50,35 +54,35 @@ public AgentDiskDetails() /// partial void CustomInit(); + /// /// Gets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; private set; } /// /// Gets the disk name. /// - [JsonProperty(PropertyName = "diskName")] - public string DiskName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskName")] + public string DiskName {get; private set; } /// /// Gets a value indicating whether the disk is the OS disk. /// - [JsonProperty(PropertyName = "isOSDisk")] - public string IsOSDisk { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isOSDisk")] + public string IsOSDisk {get; private set; } /// /// Gets the disk capacity in bytes. /// - [JsonProperty(PropertyName = "capacityInBytes")] - public long? CapacityInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "capacityInBytes")] + public long? CapacityInBytes {get; private set; } /// /// Gets the lun of disk. /// - [JsonProperty(PropertyName = "lunId")] - public int? LunId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lunId")] + public int? LunId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentUpgradeBlockedReason.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentUpgradeBlockedReason.cs index df00a65cbc53..eaf0dd00fa22 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentUpgradeBlockedReason.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentUpgradeBlockedReason.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for AgentUpgradeBlockedReason. /// + + public static class AgentUpgradeBlockedReason { public const string AlreadyOnLatestVersion = "AlreadyOnLatestVersion"; @@ -31,4 +28,4 @@ public static class AgentUpgradeBlockedReason public const string InvalidDriverVersion = "InvalidDriverVersion"; public const string Unknown = "Unknown"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentVersionStatus.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentVersionStatus.cs index 445253b7bcf0..3eb61c9fc90a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentVersionStatus.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AgentVersionStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for AgentVersionStatus. /// + + public static class AgentVersionStatus { public const string Supported = "Supported"; @@ -22,4 +19,4 @@ public static class AgentVersionStatus public const string UpdateRequired = "UpdateRequired"; public const string SecurityUpdateRequired = "SecurityUpdateRequired"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Alert.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Alert.cs index 465e38165d9d..29b69ed87384 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Alert.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Alert.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public Alert() /// /// Initializes a new instance of the Alert class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// Alert related data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// Alert related data. + /// public Alert(string id = default(string), string name = default(string), string type = default(string), string location = default(string), AlertProperties properties = default(AlertProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public Alert() /// partial void CustomInit(); + /// /// Gets or sets alert related data. /// - [JsonProperty(PropertyName = "properties")] - public AlertProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public AlertProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AlertProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AlertProperties.cs index a4aacd1fa8f4..09be6500f0c7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AlertProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AlertProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,16 +23,21 @@ public AlertProperties() /// /// Initializes a new instance of the AlertProperties class. /// - /// A value indicating whether to send email - /// to subscription administrator. - /// The custom email address for - /// sending emails. - /// The locale for the email notification. - public AlertProperties(string sendToOwners = default(string), IList customEmailAddresses = default(IList), string locale = default(string)) + + /// A value indicating whether to send email to subscription administrator. + /// + + /// The custom email address for sending emails. + /// + + /// The locale for the email notification. + /// + public AlertProperties(string sendToOwners = default(string), System.Collections.Generic.IList customEmailAddresses = default(System.Collections.Generic.IList), string locale = default(string)) + { - SendToOwners = sendToOwners; - CustomEmailAddresses = customEmailAddresses; - Locale = locale; + this.SendToOwners = sendToOwners; + this.CustomEmailAddresses = customEmailAddresses; + this.Locale = locale; CustomInit(); } @@ -49,24 +46,24 @@ public AlertProperties() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether to send email to - /// subscription administrator. + /// Gets or sets a value indicating whether to send email to subscription + /// administrator. /// - [JsonProperty(PropertyName = "sendToOwners")] - public string SendToOwners { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sendToOwners")] + public string SendToOwners {get; set; } /// /// Gets or sets the custom email address for sending emails. /// - [JsonProperty(PropertyName = "customEmailAddresses")] - public IList CustomEmailAddresses { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "customEmailAddresses")] + public System.Collections.Generic.IList CustomEmailAddresses {get; set; } /// /// Gets or sets the locale for the email notification. /// - [JsonProperty(PropertyName = "locale")] - public string Locale { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "locale")] + public string Locale {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AlternateLocationRecoveryOption.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AlternateLocationRecoveryOption.cs index b5ad0c79d7fd..0889b0808865 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AlternateLocationRecoveryOption.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AlternateLocationRecoveryOption.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for AlternateLocationRecoveryOption. /// + + public static class AlternateLocationRecoveryOption { public const string CreateVmIfNotFound = "CreateVmIfNotFound"; public const string NoAction = "NoAction"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplianceQueryParameter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplianceQueryParameter.cs index bc898796cff1..a8eb34b7dc41 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplianceQueryParameter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplianceQueryParameter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public ApplianceQueryParameter() /// /// Initializes a new instance of the ApplianceQueryParameter class. /// - /// The providerType to be used for fetching - /// appliance details. + + /// The providerType to be used for fetching appliance details. + /// public ApplianceQueryParameter(string providerType = default(string)) + { - ProviderType = providerType; + this.ProviderType = providerType; CustomInit(); } @@ -42,12 +38,11 @@ public ApplianceQueryParameter() /// partial void CustomInit(); + /// - /// Gets or sets the providerType to be used for fetching appliance - /// details. + /// Gets or sets the providerType to be used for fetching appliance details. /// - [JsonProperty(PropertyName = "providerType")] - public string ProviderType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerType")] + public string ProviderType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplianceSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplianceSpecificDetails.cs index f8833b009cbf..87db06e1808a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplianceSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplianceSpecificDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public ApplianceSpecificDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointInput.cs index ef7dabd5a7a6..74554347f140 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public ApplyRecoveryPointInput() /// /// Initializes a new instance of the ApplyRecoveryPointInput class. /// - /// The input properties to apply recovery - /// point. + + /// The input properties to apply recovery point. + /// public ApplyRecoveryPointInput(ApplyRecoveryPointInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,28 +38,28 @@ public ApplyRecoveryPointInput(ApplyRecoveryPointInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets the input properties to apply recovery point. /// - [JsonProperty(PropertyName = "properties")] - public ApplyRecoveryPointInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ApplyRecoveryPointInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointInputProperties.cs index 8bc21a6c0104..f57613eb3ed1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ApplyRecoveryPointInputProperties { /// - /// Initializes a new instance of the ApplyRecoveryPointInputProperties - /// class. + /// Initializes a new instance of the ApplyRecoveryPointInputProperties class. /// public ApplyRecoveryPointInputProperties() { @@ -29,16 +21,19 @@ public ApplyRecoveryPointInputProperties() } /// - /// Initializes a new instance of the ApplyRecoveryPointInputProperties - /// class. + /// Initializes a new instance of the ApplyRecoveryPointInputProperties class. /// - /// Provider specific input for - /// applying recovery point. - /// The recovery point Id. + + /// The recovery point Id. + /// + + /// Provider specific input for applying recovery point. + /// public ApplyRecoveryPointInputProperties(ApplyRecoveryPointProviderSpecificInput providerSpecificDetails, string recoveryPointId = default(string)) + { - RecoveryPointId = recoveryPointId; - ProviderSpecificDetails = providerSpecificDetails; + this.RecoveryPointId = recoveryPointId; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -47,30 +42,32 @@ public ApplyRecoveryPointInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the recovery point Id. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// /// Gets or sets provider specific input for applying recovery point. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public ApplyRecoveryPointProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public ApplyRecoveryPointProviderSpecificInput ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ProviderSpecificDetails == null) + if (this.ProviderSpecificDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProviderSpecificDetails"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointProviderSpecificInput.cs index fb8e023a5f70..5fa77fa77f9b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ApplyRecoveryPointProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ApplyRecoveryPointProviderSpecificInput { /// - /// Initializes a new instance of the - /// ApplyRecoveryPointProviderSpecificInput class. + /// Initializes a new instance of the ApplyRecoveryPointProviderSpecificInput class. /// public ApplyRecoveryPointProviderSpecificInput() { @@ -35,4 +28,4 @@ public ApplyRecoveryPointProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AsrJobDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AsrJobDetails.cs index fc9f4dd23efe..43b0683020c7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AsrJobDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AsrJobDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,11 +24,13 @@ public AsrJobDetails() /// /// Initializes a new instance of the AsrJobDetails class. /// - /// The affected object properties - /// like source server, source cloud, target server, target cloud etc. - /// based on the workflow object details. - public AsrJobDetails(IDictionary affectedObjectDetails = default(IDictionary)) - : base(affectedObjectDetails) + + /// The affected object properties like source server, source cloud, target + /// server, target cloud etc. based on the workflow object details. + /// + public AsrJobDetails(System.Collections.Generic.IDictionary affectedObjectDetails = default(System.Collections.Generic.IDictionary)) + + : base(affectedObjectDetails) { CustomInit(); } @@ -47,4 +41,4 @@ public AsrJobDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutoProtectionOfDataDisk.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutoProtectionOfDataDisk.cs index 0d5b2f2e37db..87b60d722bad 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutoProtectionOfDataDisk.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutoProtectionOfDataDisk.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for AutoProtectionOfDataDisk. /// + + public static class AutoProtectionOfDataDisk { public const string Disabled = "Disabled"; public const string Enabled = "Enabled"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutomationAccountAuthenticationType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutomationAccountAuthenticationType.cs index d18c4cbd4b5f..967d48a26bbf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutomationAccountAuthenticationType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutomationAccountAuthenticationType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for AutomationAccountAuthenticationType. /// + + public static class AutomationAccountAuthenticationType { public const string RunAsAccount = "RunAsAccount"; public const string SystemAssignedIdentity = "SystemAssignedIdentity"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutomationRunbookTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutomationRunbookTaskDetails.cs index 96a0d3c1678a..e2bda9843e90 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutomationRunbookTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AutomationRunbookTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class AutomationRunbookTaskDetails : TaskTypeDetails { /// - /// Initializes a new instance of the AutomationRunbookTaskDetails - /// class. + /// Initializes a new instance of the AutomationRunbookTaskDetails class. /// public AutomationRunbookTaskDetails() { @@ -29,34 +22,47 @@ public AutomationRunbookTaskDetails() } /// - /// Initializes a new instance of the AutomationRunbookTaskDetails - /// class. + /// Initializes a new instance of the AutomationRunbookTaskDetails class. /// - /// The recovery plan task name. - /// The cloud service of the automation - /// runbook account. - /// The subscription Id of the automation - /// runbook account. - /// The automation account name of the - /// runbook. - /// The runbook Id. - /// The runbook name. - /// The job Id of the runbook execution. - /// The execution output of the - /// runbook. - /// A value indicating whether it is - /// a primary side script or not. + + /// The recovery plan task name. + /// + + /// The cloud service of the automation runbook account. + /// + + /// The subscription Id of the automation runbook account. + /// + + /// The automation account name of the runbook. + /// + + /// The runbook Id. + /// + + /// The runbook name. + /// + + /// The job Id of the runbook execution. + /// + + /// The execution output of the runbook. + /// + + /// A value indicating whether it is a primary side script or not. + /// public AutomationRunbookTaskDetails(string name = default(string), string cloudServiceName = default(string), string subscriptionId = default(string), string accountName = default(string), string runbookId = default(string), string runbookName = default(string), string jobId = default(string), string jobOutput = default(string), bool? isPrimarySideScript = default(bool?)) + { - Name = name; - CloudServiceName = cloudServiceName; - SubscriptionId = subscriptionId; - AccountName = accountName; - RunbookId = runbookId; - RunbookName = runbookName; - JobId = jobId; - JobOutput = jobOutput; - IsPrimarySideScript = isPrimarySideScript; + this.Name = name; + this.CloudServiceName = cloudServiceName; + this.SubscriptionId = subscriptionId; + this.AccountName = accountName; + this.RunbookId = runbookId; + this.RunbookName = runbookName; + this.JobId = jobId; + this.JobOutput = jobOutput; + this.IsPrimarySideScript = isPrimarySideScript; CustomInit(); } @@ -65,60 +71,59 @@ public AutomationRunbookTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the recovery plan task name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the cloud service of the automation runbook account. /// - [JsonProperty(PropertyName = "cloudServiceName")] - public string CloudServiceName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cloudServiceName")] + public string CloudServiceName {get; set; } /// /// Gets or sets the subscription Id of the automation runbook account. /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId {get; set; } /// /// Gets or sets the automation account name of the runbook. /// - [JsonProperty(PropertyName = "accountName")] - public string AccountName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "accountName")] + public string AccountName {get; set; } /// /// Gets or sets the runbook Id. /// - [JsonProperty(PropertyName = "runbookId")] - public string RunbookId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runbookId")] + public string RunbookId {get; set; } /// /// Gets or sets the runbook name. /// - [JsonProperty(PropertyName = "runbookName")] - public string RunbookName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runbookName")] + public string RunbookName {get; set; } /// /// Gets or sets the job Id of the runbook execution. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; set; } /// /// Gets or sets the execution output of the runbook. /// - [JsonProperty(PropertyName = "jobOutput")] - public string JobOutput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobOutput")] + public string JobOutput {get; set; } /// - /// Gets or sets a value indicating whether it is a primary side script - /// or not. + /// Gets or sets a value indicating whether it is a primary side script or not. /// - [JsonProperty(PropertyName = "isPrimarySideScript")] - public bool? IsPrimarySideScript { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isPrimarySideScript")] + public bool? IsPrimarySideScript {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureFabricCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureFabricCreationInput.cs index 64f9136d04fe..5641a534cbfe 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureFabricCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureFabricCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +24,13 @@ public AzureFabricCreationInput() /// /// Initializes a new instance of the AzureFabricCreationInput class. /// - /// The Location. + + /// The Location. + /// public AzureFabricCreationInput(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -42,11 +39,11 @@ public AzureFabricCreationInput() /// partial void CustomInit(); + /// /// Gets or sets the Location. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureFabricSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureFabricSpecificDetails.cs index 0acfea0bc157..d310e1f5fca0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureFabricSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureFabricSpecificDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,19 +24,29 @@ public AzureFabricSpecificDetails() /// /// Initializes a new instance of the AzureFabricSpecificDetails class. /// - /// The Location for the Azure fabric. - /// The container Ids for the Azure - /// fabric. - /// The zones. - /// The ExtendedLocations. - /// The location details. - public AzureFabricSpecificDetails(string location = default(string), IList containerIds = default(IList), IList zones = default(IList), IList extendedLocations = default(IList), IList locationDetails = default(IList)) + + /// The Location for the Azure fabric. + /// + + /// The container Ids for the Azure fabric. + /// + + /// The zones. + /// + + /// The ExtendedLocations. + /// + + /// The location details. + /// + public AzureFabricSpecificDetails(string location = default(string), System.Collections.Generic.IList containerIds = default(System.Collections.Generic.IList), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), System.Collections.Generic.IList extendedLocations = default(System.Collections.Generic.IList), System.Collections.Generic.IList locationDetails = default(System.Collections.Generic.IList)) + { - Location = location; - ContainerIds = containerIds; - Zones = zones; - ExtendedLocations = extendedLocations; - LocationDetails = locationDetails; + this.Location = location; + this.ContainerIds = containerIds; + this.Zones = zones; + this.ExtendedLocations = extendedLocations; + this.LocationDetails = locationDetails; CustomInit(); } @@ -53,35 +55,35 @@ public AzureFabricSpecificDetails() /// partial void CustomInit(); + /// /// Gets or sets the Location for the Azure fabric. /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Gets or sets the container Ids for the Azure fabric. /// - [JsonProperty(PropertyName = "containerIds")] - public IList ContainerIds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerIds")] + public System.Collections.Generic.IList ContainerIds {get; set; } /// /// Gets or sets the zones. /// - [JsonProperty(PropertyName = "zones")] - public IList Zones { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "zones")] + public System.Collections.Generic.IList Zones {get; set; } /// /// Gets or sets the ExtendedLocations. /// - [JsonProperty(PropertyName = "extendedLocations")] - public IList ExtendedLocations { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedLocations")] + public System.Collections.Generic.IList ExtendedLocations {get; set; } /// /// Gets or sets the location details. /// - [JsonProperty(PropertyName = "locationDetails")] - public IList LocationDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "locationDetails")] + public System.Collections.Generic.IList LocationDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureCreateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureCreateNetworkMappingInput.cs index 1a71a3e954b5..a6e8372c6a32 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureCreateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureCreateNetworkMappingInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -22,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class AzureToAzureCreateNetworkMappingInput : FabricSpecificCreateNetworkMappingInput { /// - /// Initializes a new instance of the - /// AzureToAzureCreateNetworkMappingInput class. + /// Initializes a new instance of the AzureToAzureCreateNetworkMappingInput class. /// public AzureToAzureCreateNetworkMappingInput() { @@ -31,13 +23,15 @@ public AzureToAzureCreateNetworkMappingInput() } /// - /// Initializes a new instance of the - /// AzureToAzureCreateNetworkMappingInput class. + /// Initializes a new instance of the AzureToAzureCreateNetworkMappingInput class. /// - /// The primary azure vnet Id. + + /// The primary azure vnet Id. + /// public AzureToAzureCreateNetworkMappingInput(string primaryNetworkId) + { - PrimaryNetworkId = primaryNetworkId; + this.PrimaryNetworkId = primaryNetworkId; CustomInit(); } @@ -46,24 +40,25 @@ public AzureToAzureCreateNetworkMappingInput(string primaryNetworkId) /// partial void CustomInit(); + /// /// Gets or sets the primary azure vnet Id. /// - [JsonProperty(PropertyName = "primaryNetworkId")] - public string PrimaryNetworkId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryNetworkId")] + public string PrimaryNetworkId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PrimaryNetworkId == null) + if (this.PrimaryNetworkId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryNetworkId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PrimaryNetworkId"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureNetworkMappingSettings.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureNetworkMappingSettings.cs index 52598078ca75..06c384ce85eb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureNetworkMappingSettings.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureNetworkMappingSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class AzureToAzureNetworkMappingSettings : NetworkMappingFabricSpecificSettings { /// - /// Initializes a new instance of the - /// AzureToAzureNetworkMappingSettings class. + /// Initializes a new instance of the AzureToAzureNetworkMappingSettings class. /// public AzureToAzureNetworkMappingSettings() { @@ -29,17 +22,19 @@ public AzureToAzureNetworkMappingSettings() } /// - /// Initializes a new instance of the - /// AzureToAzureNetworkMappingSettings class. + /// Initializes a new instance of the AzureToAzureNetworkMappingSettings class. /// - /// The primary fabric - /// location. - /// The recovery fabric - /// location. + + /// The primary fabric location. + /// + + /// The recovery fabric location. + /// public AzureToAzureNetworkMappingSettings(string primaryFabricLocation = default(string), string recoveryFabricLocation = default(string)) + { - PrimaryFabricLocation = primaryFabricLocation; - RecoveryFabricLocation = recoveryFabricLocation; + this.PrimaryFabricLocation = primaryFabricLocation; + this.RecoveryFabricLocation = recoveryFabricLocation; CustomInit(); } @@ -48,17 +43,17 @@ public AzureToAzureNetworkMappingSettings() /// partial void CustomInit(); + /// /// Gets or sets the primary fabric location. /// - [JsonProperty(PropertyName = "primaryFabricLocation")] - public string PrimaryFabricLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricLocation")] + public string PrimaryFabricLocation {get; set; } /// /// Gets or sets the recovery fabric location. /// - [JsonProperty(PropertyName = "recoveryFabricLocation")] - public string RecoveryFabricLocation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricLocation")] + public string RecoveryFabricLocation {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureUpdateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureUpdateNetworkMappingInput.cs index d1b64b9b520b..02e44c7dfe70 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureUpdateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureUpdateNetworkMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class AzureToAzureUpdateNetworkMappingInput : FabricSpecificUpdateNetworkMappingInput { /// - /// Initializes a new instance of the - /// AzureToAzureUpdateNetworkMappingInput class. + /// Initializes a new instance of the AzureToAzureUpdateNetworkMappingInput class. /// public AzureToAzureUpdateNetworkMappingInput() { @@ -29,13 +22,15 @@ public AzureToAzureUpdateNetworkMappingInput() } /// - /// Initializes a new instance of the - /// AzureToAzureUpdateNetworkMappingInput class. + /// Initializes a new instance of the AzureToAzureUpdateNetworkMappingInput class. /// - /// The primary azure vnet Id. + + /// The primary azure vnet Id. + /// public AzureToAzureUpdateNetworkMappingInput(string primaryNetworkId = default(string)) + { - PrimaryNetworkId = primaryNetworkId; + this.PrimaryNetworkId = primaryNetworkId; CustomInit(); } @@ -44,11 +39,11 @@ public AzureToAzureUpdateNetworkMappingInput() /// partial void CustomInit(); + /// /// Gets or sets the primary azure vnet Id. /// - [JsonProperty(PropertyName = "primaryNetworkId")] - public string PrimaryNetworkId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryNetworkId")] + public string PrimaryNetworkId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureVmSyncedConfigDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureVmSyncedConfigDetails.cs index 8adeafd9a2cd..6f035487d86c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureVmSyncedConfigDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureToAzureVmSyncedConfigDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class AzureToAzureVmSyncedConfigDetails { /// - /// Initializes a new instance of the AzureToAzureVmSyncedConfigDetails - /// class. + /// Initializes a new instance of the AzureToAzureVmSyncedConfigDetails class. /// public AzureToAzureVmSyncedConfigDetails() { @@ -30,15 +21,19 @@ public AzureToAzureVmSyncedConfigDetails() } /// - /// Initializes a new instance of the AzureToAzureVmSyncedConfigDetails - /// class. + /// Initializes a new instance of the AzureToAzureVmSyncedConfigDetails class. /// - /// The Azure VM tags. - /// The Azure VM input endpoints. - public AzureToAzureVmSyncedConfigDetails(IDictionary tags = default(IDictionary), IList inputEndpoints = default(IList)) + + /// The Azure VM tags. + /// + + /// The Azure VM input endpoints. + /// + public AzureToAzureVmSyncedConfigDetails(System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList inputEndpoints = default(System.Collections.Generic.IList)) + { - Tags = tags; - InputEndpoints = inputEndpoints; + this.Tags = tags; + this.InputEndpoints = inputEndpoints; CustomInit(); } @@ -47,17 +42,17 @@ public AzureToAzureVmSyncedConfigDetails() /// partial void CustomInit(); + /// /// Gets or sets the Azure VM tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Gets or sets the Azure VM input endpoints. /// - [JsonProperty(PropertyName = "inputEndpoints")] - public IList InputEndpoints { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "inputEndpoints")] + public System.Collections.Generic.IList InputEndpoints {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureVmDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureVmDiskDetails.cs index 3d320107c4db..74594f3dcd4e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureVmDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/AzureVmDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,32 +23,49 @@ public AzureVmDiskDetails() /// /// Initializes a new instance of the AzureVmDiskDetails class. /// - /// VHD type. - /// The VHD id. - /// The disk resource id. - /// VHD name. - /// Max side in MB. - /// Blob uri of the Azure - /// disk. - /// The target Azure disk name. - /// Ordinal\LunId of the disk for the Azure - /// VM. - /// The DiskEncryptionSet ARM - /// ID. - /// The custom target Azure disk - /// name. - public AzureVmDiskDetails(string vhdType = default(string), string vhdId = default(string), string diskId = default(string), string vhdName = default(string), string maxSizeMB = default(string), string targetDiskLocation = default(string), string targetDiskName = default(string), string lunId = default(string), string diskEncryptionSetId = default(string), string customTargetDiskName = default(string)) + + /// VHD type. + /// + + /// The VHD id. + /// + + /// The disk resource id. + /// + + /// VHD name. + /// + + /// Max side in MB. + /// + + /// Blob uri of the Azure disk. + /// + + /// The target Azure disk name. + /// + + /// Ordinal\LunId of the disk for the Azure VM. + /// + + /// The DiskEncryptionSet ARM ID. + /// + + /// The custom target Azure disk name. + /// + public AzureVmDiskDetails(string vhdType = default(string), string vhdId = default(string), string diskId = default(string), string vhdName = default(string), string maxSizeMb = default(string), string targetDiskLocation = default(string), string targetDiskName = default(string), string lunId = default(string), string diskEncryptionSetId = default(string), string customTargetDiskName = default(string)) + { - VhdType = vhdType; - VhdId = vhdId; - DiskId = diskId; - VhdName = vhdName; - MaxSizeMB = maxSizeMB; - TargetDiskLocation = targetDiskLocation; - TargetDiskName = targetDiskName; - LunId = lunId; - DiskEncryptionSetId = diskEncryptionSetId; - CustomTargetDiskName = customTargetDiskName; + this.VhdType = vhdType; + this.VhdId = vhdId; + this.DiskId = diskId; + this.VhdName = vhdName; + this.MaxSizeMb = maxSizeMb; + this.TargetDiskLocation = targetDiskLocation; + this.TargetDiskName = targetDiskName; + this.LunId = lunId; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.CustomTargetDiskName = customTargetDiskName; CustomInit(); } @@ -63,65 +74,65 @@ public AzureVmDiskDetails() /// partial void CustomInit(); + /// - /// Gets or sets VHD type. + /// Gets or sets vHD type. /// - [JsonProperty(PropertyName = "vhdType")] - public string VhdType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vhdType")] + public string VhdType {get; set; } /// /// Gets or sets the VHD id. /// - [JsonProperty(PropertyName = "vhdId")] - public string VhdId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vhdId")] + public string VhdId {get; set; } /// /// Gets or sets the disk resource id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// - /// Gets or sets VHD name. + /// Gets or sets vHD name. /// - [JsonProperty(PropertyName = "vhdName")] - public string VhdName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vhdName")] + public string VhdName {get; set; } /// /// Gets or sets max side in MB. /// - [JsonProperty(PropertyName = "maxSizeMB")] - public string MaxSizeMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "maxSizeMB")] + public string MaxSizeMb {get; set; } /// /// Gets or sets blob uri of the Azure disk. /// - [JsonProperty(PropertyName = "targetDiskLocation")] - public string TargetDiskLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDiskLocation")] + public string TargetDiskLocation {get; set; } /// /// Gets or sets the target Azure disk name. /// - [JsonProperty(PropertyName = "targetDiskName")] - public string TargetDiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDiskName")] + public string TargetDiskName {get; set; } /// /// Gets or sets ordinal\LunId of the disk for the Azure VM. /// - [JsonProperty(PropertyName = "lunId")] - public string LunId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lunId")] + public string LunId {get; set; } /// /// Gets or sets the DiskEncryptionSet ARM ID. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } /// /// Gets or sets the custom target Azure disk name. /// - [JsonProperty(PropertyName = "customTargetDiskName")] - public string CustomTargetDiskName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "customTargetDiskName")] + public string CustomTargetDiskName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ComputeSizeErrorDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ComputeSizeErrorDetails.cs index d2c96b17df77..16d5551a2277 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ComputeSizeErrorDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ComputeSizeErrorDetails.cs @@ -1,21 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Represents the error used to indicate why the target compute size is - /// not applicable. + /// Represents the error used to indicate why the target compute size is not + /// applicable. /// public partial class ComputeSizeErrorDetails { @@ -30,12 +24,17 @@ public ComputeSizeErrorDetails() /// /// Initializes a new instance of the ComputeSizeErrorDetails class. /// - /// The error message. - /// The severity of the error. + + /// The error message. + /// + + /// The severity of the error. + /// public ComputeSizeErrorDetails(string message = default(string), string severity = default(string)) + { - Message = message; - Severity = severity; + this.Message = message; + this.Severity = severity; CustomInit(); } @@ -44,17 +43,17 @@ public ComputeSizeErrorDetails() /// partial void CustomInit(); + /// /// Gets or sets the error message. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } /// /// Gets or sets the severity of the error. /// - [JsonProperty(PropertyName = "severity")] - public string Severity { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "severity")] + public string Severity {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigurationSettings.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigurationSettings.cs index fd13bbb56e7d..605fed70ac05 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigurationSettings.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigurationSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public ConfigurationSettings() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigureAlertRequest.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigureAlertRequest.cs index 5322ca39bdd3..3406fbeb34a3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigureAlertRequest.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigureAlertRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public ConfigureAlertRequest() /// /// Initializes a new instance of the ConfigureAlertRequest class. /// - /// The properties of a configure alert - /// request. + + /// The properties of a configure alert request. + /// public ConfigureAlertRequest(ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,11 +38,11 @@ public ConfigureAlertRequest() /// partial void CustomInit(); + /// /// Gets or sets the properties of a configure alert request. /// - [JsonProperty(PropertyName = "properties")] - public ConfigureAlertRequestProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ConfigureAlertRequestProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigureAlertRequestProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigureAlertRequestProperties.cs index 9092bc7ffd4a..2fb86cf21ff4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigureAlertRequestProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConfigureAlertRequestProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ConfigureAlertRequestProperties { /// - /// Initializes a new instance of the ConfigureAlertRequestProperties - /// class. + /// Initializes a new instance of the ConfigureAlertRequestProperties class. /// public ConfigureAlertRequestProperties() { @@ -30,19 +21,23 @@ public ConfigureAlertRequestProperties() } /// - /// Initializes a new instance of the ConfigureAlertRequestProperties - /// class. + /// Initializes a new instance of the ConfigureAlertRequestProperties class. /// - /// A value indicating whether to send email - /// to subscription administrator. - /// The custom email address for - /// sending emails. - /// The locale for the email notification. - public ConfigureAlertRequestProperties(string sendToOwners = default(string), IList customEmailAddresses = default(IList), string locale = default(string)) + + /// A value indicating whether to send email to subscription administrator. + /// + + /// The custom email address for sending emails. + /// + + /// The locale for the email notification. + /// + public ConfigureAlertRequestProperties(string sendToOwners = default(string), System.Collections.Generic.IList customEmailAddresses = default(System.Collections.Generic.IList), string locale = default(string)) + { - SendToOwners = sendToOwners; - CustomEmailAddresses = customEmailAddresses; - Locale = locale; + this.SendToOwners = sendToOwners; + this.CustomEmailAddresses = customEmailAddresses; + this.Locale = locale; CustomInit(); } @@ -51,24 +46,24 @@ public ConfigureAlertRequestProperties() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether to send email to - /// subscription administrator. + /// Gets or sets a value indicating whether to send email to subscription + /// administrator. /// - [JsonProperty(PropertyName = "sendToOwners")] - public string SendToOwners { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sendToOwners")] + public string SendToOwners {get; set; } /// /// Gets or sets the custom email address for sending emails. /// - [JsonProperty(PropertyName = "customEmailAddresses")] - public IList CustomEmailAddresses { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "customEmailAddresses")] + public System.Collections.Generic.IList CustomEmailAddresses {get; set; } /// /// Gets or sets the locale for the email notification. /// - [JsonProperty(PropertyName = "locale")] - public string Locale { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "locale")] + public string Locale {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConsistencyCheckTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConsistencyCheckTaskDetails.cs index fa6a49bb6275..0c5c1fd8212f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConsistencyCheckTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ConsistencyCheckTaskDetails.cs @@ -1,30 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// This class contains monitoring details of all the inconsistent - /// Protected Entities in Vmm. + /// This class contains monitoring details of all the inconsistent Protected + /// Entities in Vmm. /// [Newtonsoft.Json.JsonObject("ConsistencyCheckTaskDetails")] public partial class ConsistencyCheckTaskDetails : TaskTypeDetails { /// - /// Initializes a new instance of the ConsistencyCheckTaskDetails - /// class. + /// Initializes a new instance of the ConsistencyCheckTaskDetails class. /// public ConsistencyCheckTaskDetails() { @@ -32,14 +23,15 @@ public ConsistencyCheckTaskDetails() } /// - /// Initializes a new instance of the ConsistencyCheckTaskDetails - /// class. + /// Initializes a new instance of the ConsistencyCheckTaskDetails class. /// - /// The list of inconsistent Vm - /// details. - public ConsistencyCheckTaskDetails(IList vmDetails = default(IList)) + + /// The list of inconsistent Vm details. + /// + public ConsistencyCheckTaskDetails(System.Collections.Generic.IList vmDetails = default(System.Collections.Generic.IList)) + { - VmDetails = vmDetails; + this.VMDetails = vmDetails; CustomInit(); } @@ -48,11 +40,11 @@ public ConsistencyCheckTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the list of inconsistent Vm details. /// - [JsonProperty(PropertyName = "vmDetails")] - public IList VmDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDetails")] + public System.Collections.Generic.IList VMDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateNetworkMappingInput.cs index 6c7b8d441086..ef595c4d10a2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateNetworkMappingInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public CreateNetworkMappingInput() /// /// Initializes a new instance of the CreateNetworkMappingInput class. /// - /// Input properties for creating network - /// mapping. + + /// Input properties for creating network mapping. + /// public CreateNetworkMappingInput(CreateNetworkMappingInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,28 +38,28 @@ public CreateNetworkMappingInput(CreateNetworkMappingInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets input properties for creating network mapping. /// - [JsonProperty(PropertyName = "properties")] - public CreateNetworkMappingInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CreateNetworkMappingInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateNetworkMappingInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateNetworkMappingInputProperties.cs index c76cabe16b55..db6d6abf5e29 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateNetworkMappingInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateNetworkMappingInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreateNetworkMappingInputProperties { /// - /// Initializes a new instance of the - /// CreateNetworkMappingInputProperties class. + /// Initializes a new instance of the CreateNetworkMappingInputProperties class. /// public CreateNetworkMappingInputProperties() { @@ -29,18 +21,23 @@ public CreateNetworkMappingInputProperties() } /// - /// Initializes a new instance of the - /// CreateNetworkMappingInputProperties class. + /// Initializes a new instance of the CreateNetworkMappingInputProperties class. /// - /// Recovery network Id. - /// Recovery fabric Name. - /// Fabric specific input - /// properties. + + /// Recovery fabric Name. + /// + + /// Recovery network Id. + /// + + /// Fabric specific input properties. + /// public CreateNetworkMappingInputProperties(string recoveryNetworkId, string recoveryFabricName = default(string), FabricSpecificCreateNetworkMappingInput fabricSpecificDetails = default(FabricSpecificCreateNetworkMappingInput)) + { - RecoveryFabricName = recoveryFabricName; - RecoveryNetworkId = recoveryNetworkId; - FabricSpecificDetails = fabricSpecificDetails; + this.RecoveryFabricName = recoveryFabricName; + this.RecoveryNetworkId = recoveryNetworkId; + this.FabricSpecificDetails = fabricSpecificDetails; CustomInit(); } @@ -49,36 +46,39 @@ public CreateNetworkMappingInputProperties() /// partial void CustomInit(); + /// /// Gets or sets recovery fabric Name. /// - [JsonProperty(PropertyName = "recoveryFabricName")] - public string RecoveryFabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricName")] + public string RecoveryFabricName {get; set; } /// /// Gets or sets recovery network Id. /// - [JsonProperty(PropertyName = "recoveryNetworkId")] - public string RecoveryNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNetworkId")] + public string RecoveryNetworkId {get; set; } /// /// Gets or sets fabric specific input properties. /// - [JsonProperty(PropertyName = "fabricSpecificDetails")] - public FabricSpecificCreateNetworkMappingInput FabricSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricSpecificDetails")] + public FabricSpecificCreateNetworkMappingInput FabricSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryNetworkId == null) + if (this.RecoveryNetworkId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryNetworkId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryNetworkId"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreatePolicyInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreatePolicyInput.cs index fc2b61396071..a7e4897a6d8f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreatePolicyInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreatePolicyInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public CreatePolicyInput() /// /// Initializes a new instance of the CreatePolicyInput class. /// - /// Policy creation properties. + + /// Policy creation properties. + /// public CreatePolicyInput(CreatePolicyInputProperties properties = default(CreatePolicyInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public CreatePolicyInput() /// partial void CustomInit(); + /// /// Gets or sets policy creation properties. /// - [JsonProperty(PropertyName = "properties")] - public CreatePolicyInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CreatePolicyInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreatePolicyInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreatePolicyInputProperties.cs index f387916cc979..e697604bc114 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreatePolicyInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreatePolicyInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreatePolicyInputProperties { /// - /// Initializes a new instance of the CreatePolicyInputProperties - /// class. + /// Initializes a new instance of the CreatePolicyInputProperties class. /// public CreatePolicyInputProperties() { @@ -28,14 +21,15 @@ public CreatePolicyInputProperties() } /// - /// Initializes a new instance of the CreatePolicyInputProperties - /// class. + /// Initializes a new instance of the CreatePolicyInputProperties class. /// - /// The - /// ReplicationProviderSettings. + + /// The ReplicationProviderSettings. + /// public CreatePolicyInputProperties(PolicyProviderSpecificInput providerSpecificInput = default(PolicyProviderSpecificInput)) + { - ProviderSpecificInput = providerSpecificInput; + this.ProviderSpecificInput = providerSpecificInput; CustomInit(); } @@ -44,11 +38,11 @@ public CreatePolicyInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the ReplicationProviderSettings. /// - [JsonProperty(PropertyName = "providerSpecificInput")] - public PolicyProviderSpecificInput ProviderSpecificInput { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificInput")] + public PolicyProviderSpecificInput ProviderSpecificInput {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerInput.cs index c361a60f2d3c..fd177c95b57d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreateProtectionContainerInput { /// - /// Initializes a new instance of the CreateProtectionContainerInput - /// class. + /// Initializes a new instance of the CreateProtectionContainerInput class. /// public CreateProtectionContainerInput() { @@ -28,14 +21,15 @@ public CreateProtectionContainerInput() } /// - /// Initializes a new instance of the CreateProtectionContainerInput - /// class. + /// Initializes a new instance of the CreateProtectionContainerInput class. /// - /// Create protection container input - /// properties. + + /// Create protection container input properties. + /// public CreateProtectionContainerInput(CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -44,11 +38,11 @@ public CreateProtectionContainerInput() /// partial void CustomInit(); + /// /// Gets or sets create protection container input properties. /// - [JsonProperty(PropertyName = "properties")] - public CreateProtectionContainerInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CreateProtectionContainerInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerInputProperties.cs index 2c73ca402146..9d4a3b1660ae 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerInputProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreateProtectionContainerInputProperties { /// - /// Initializes a new instance of the - /// CreateProtectionContainerInputProperties class. + /// Initializes a new instance of the CreateProtectionContainerInputProperties class. /// public CreateProtectionContainerInputProperties() { @@ -30,14 +21,15 @@ public CreateProtectionContainerInputProperties() } /// - /// Initializes a new instance of the - /// CreateProtectionContainerInputProperties class. + /// Initializes a new instance of the CreateProtectionContainerInputProperties class. /// - /// Provider specific inputs for - /// container creation. - public CreateProtectionContainerInputProperties(IList providerSpecificInput = default(IList)) + + /// Provider specific inputs for container creation. + /// + public CreateProtectionContainerInputProperties(System.Collections.Generic.IList providerSpecificInput = default(System.Collections.Generic.IList)) + { - ProviderSpecificInput = providerSpecificInput; + this.ProviderSpecificInput = providerSpecificInput; CustomInit(); } @@ -46,11 +38,11 @@ public CreateProtectionContainerInputProperties() /// partial void CustomInit(); + /// /// Gets or sets provider specific inputs for container creation. /// - [JsonProperty(PropertyName = "providerSpecificInput")] - public IList ProviderSpecificInput { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificInput")] + public System.Collections.Generic.IList ProviderSpecificInput {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerMappingInput.cs index eaaa74b3b440..fa3b51150814 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreateProtectionContainerMappingInput { /// - /// Initializes a new instance of the - /// CreateProtectionContainerMappingInput class. + /// Initializes a new instance of the CreateProtectionContainerMappingInput class. /// public CreateProtectionContainerMappingInput() { @@ -28,14 +21,15 @@ public CreateProtectionContainerMappingInput() } /// - /// Initializes a new instance of the - /// CreateProtectionContainerMappingInput class. + /// Initializes a new instance of the CreateProtectionContainerMappingInput class. /// - /// Configure protection input - /// properties. + + /// Configure protection input properties. + /// public CreateProtectionContainerMappingInput(CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -44,11 +38,11 @@ public CreateProtectionContainerMappingInput() /// partial void CustomInit(); + /// /// Gets or sets configure protection input properties. /// - [JsonProperty(PropertyName = "properties")] - public CreateProtectionContainerMappingInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CreateProtectionContainerMappingInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerMappingInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerMappingInputProperties.cs index a86fb20c9eb4..f65927e43816 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerMappingInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionContainerMappingInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreateProtectionContainerMappingInputProperties { /// - /// Initializes a new instance of the - /// CreateProtectionContainerMappingInputProperties class. + /// Initializes a new instance of the CreateProtectionContainerMappingInputProperties class. /// public CreateProtectionContainerMappingInputProperties() { @@ -28,19 +21,23 @@ public CreateProtectionContainerMappingInputProperties() } /// - /// Initializes a new instance of the - /// CreateProtectionContainerMappingInputProperties class. + /// Initializes a new instance of the CreateProtectionContainerMappingInputProperties class. /// - /// The target unique - /// protection container name. - /// Applicable policy. - /// Provider specific input for - /// pairing. + + /// The target unique protection container name. + /// + + /// Applicable policy. + /// + + /// Provider specific input for pairing. + /// public CreateProtectionContainerMappingInputProperties(string targetProtectionContainerId = default(string), string policyId = default(string), ReplicationProviderSpecificContainerMappingInput providerSpecificInput = default(ReplicationProviderSpecificContainerMappingInput)) + { - TargetProtectionContainerId = targetProtectionContainerId; - PolicyId = policyId; - ProviderSpecificInput = providerSpecificInput; + this.TargetProtectionContainerId = targetProtectionContainerId; + this.PolicyId = policyId; + this.ProviderSpecificInput = providerSpecificInput; CustomInit(); } @@ -49,23 +46,23 @@ public CreateProtectionContainerMappingInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the target unique protection container name. /// - [JsonProperty(PropertyName = "targetProtectionContainerId")] - public string TargetProtectionContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProtectionContainerId")] + public string TargetProtectionContainerId {get; set; } /// /// Gets or sets applicable policy. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// /// Gets or sets provider specific input for pairing. /// - [JsonProperty(PropertyName = "providerSpecificInput")] - public ReplicationProviderSpecificContainerMappingInput ProviderSpecificInput { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificInput")] + public ReplicationProviderSpecificContainerMappingInput ProviderSpecificInput {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentInput.cs index 2489b26446c4..3fdda172dc8b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreateProtectionIntentInput { /// - /// Initializes a new instance of the CreateProtectionIntentInput - /// class. + /// Initializes a new instance of the CreateProtectionIntentInput class. /// public CreateProtectionIntentInput() { @@ -28,14 +21,15 @@ public CreateProtectionIntentInput() } /// - /// Initializes a new instance of the CreateProtectionIntentInput - /// class. + /// Initializes a new instance of the CreateProtectionIntentInput class. /// - /// Create protection intent input - /// properties. + + /// Create protection intent input properties. + /// public CreateProtectionIntentInput(CreateProtectionIntentProperties properties = default(CreateProtectionIntentProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -44,11 +38,11 @@ public CreateProtectionIntentInput() /// partial void CustomInit(); + /// /// Gets or sets create protection intent input properties. /// - [JsonProperty(PropertyName = "properties")] - public CreateProtectionIntentProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CreateProtectionIntentProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentProperties.cs index 7a410208e8b7..3ef5ed92de4c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreateProtectionIntentProperties { /// - /// Initializes a new instance of the CreateProtectionIntentProperties - /// class. + /// Initializes a new instance of the CreateProtectionIntentProperties class. /// public CreateProtectionIntentProperties() { @@ -28,15 +21,16 @@ public CreateProtectionIntentProperties() } /// - /// Initializes a new instance of the CreateProtectionIntentProperties - /// class. + /// Initializes a new instance of the CreateProtectionIntentProperties class. /// - /// The ReplicationProviderInput. - /// For A2A provider, it will be A2ACreateProtectionIntentInput - /// object. + + /// The ReplicationProviderInput. For A2A provider, it will be + /// A2ACreateProtectionIntentInput object. + /// public CreateProtectionIntentProperties(CreateProtectionIntentProviderSpecificDetails providerSpecificDetails = default(CreateProtectionIntentProviderSpecificDetails)) + { - ProviderSpecificDetails = providerSpecificDetails; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -45,12 +39,12 @@ public CreateProtectionIntentProperties() /// partial void CustomInit(); + /// - /// Gets or sets the ReplicationProviderInput. For A2A provider, it - /// will be A2ACreateProtectionIntentInput object. + /// Gets or sets the ReplicationProviderInput. For A2A provider, it will be + /// A2ACreateProtectionIntentInput object. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public CreateProtectionIntentProviderSpecificDetails ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public CreateProtectionIntentProviderSpecificDetails ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentProviderSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentProviderSpecificDetails.cs index 96de94d87c63..0dce8b6b1b7f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentProviderSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateProtectionIntentProviderSpecificDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreateProtectionIntentProviderSpecificDetails { /// - /// Initializes a new instance of the - /// CreateProtectionIntentProviderSpecificDetails class. + /// Initializes a new instance of the CreateProtectionIntentProviderSpecificDetails class. /// public CreateProtectionIntentProviderSpecificDetails() { @@ -35,4 +28,4 @@ public CreateProtectionIntentProviderSpecificDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateRecoveryPlanInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateRecoveryPlanInput.cs index c5271d98baf1..2fe6b2375bcb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateRecoveryPlanInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateRecoveryPlanInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +23,13 @@ public CreateRecoveryPlanInput() /// /// Initializes a new instance of the CreateRecoveryPlanInput class. /// - /// Recovery plan creation properties. + + /// Recovery plan creation properties. + /// public CreateRecoveryPlanInput(CreateRecoveryPlanInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,28 +38,28 @@ public CreateRecoveryPlanInput(CreateRecoveryPlanInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets recovery plan creation properties. /// - [JsonProperty(PropertyName = "properties")] - public CreateRecoveryPlanInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public CreateRecoveryPlanInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateRecoveryPlanInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateRecoveryPlanInputProperties.cs index c101c355d8e2..224208018e54 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateRecoveryPlanInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CreateRecoveryPlanInputProperties.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class CreateRecoveryPlanInputProperties { /// - /// Initializes a new instance of the CreateRecoveryPlanInputProperties - /// class. + /// Initializes a new instance of the CreateRecoveryPlanInputProperties class. /// public CreateRecoveryPlanInputProperties() { @@ -31,24 +21,31 @@ public CreateRecoveryPlanInputProperties() } /// - /// Initializes a new instance of the CreateRecoveryPlanInputProperties - /// class. + /// Initializes a new instance of the CreateRecoveryPlanInputProperties class. /// - /// The primary fabric Id. - /// The recovery fabric Id. - /// The recovery plan groups. - /// The failover deployment - /// model. Possible values include: 'NotApplicable', 'Classic', - /// 'ResourceManager' - /// The provider specific - /// input. - public CreateRecoveryPlanInputProperties(string primaryFabricId, string recoveryFabricId, IList groups, string failoverDeploymentModel = default(string), IList providerSpecificInput = default(IList)) + + /// The primary fabric Id. + /// + + /// The recovery fabric Id. + /// + + /// The failover deployment model. + /// Possible values include: 'NotApplicable', 'Classic', 'ResourceManager' + + /// The recovery plan groups. + /// + + /// The provider specific input. + /// + public CreateRecoveryPlanInputProperties(string primaryFabricId, string recoveryFabricId, System.Collections.Generic.IList groups, string failoverDeploymentModel = default(string), System.Collections.Generic.IList providerSpecificInput = default(System.Collections.Generic.IList)) + { - PrimaryFabricId = primaryFabricId; - RecoveryFabricId = recoveryFabricId; - FailoverDeploymentModel = failoverDeploymentModel; - Groups = groups; - ProviderSpecificInput = providerSpecificInput; + this.PrimaryFabricId = primaryFabricId; + this.RecoveryFabricId = recoveryFabricId; + this.FailoverDeploymentModel = failoverDeploymentModel; + this.Groups = groups; + this.ProviderSpecificInput = providerSpecificInput; CustomInit(); } @@ -57,60 +54,62 @@ public CreateRecoveryPlanInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the primary fabric Id. /// - [JsonProperty(PropertyName = "primaryFabricId")] - public string PrimaryFabricId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricId")] + public string PrimaryFabricId {get; set; } /// /// Gets or sets the recovery fabric Id. /// - [JsonProperty(PropertyName = "recoveryFabricId")] - public string RecoveryFabricId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricId")] + public string RecoveryFabricId {get; set; } /// - /// Gets or sets the failover deployment model. Possible values - /// include: 'NotApplicable', 'Classic', 'ResourceManager' + /// Gets or sets the failover deployment model. Possible values include: 'NotApplicable', 'Classic', 'ResourceManager' /// - [JsonProperty(PropertyName = "failoverDeploymentModel")] - public string FailoverDeploymentModel { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDeploymentModel")] + public string FailoverDeploymentModel {get; set; } /// /// Gets or sets the recovery plan groups. /// - [JsonProperty(PropertyName = "groups")] - public IList Groups { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "groups")] + public System.Collections.Generic.IList Groups {get; set; } /// /// Gets or sets the provider specific input. /// - [JsonProperty(PropertyName = "providerSpecificInput")] - public IList ProviderSpecificInput { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificInput")] + public System.Collections.Generic.IList ProviderSpecificInput {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PrimaryFabricId == null) + if (this.PrimaryFabricId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryFabricId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PrimaryFabricId"); } - if (RecoveryFabricId == null) + if (this.RecoveryFabricId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryFabricId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryFabricId"); } - if (Groups == null) + if (this.Groups == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Groups"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Groups"); } - if (Groups != null) + + + + if (this.Groups != null) { - foreach (var element in Groups) + foreach (var element in this.Groups) { if (element != null) { @@ -118,6 +117,7 @@ public virtual void Validate() } } } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CriticalJobHistoryDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CriticalJobHistoryDetails.cs index df24d61f771d..c5843d88122c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CriticalJobHistoryDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CriticalJobHistoryDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,25 @@ public CriticalJobHistoryDetails() /// /// Initializes a new instance of the CriticalJobHistoryDetails class. /// - /// The job name. - /// The ARM Id of the job being executed. - /// The start time of the job. - /// The job state. + + /// The job name. + /// + + /// The ARM Id of the job being executed. + /// + + /// The start time of the job. + /// + + /// The job state. + /// public CriticalJobHistoryDetails(string jobName = default(string), string jobId = default(string), System.DateTime? startTime = default(System.DateTime?), string jobStatus = default(string)) + { - JobName = jobName; - JobId = jobId; - StartTime = startTime; - JobStatus = jobStatus; + this.JobName = jobName; + this.JobId = jobId; + this.StartTime = startTime; + this.JobStatus = jobStatus; CustomInit(); } @@ -47,29 +50,29 @@ public CriticalJobHistoryDetails() /// partial void CustomInit(); + /// /// Gets the job name. /// - [JsonProperty(PropertyName = "jobName")] - public string JobName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobName")] + public string JobName {get; private set; } /// /// Gets the ARM Id of the job being executed. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; private set; } /// /// Gets the start time of the job. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; private set; } /// /// Gets the job state. /// - [JsonProperty(PropertyName = "jobStatus")] - public string JobStatus { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "jobStatus")] + public string JobStatus {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CurrentJobDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CurrentJobDetails.cs index 33fa95e5e0f3..0596026fefdf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CurrentJobDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CurrentJobDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,21 @@ public CurrentJobDetails() /// /// Initializes a new instance of the CurrentJobDetails class. /// - /// The job name. - /// The ARM Id of the job being executed. - /// The start time of the job. + + /// The job name. + /// + + /// The ARM Id of the job being executed. + /// + + /// The start time of the job. + /// public CurrentJobDetails(string jobName = default(string), string jobId = default(string), System.DateTime? startTime = default(System.DateTime?)) + { - JobName = jobName; - JobId = jobId; - StartTime = startTime; + this.JobName = jobName; + this.JobId = jobId; + this.StartTime = startTime; CustomInit(); } @@ -45,23 +46,23 @@ public CurrentJobDetails() /// partial void CustomInit(); + /// /// Gets the job name. /// - [JsonProperty(PropertyName = "jobName")] - public string JobName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobName")] + public string JobName {get; private set; } /// /// Gets the ARM Id of the job being executed. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; private set; } /// /// Gets the start time of the job. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CurrentScenarioDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CurrentScenarioDetails.cs index d88ce5499f12..fd5c072c5253 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CurrentScenarioDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/CurrentScenarioDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,21 @@ public CurrentScenarioDetails() /// /// Initializes a new instance of the CurrentScenarioDetails class. /// - /// Scenario name. - /// ARM Id of the job being executed. - /// Start time of the workflow. + + /// Scenario name. + /// + + /// ARM Id of the job being executed. + /// + + /// Start time of the workflow. + /// public CurrentScenarioDetails(string scenarioName = default(string), string jobId = default(string), System.DateTime? startTime = default(System.DateTime?)) + { - ScenarioName = scenarioName; - JobId = jobId; - StartTime = startTime; + this.ScenarioName = scenarioName; + this.JobId = jobId; + this.StartTime = startTime; CustomInit(); } @@ -45,23 +46,23 @@ public CurrentScenarioDetails() /// partial void CustomInit(); + /// /// Gets or sets scenario name. /// - [JsonProperty(PropertyName = "scenarioName")] - public string ScenarioName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scenarioName")] + public string ScenarioName {get; set; } /// - /// Gets or sets ARM Id of the job being executed. + /// Gets or sets aRM Id of the job being executed. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; set; } /// /// Gets or sets start time of the workflow. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DataStore.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DataStore.cs index 7709f66edcfc..cd181e5aa43b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DataStore.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DataStore.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,19 +23,29 @@ public DataStore() /// /// Initializes a new instance of the DataStore class. /// - /// The symbolic name of data store. - /// The uuid of data store. - /// The capacity of data store in GBs. - /// The free space of data store in - /// GBs. - /// The type of data store. + + /// The symbolic name of data store. + /// + + /// The uuid of data store. + /// + + /// The capacity of data store in GBs. + /// + + /// The free space of data store in GBs. + /// + + /// The type of data store. + /// public DataStore(string symbolicName = default(string), string uuid = default(string), string capacity = default(string), string freeSpace = default(string), string type = default(string)) + { - SymbolicName = symbolicName; - Uuid = uuid; - Capacity = capacity; - FreeSpace = freeSpace; - Type = type; + this.SymbolicName = symbolicName; + this.Uuid = uuid; + this.Capacity = capacity; + this.FreeSpace = freeSpace; + this.Type = type; CustomInit(); } @@ -50,35 +54,35 @@ public DataStore() /// partial void CustomInit(); + /// /// Gets or sets the symbolic name of data store. /// - [JsonProperty(PropertyName = "symbolicName")] - public string SymbolicName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "symbolicName")] + public string SymbolicName {get; set; } /// /// Gets or sets the uuid of data store. /// - [JsonProperty(PropertyName = "uuid")] - public string Uuid { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "uuid")] + public string Uuid {get; set; } /// /// Gets or sets the capacity of data store in GBs. /// - [JsonProperty(PropertyName = "capacity")] - public string Capacity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "capacity")] + public string Capacity {get; set; } /// /// Gets or sets the free space of data store in GBs. /// - [JsonProperty(PropertyName = "freeSpace")] - public string FreeSpace { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "freeSpace")] + public string FreeSpace {get; set; } /// /// Gets or sets the type of data store. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DataSyncStatus.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DataSyncStatus.cs index 31338d76a232..285a25ddd325 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DataSyncStatus.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DataSyncStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for DataSyncStatus. /// + + public static class DataSyncStatus { public const string ForDownTime = "ForDownTime"; public const string ForSynchronization = "ForSynchronization"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionInput.cs index 4705b72d94e8..27fcfeb111b8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public DisableProtectionInput() /// /// Initializes a new instance of the DisableProtectionInput class. /// - /// Disable protection input - /// properties. + + /// Disable protection input properties. + /// public DisableProtectionInput(DisableProtectionInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,24 +38,25 @@ public DisableProtectionInput(DisableProtectionInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets disable protection input properties. /// - [JsonProperty(PropertyName = "properties")] - public DisableProtectionInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public DisableProtectionInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionInputProperties.cs index e556f42b4112..0363d9765475 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class DisableProtectionInputProperties { /// - /// Initializes a new instance of the DisableProtectionInputProperties - /// class. + /// Initializes a new instance of the DisableProtectionInputProperties class. /// public DisableProtectionInputProperties() { @@ -28,18 +21,20 @@ public DisableProtectionInputProperties() } /// - /// Initializes a new instance of the DisableProtectionInputProperties - /// class. + /// Initializes a new instance of the DisableProtectionInputProperties class. /// - /// Disable protection reason. It - /// can have values NotSpecified/MigrationComplete. Possible values - /// include: 'NotSpecified', 'MigrationComplete' - /// Replication provider - /// specific input. + + /// Disable protection reason. It can have values + /// NotSpecified/MigrationComplete. + /// Possible values include: 'NotSpecified', 'MigrationComplete' + + /// Replication provider specific input. + /// public DisableProtectionInputProperties(string disableProtectionReason = default(string), DisableProtectionProviderSpecificInput replicationProviderInput = default(DisableProtectionProviderSpecificInput)) + { - DisableProtectionReason = disableProtectionReason; - ReplicationProviderInput = replicationProviderInput; + this.DisableProtectionReason = disableProtectionReason; + this.ReplicationProviderInput = replicationProviderInput; CustomInit(); } @@ -48,19 +43,18 @@ public DisableProtectionInputProperties() /// partial void CustomInit(); + /// /// Gets or sets disable protection reason. It can have values - /// NotSpecified/MigrationComplete. Possible values include: - /// 'NotSpecified', 'MigrationComplete' + /// NotSpecified/MigrationComplete. Possible values include: 'NotSpecified', 'MigrationComplete' /// - [JsonProperty(PropertyName = "disableProtectionReason")] - public string DisableProtectionReason { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "disableProtectionReason")] + public string DisableProtectionReason {get; set; } /// /// Gets or sets replication provider specific input. /// - [JsonProperty(PropertyName = "replicationProviderInput")] - public DisableProtectionProviderSpecificInput ReplicationProviderInput { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationProviderInput")] + public DisableProtectionProviderSpecificInput ReplicationProviderInput {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionProviderSpecificInput.cs index 82f31c7899f8..367dd833fd25 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class DisableProtectionProviderSpecificInput { /// - /// Initializes a new instance of the - /// DisableProtectionProviderSpecificInput class. + /// Initializes a new instance of the DisableProtectionProviderSpecificInput class. /// public DisableProtectionProviderSpecificInput() { @@ -35,4 +28,4 @@ public DisableProtectionProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionReason.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionReason.cs index 84e81ad0a053..0590b015ae17 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionReason.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DisableProtectionReason.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for DisableProtectionReason. /// + + public static class DisableProtectionReason { public const string NotSpecified = "NotSpecified"; public const string MigrationComplete = "MigrationComplete"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiscoverProtectableItemRequest.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiscoverProtectableItemRequest.cs index 78861322fcba..46e122e68b22 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiscoverProtectableItemRequest.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiscoverProtectableItemRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class DiscoverProtectableItemRequest { /// - /// Initializes a new instance of the DiscoverProtectableItemRequest - /// class. + /// Initializes a new instance of the DiscoverProtectableItemRequest class. /// public DiscoverProtectableItemRequest() { @@ -28,14 +21,15 @@ public DiscoverProtectableItemRequest() } /// - /// Initializes a new instance of the DiscoverProtectableItemRequest - /// class. + /// Initializes a new instance of the DiscoverProtectableItemRequest class. /// - /// The properties of a discover protectable - /// item request. + + /// The properties of a discover protectable item request. + /// public DiscoverProtectableItemRequest(DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -44,11 +38,11 @@ public DiscoverProtectableItemRequest() /// partial void CustomInit(); + /// /// Gets or sets the properties of a discover protectable item request. /// - [JsonProperty(PropertyName = "properties")] - public DiscoverProtectableItemRequestProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public DiscoverProtectableItemRequestProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiscoverProtectableItemRequestProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiscoverProtectableItemRequestProperties.cs index 7bc71533739a..bbc6877c4eb2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiscoverProtectableItemRequestProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiscoverProtectableItemRequestProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class DiscoverProtectableItemRequestProperties { /// - /// Initializes a new instance of the - /// DiscoverProtectableItemRequestProperties class. + /// Initializes a new instance of the DiscoverProtectableItemRequestProperties class. /// public DiscoverProtectableItemRequestProperties() { @@ -28,19 +21,23 @@ public DiscoverProtectableItemRequestProperties() } /// - /// Initializes a new instance of the - /// DiscoverProtectableItemRequestProperties class. + /// Initializes a new instance of the DiscoverProtectableItemRequestProperties class. /// - /// The friendly name of the physical - /// machine. - /// The IP address of the physical machine to - /// be discovered. - /// The OS type on the physical machine. + + /// The friendly name of the physical machine. + /// + + /// The IP address of the physical machine to be discovered. + /// + + /// The OS type on the physical machine. + /// public DiscoverProtectableItemRequestProperties(string friendlyName = default(string), string ipAddress = default(string), string osType = default(string)) + { - FriendlyName = friendlyName; - IpAddress = ipAddress; - OsType = osType; + this.FriendlyName = friendlyName; + this.IPAddress = ipAddress; + this.OSType = osType; CustomInit(); } @@ -49,24 +46,23 @@ public DiscoverProtectableItemRequestProperties() /// partial void CustomInit(); + /// /// Gets or sets the friendly name of the physical machine. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets the IP address of the physical machine to be - /// discovered. + /// Gets or sets the IP address of the physical machine to be discovered. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the OS type on the physical machine. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskAccountType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskAccountType.cs index 1b333ab2f32d..6d2aa5b7aabe 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskAccountType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskAccountType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for DiskAccountType. /// + + public static class DiskAccountType { public const string StandardLRS = "Standard_LRS"; public const string PremiumLRS = "Premium_LRS"; public const string StandardSSDLRS = "StandardSSD_LRS"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskDetails.cs index cc40139a924d..b55de7201af4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,25 @@ public DiskDetails() /// /// Initializes a new instance of the DiskDetails class. /// - /// The hard disk max size in MB. - /// The type of the volume. - /// The VHD Id. - /// The VHD name. - public DiskDetails(long? maxSizeMB = default(long?), string vhdType = default(string), string vhdId = default(string), string vhdName = default(string)) + + /// The hard disk max size in MB. + /// + + /// The type of the volume. + /// + + /// The VHD Id. + /// + + /// The VHD name. + /// + public DiskDetails(long? maxSizeMb = default(long?), string vhdType = default(string), string vhdId = default(string), string vhdName = default(string)) + { - MaxSizeMB = maxSizeMB; - VhdType = vhdType; - VhdId = vhdId; - VhdName = vhdName; + this.MaxSizeMb = maxSizeMb; + this.VhdType = vhdType; + this.VhdId = vhdId; + this.VhdName = vhdName; CustomInit(); } @@ -47,29 +50,29 @@ public DiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the hard disk max size in MB. /// - [JsonProperty(PropertyName = "maxSizeMB")] - public long? MaxSizeMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "maxSizeMB")] + public long? MaxSizeMb {get; set; } /// /// Gets or sets the type of the volume. /// - [JsonProperty(PropertyName = "vhdType")] - public string VhdType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vhdType")] + public string VhdType {get; set; } /// /// Gets or sets the VHD Id. /// - [JsonProperty(PropertyName = "vhdId")] - public string VhdId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vhdId")] + public string VhdId {get; set; } /// /// Gets or sets the VHD name. /// - [JsonProperty(PropertyName = "vhdName")] - public string VhdName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vhdName")] + public string VhdName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskEncryptionInfo.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskEncryptionInfo.cs index b974a7123db1..82ecb16e6bf6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskEncryptionInfo.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskEncryptionInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,17 @@ public DiskEncryptionInfo() /// /// Initializes a new instance of the DiskEncryptionInfo class. /// - /// The recovery KeyVault reference - /// for secret. - /// The recovery KeyVault reference - /// for key. + + /// The recovery KeyVault reference for secret. + /// + + /// The recovery KeyVault reference for key. + /// public DiskEncryptionInfo(DiskEncryptionKeyInfo diskEncryptionKeyInfo = default(DiskEncryptionKeyInfo), KeyEncryptionKeyInfo keyEncryptionKeyInfo = default(KeyEncryptionKeyInfo)) + { - DiskEncryptionKeyInfo = diskEncryptionKeyInfo; - KeyEncryptionKeyInfo = keyEncryptionKeyInfo; + this.DiskEncryptionKeyInfo = diskEncryptionKeyInfo; + this.KeyEncryptionKeyInfo = keyEncryptionKeyInfo; CustomInit(); } @@ -45,17 +42,17 @@ public DiskEncryptionInfo() /// partial void CustomInit(); + /// /// Gets or sets the recovery KeyVault reference for secret. /// - [JsonProperty(PropertyName = "diskEncryptionKeyInfo")] - public DiskEncryptionKeyInfo DiskEncryptionKeyInfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionKeyInfo")] + public DiskEncryptionKeyInfo DiskEncryptionKeyInfo {get; set; } /// /// Gets or sets the recovery KeyVault reference for key. /// - [JsonProperty(PropertyName = "keyEncryptionKeyInfo")] - public KeyEncryptionKeyInfo KeyEncryptionKeyInfo { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "keyEncryptionKeyInfo")] + public KeyEncryptionKeyInfo KeyEncryptionKeyInfo {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskEncryptionKeyInfo.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskEncryptionKeyInfo.cs index 9125876971ce..9626ec4b22f1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskEncryptionKeyInfo.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskEncryptionKeyInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,13 +24,17 @@ public DiskEncryptionKeyInfo() /// /// Initializes a new instance of the DiskEncryptionKeyInfo class. /// - /// The secret url / identifier. - /// The KeyVault resource ARM id - /// for secret. + + /// The secret url / identifier. + /// + + /// The KeyVault resource ARM id for secret. + /// public DiskEncryptionKeyInfo(string secretIdentifier = default(string), string keyVaultResourceArmId = default(string)) + { - SecretIdentifier = secretIdentifier; - KeyVaultResourceArmId = keyVaultResourceArmId; + this.SecretIdentifier = secretIdentifier; + this.KeyVaultResourceArmId = keyVaultResourceArmId; CustomInit(); } @@ -45,17 +43,17 @@ public DiskEncryptionKeyInfo() /// partial void CustomInit(); + /// /// Gets or sets the secret url / identifier. /// - [JsonProperty(PropertyName = "secretIdentifier")] - public string SecretIdentifier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secretIdentifier")] + public string SecretIdentifier {get; set; } /// /// Gets or sets the KeyVault resource ARM id for secret. /// - [JsonProperty(PropertyName = "keyVaultResourceArmId")] - public string KeyVaultResourceArmId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultResourceArmId")] + public string KeyVaultResourceArmId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskReplicationProgressHealth.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskReplicationProgressHealth.cs index f610ba6cec09..4f68ffd66003 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskReplicationProgressHealth.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskReplicationProgressHealth.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for DiskReplicationProgressHealth. /// + + public static class DiskReplicationProgressHealth { public const string None = "None"; @@ -22,4 +19,4 @@ public static class DiskReplicationProgressHealth public const string NoProgress = "NoProgress"; public const string Queued = "Queued"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskVolumeDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskVolumeDetails.cs index 474ec2d817aa..2679e9bf5744 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskVolumeDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DiskVolumeDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public DiskVolumeDetails() /// /// Initializes a new instance of the DiskVolumeDetails class. /// - /// The volume label. - /// The volume name. + + /// The volume label. + /// + + /// The volume name. + /// public DiskVolumeDetails(string label = default(string), string name = default(string)) + { - Label = label; - Name = name; + this.Label = label; + this.Name = name; CustomInit(); } @@ -43,17 +42,17 @@ public DiskVolumeDetails() /// partial void CustomInit(); + /// /// Gets or sets the volume label. /// - [JsonProperty(PropertyName = "label")] - public string Label { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "label")] + public string Label {get; set; } /// /// Gets or sets the volume name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Display.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Display.cs index 9ab745cb4930..dc8d4061c20e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Display.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Display.cs @@ -1,24 +1,17 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Contains the localized display information for this particular - /// operation / action. These value will be used by several clients for (1) - /// custom role definitions for RBAC; (2) complex query filters for the - /// event service; and (3) audit history / records for management - /// operations. + /// Contains the localized display information for this particular operation / + /// action. These value will be used by several clients for (1) custom role + /// definitions for RBAC; (2) complex query filters for the event service; and + /// (3) audit history / records for management operations. /// public partial class Display { @@ -33,39 +26,44 @@ public Display() /// /// Initializes a new instance of the Display class. /// - /// The provider. The localized friendly form of - /// the resource provider name - it is expected to also include the - /// publisher/company responsible. It should use Title Casing and begin - /// with "Microsoft" for 1st party services. e.g. "Microsoft Monitoring - /// Insights" or "Microsoft Compute.". - /// The resource. The localized friendly form of - /// the resource related to this action/operation - it should match the - /// public documentation for the resource provider. It should use Title - /// Casing. This value should be unique for a particular URL type (e.g. - /// nested types should *not* reuse their parent's display.resource - /// field). e.g. "Virtual Machines" or "Scheduler Job Collections", or - /// "Virtual Machine VM Sizes" or "Scheduler Jobs". - /// The operation. The localized friendly name - /// for the operation, as it should be shown to the user. It should be - /// concise (to fit in drop downs) but clear (i.e. self-documenting). - /// It should use Title Casing. Prescriptive guidance: Read Create or - /// Update Delete 'ActionName'. - /// The description. The localized friendly - /// description for the operation, as it should be shown to the user. - /// It should be thorough, yet concise - it will be used in tool tips - /// and detailed views. Prescriptive guidance for namespaces: Read any - /// 'display.provider' resource Create or Update any 'display.provider' - /// resource Delete any 'display.provider' resource Perform any other - /// action on any 'display.provider' resource Prescriptive guidance for - /// namespaces: Read any 'display.resource' Create or Update any - /// 'display.resource' Delete any 'display.resource' 'ActionName' any - /// 'display.resources'. + + /// The provider. The localized friendly form of the resource provider name - + /// it is expected to also include the publisher/company responsible. It should + /// use Title Casing and begin with "Microsoft" for 1st party services. e.g. + /// "Microsoft Monitoring Insights" or "Microsoft Compute.". + /// + + /// The resource. The localized friendly form of the resource related to this + /// action/operation - it should match the public documentation for the + /// resource provider. It should use Title Casing. This value should be unique + /// for a particular URL type (e.g. nested types should *not* reuse their + /// parent's display.resource field). e.g. "Virtual Machines" or "Scheduler Job + /// Collections", or "Virtual Machine VM Sizes" or "Scheduler Jobs". + /// + + /// The operation. The localized friendly name for the operation, as it should + /// be shown to the user. It should be concise (to fit in drop downs) but clear + /// (i.e. self-documenting). It should use Title Casing. Prescriptive guidance: + /// Read Create or Update Delete 'ActionName'. + /// + + /// The description. The localized friendly description for the operation, as + /// it should be shown to the user. It should be thorough, yet concise - it + /// will be used in tool tips and detailed views. Prescriptive guidance for + /// namespaces: Read any 'display.provider' resource Create or Update any + /// 'display.provider' resource Delete any 'display.provider' resource Perform + /// any other action on any 'display.provider' resource Prescriptive guidance + /// for namespaces: Read any 'display.resource' Create or Update any + /// 'display.resource' Delete any 'display.resource' 'ActionName' any + /// 'display.resources'. + /// public Display(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) + { - Provider = provider; - Resource = resource; - Operation = operation; - Description = description; + this.Provider = provider; + this.Resource = resource; + this.Operation = operation; + this.Description = description; CustomInit(); } @@ -74,52 +72,50 @@ public Display() /// partial void CustomInit(); + /// - /// Gets or sets the provider. The localized friendly form of the - /// resource provider name - it is expected to also include the - /// publisher/company responsible. It should use Title Casing and begin - /// with "Microsoft" for 1st party services. e.g. "Microsoft Monitoring - /// Insights" or "Microsoft Compute.". + /// Gets or sets the provider. The localized friendly form of the resource + /// provider name - it is expected to also include the publisher/company + /// responsible. It should use Title Casing and begin with "Microsoft" for 1st + /// party services. e.g. "Microsoft Monitoring Insights" or "Microsoft + /// Compute.". /// - [JsonProperty(PropertyName = "provider")] - public string Provider { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provider")] + public string Provider {get; set; } /// - /// Gets or sets the resource. The localized friendly form of the - /// resource related to this action/operation - it should match the - /// public documentation for the resource provider. It should use Title - /// Casing. This value should be unique for a particular URL type (e.g. - /// nested types should *not* reuse their parent's display.resource - /// field). e.g. "Virtual Machines" or "Scheduler Job Collections", or - /// "Virtual Machine VM Sizes" or "Scheduler Jobs". + /// Gets or sets the resource. The localized friendly form of the resource + /// related to this action/operation - it should match the public documentation + /// for the resource provider. It should use Title Casing. This value should be + /// unique for a particular URL type (e.g. nested types should *not* reuse + /// their parent's display.resource field). e.g. "Virtual Machines" or + /// "Scheduler Job Collections", or "Virtual Machine VM Sizes" or "Scheduler + /// Jobs". /// - [JsonProperty(PropertyName = "resource")] - public string Resource { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resource")] + public string Resource {get; set; } /// - /// Gets or sets the operation. The localized friendly name for the - /// operation, as it should be shown to the user. It should be concise - /// (to fit in drop downs) but clear (i.e. self-documenting). It should - /// use Title Casing. Prescriptive guidance: Read Create or Update - /// Delete 'ActionName'. + /// Gets or sets the operation. The localized friendly name for the operation, + /// as it should be shown to the user. It should be concise (to fit in drop + /// downs) but clear (i.e. self-documenting). It should use Title Casing. + /// Prescriptive guidance: Read Create or Update Delete 'ActionName'. /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } /// - /// Gets or sets the description. The localized friendly description - /// for the operation, as it should be shown to the user. It should be - /// thorough, yet concise - it will be used in tool tips and detailed - /// views. Prescriptive guidance for namespaces: Read any - /// 'display.provider' resource Create or Update any 'display.provider' - /// resource Delete any 'display.provider' resource Perform any other - /// action on any 'display.provider' resource Prescriptive guidance for - /// namespaces: Read any 'display.resource' Create or Update any - /// 'display.resource' Delete any 'display.resource' 'ActionName' any - /// 'display.resources'. + /// Gets or sets the description. The localized friendly description for the + /// operation, as it should be shown to the user. It should be thorough, yet + /// concise - it will be used in tool tips and detailed views. Prescriptive + /// guidance for namespaces: Read any 'display.provider' resource Create or + /// Update any 'display.provider' resource Delete any 'display.provider' + /// resource Perform any other action on any 'display.provider' resource + /// Prescriptive guidance for namespaces: Read any 'display.resource' Create or + /// Update any 'display.resource' Delete any 'display.resource' 'ActionName' + /// any 'display.resources'. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DraDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DraDetails.cs index 2afebc74a023..b3b0b360ee02 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DraDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/DraDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,30 +23,45 @@ public DraDetails() /// /// Initializes a new instance of the DraDetails class. /// - /// The DRA Id. - /// The DRA name. - /// The DRA Bios Id. - /// The version. - /// The last heartbeat received from the - /// DRA. - /// The health. Possible values include: 'None', - /// 'Normal', 'Warning', 'Critical' - /// The health errors. - /// The count of protected - /// items which are protected in forward direction. - /// The count of protected - /// items which are protected in reverse direction. - public DraDetails(string id = default(string), string name = default(string), string biosId = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), IList healthErrors = default(IList), int? forwardProtectedItemCount = default(int?), int? reverseProtectedItemCount = default(int?)) + + /// The DRA Id. + /// + + /// The DRA name. + /// + + /// The DRA Bios Id. + /// + + /// The version. + /// + + /// The last heartbeat received from the DRA. + /// + + /// The health. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + + /// The health errors. + /// + + /// The count of protected items which are protected in forward direction. + /// + + /// The count of protected items which are protected in reverse direction. + /// + public DraDetails(string id = default(string), string name = default(string), string biosId = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList), int? forwardProtectedItemCount = default(int?), int? reverseProtectedItemCount = default(int?)) + { - Id = id; - Name = name; - BiosId = biosId; - Version = version; - LastHeartbeatUtc = lastHeartbeatUtc; - Health = health; - HealthErrors = healthErrors; - ForwardProtectedItemCount = forwardProtectedItemCount; - ReverseProtectedItemCount = reverseProtectedItemCount; + this.Id = id; + this.Name = name; + this.BiosId = biosId; + this.Version = version; + this.LastHeartbeatUtc = lastHeartbeatUtc; + this.Health = health; + this.HealthErrors = healthErrors; + this.ForwardProtectedItemCount = forwardProtectedItemCount; + this.ReverseProtectedItemCount = reverseProtectedItemCount; CustomInit(); } @@ -63,62 +70,59 @@ public DraDetails() /// partial void CustomInit(); + /// /// Gets the DRA Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the DRA name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the DRA Bios Id. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; private set; } /// /// Gets the version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } /// /// Gets the last heartbeat received from the DRA. /// - [JsonProperty(PropertyName = "lastHeartbeatUtc")] - public System.DateTime? LastHeartbeatUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeatUtc")] + public System.DateTime? LastHeartbeatUtc {get; private set; } /// - /// Gets the health. Possible values include: 'None', 'Normal', - /// 'Warning', 'Critical' + /// Gets the health. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "health")] - public string Health { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; private set; } /// /// Gets the health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; private set; } /// - /// Gets the count of protected items which are protected in forward - /// direction. + /// Gets the count of protected items which are protected in forward direction. /// - [JsonProperty(PropertyName = "forwardProtectedItemCount")] - public int? ForwardProtectedItemCount { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "forwardProtectedItemCount")] + public int? ForwardProtectedItemCount {get; private set; } /// - /// Gets the count of protected items which are protected in reverse - /// direction. + /// Gets the count of protected items which are protected in reverse direction. /// - [JsonProperty(PropertyName = "reverseProtectedItemCount")] - public int? ReverseProtectedItemCount { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "reverseProtectedItemCount")] + public int? ReverseProtectedItemCount {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationInput.cs index 389f890f8e42..bdbce536fe3a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +23,13 @@ public EnableMigrationInput() /// /// Initializes a new instance of the EnableMigrationInput class. /// - /// Enable migration input properties. + + /// Enable migration input properties. + /// public EnableMigrationInput(EnableMigrationInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,28 +38,28 @@ public EnableMigrationInput(EnableMigrationInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets enable migration input properties. /// - [JsonProperty(PropertyName = "properties")] - public EnableMigrationInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public EnableMigrationInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationInputProperties.cs index f159e165f7cb..e7027cc0583e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class EnableMigrationInputProperties { /// - /// Initializes a new instance of the EnableMigrationInputProperties - /// class. + /// Initializes a new instance of the EnableMigrationInputProperties class. /// public EnableMigrationInputProperties() { @@ -29,16 +21,19 @@ public EnableMigrationInputProperties() } /// - /// Initializes a new instance of the EnableMigrationInputProperties - /// class. + /// Initializes a new instance of the EnableMigrationInputProperties class. /// - /// The policy Id. - /// The provider specific - /// details. + + /// The policy Id. + /// + + /// The provider specific details. + /// public EnableMigrationInputProperties(string policyId, EnableMigrationProviderSpecificInput providerSpecificDetails) + { - PolicyId = policyId; - ProviderSpecificDetails = providerSpecificDetails; + this.PolicyId = policyId; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -47,34 +42,36 @@ public EnableMigrationInputProperties(string policyId, EnableMigrationProviderSp /// partial void CustomInit(); + /// /// Gets or sets the policy Id. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// /// Gets or sets the provider specific details. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public EnableMigrationProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public EnableMigrationProviderSpecificInput ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PolicyId == null) + if (this.PolicyId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PolicyId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PolicyId"); } - if (ProviderSpecificDetails == null) + if (this.ProviderSpecificDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProviderSpecificDetails"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationProviderSpecificInput.cs index 380b98588bc6..8e96e374fea7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableMigrationProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class EnableMigrationProviderSpecificInput { /// - /// Initializes a new instance of the - /// EnableMigrationProviderSpecificInput class. + /// Initializes a new instance of the EnableMigrationProviderSpecificInput class. /// public EnableMigrationProviderSpecificInput() { @@ -35,4 +28,4 @@ public EnableMigrationProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionInput.cs index 4e705cf0f89c..07ea4e42dff4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public EnableProtectionInput() /// /// Initializes a new instance of the EnableProtectionInput class. /// - /// Enable protection input - /// properties. + + /// Enable protection input properties. + /// public EnableProtectionInput(EnableProtectionInputProperties properties = default(EnableProtectionInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,11 +38,11 @@ public EnableProtectionInput() /// partial void CustomInit(); + /// /// Gets or sets enable protection input properties. /// - [JsonProperty(PropertyName = "properties")] - public EnableProtectionInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public EnableProtectionInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionInputProperties.cs index a2071c27c763..86d0f51a4211 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class EnableProtectionInputProperties { /// - /// Initializes a new instance of the EnableProtectionInputProperties - /// class. + /// Initializes a new instance of the EnableProtectionInputProperties class. /// public EnableProtectionInputProperties() { @@ -28,21 +21,26 @@ public EnableProtectionInputProperties() } /// - /// Initializes a new instance of the EnableProtectionInputProperties - /// class. + /// Initializes a new instance of the EnableProtectionInputProperties class. /// - /// The Policy Id. - /// The protectable item Id. - /// The ReplicationProviderInput. - /// For HyperVReplicaAzure provider, it will be + + /// The Policy Id. + /// + + /// The protectable item Id. + /// + + /// The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be /// AzureEnableProtectionInput object. For San provider, it will be - /// SanEnableProtectionInput object. For HyperVReplicaAzure provider, - /// it can be null. + /// SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be + /// null. + /// public EnableProtectionInputProperties(string policyId = default(string), string protectableItemId = default(string), EnableProtectionProviderSpecificInput providerSpecificDetails = default(EnableProtectionProviderSpecificInput)) + { - PolicyId = policyId; - ProtectableItemId = protectableItemId; - ProviderSpecificDetails = providerSpecificDetails; + this.PolicyId = policyId; + this.ProtectableItemId = protectableItemId; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -51,26 +49,26 @@ public EnableProtectionInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the Policy Id. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// /// Gets or sets the protectable item Id. /// - [JsonProperty(PropertyName = "protectableItemId")] - public string ProtectableItemId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableItemId")] + public string ProtectableItemId {get; set; } /// - /// Gets or sets the ReplicationProviderInput. For HyperVReplicaAzure - /// provider, it will be AzureEnableProtectionInput object. For San - /// provider, it will be SanEnableProtectionInput object. For - /// HyperVReplicaAzure provider, it can be null. + /// Gets or sets the ReplicationProviderInput. For HyperVReplicaAzure provider, + /// it will be AzureEnableProtectionInput object. For San provider, it will be + /// SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be + /// null. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public EnableProtectionProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public EnableProtectionProviderSpecificInput ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionProviderSpecificInput.cs index 64f5649c443f..a8427acf28c0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EnableProtectionProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class EnableProtectionProviderSpecificInput { /// - /// Initializes a new instance of the - /// EnableProtectionProviderSpecificInput class. + /// Initializes a new instance of the EnableProtectionProviderSpecificInput class. /// public EnableProtectionProviderSpecificInput() { @@ -35,4 +28,4 @@ public EnableProtectionProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EncryptionDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EncryptionDetails.cs index f1a9f3805d6e..23e7a50a0289 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EncryptionDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EncryptionDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,21 @@ public EncryptionDetails() /// /// Initializes a new instance of the EncryptionDetails class. /// - /// The key encryption key state for the - /// Vmm. - /// The key encryption key certificate - /// thumbprint. - /// The key encryption key certificate - /// expiry date. + + /// The key encryption key state for the Vmm. + /// + + /// The key encryption key certificate thumbprint. + /// + + /// The key encryption key certificate expiry date. + /// public EncryptionDetails(string kekState = default(string), string kekCertThumbprint = default(string), System.DateTime? kekCertExpiryDate = default(System.DateTime?)) + { - KekState = kekState; - KekCertThumbprint = kekCertThumbprint; - KekCertExpiryDate = kekCertExpiryDate; + this.KekState = kekState; + this.KekCertThumbprint = kekCertThumbprint; + this.KekCertExpiryDate = kekCertExpiryDate; CustomInit(); } @@ -48,23 +46,23 @@ public EncryptionDetails() /// partial void CustomInit(); + /// /// Gets or sets the key encryption key state for the Vmm. /// - [JsonProperty(PropertyName = "kekState")] - public string KekState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekState")] + public string KekState {get; set; } /// /// Gets or sets the key encryption key certificate thumbprint. /// - [JsonProperty(PropertyName = "kekCertThumbprint")] - public string KekCertThumbprint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kekCertThumbprint")] + public string KekCertThumbprint {get; set; } /// /// Gets or sets the key encryption key certificate expiry date. /// - [JsonProperty(PropertyName = "kekCertExpiryDate")] - public System.DateTime? KekCertExpiryDate { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "kekCertExpiryDate")] + public System.DateTime? KekCertExpiryDate {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EthernetAddressType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EthernetAddressType.cs index efb1b7e89e16..7b75d4bc1f64 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EthernetAddressType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EthernetAddressType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for EthernetAddressType. /// + + public static class EthernetAddressType { public const string Dynamic = "Dynamic"; public const string Static = "Static"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventModel.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventModel.cs index e5cd33a95d1b..0462e23c8a21 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventModel.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventModel.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public EventModel() /// /// Initializes a new instance of the EventModel class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// Event related data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// Event related data. + /// public EventModel(string id = default(string), string name = default(string), string type = default(string), string location = default(string), EventProperties properties = default(EventProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public EventModel() /// partial void CustomInit(); + /// /// Gets or sets event related data. /// - [JsonProperty(PropertyName = "properties")] - public EventProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public EventProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventProperties.cs index b909833a5f6d..f96b455ef84a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,38 +23,56 @@ public EventProperties() /// /// Initializes a new instance of the EventProperties class. /// - /// The Id of the monitoring event. - /// The event name. - /// The type of the event. for example: VM - /// Health, Server Health, Job Failure etc. - /// The friendly name of the - /// source of the event on which it is raised (for example, VM, VMM - /// etc). - /// The affected object - /// correlationId for the event. - /// The severity of the event. - /// The time of occurrence of the - /// event. - /// The ARM ID of the fabric. - /// The provider specific - /// settings. - /// The event specific - /// settings. - /// The list of errors / warnings capturing - /// details associated with the issue(s). - public EventProperties(string eventCode = default(string), string description = default(string), string eventType = default(string), string affectedObjectFriendlyName = default(string), string affectedObjectCorrelationId = default(string), string severity = default(string), System.DateTime? timeOfOccurrence = default(System.DateTime?), string fabricId = default(string), EventProviderSpecificDetails providerSpecificDetails = default(EventProviderSpecificDetails), EventSpecificDetails eventSpecificDetails = default(EventSpecificDetails), IList healthErrors = default(IList)) + + /// The Id of the monitoring event. + /// + + /// The event name. + /// + + /// The type of the event. for example: VM Health, Server Health, Job Failure + /// etc. + /// + + /// The friendly name of the source of the event on which it is raised (for + /// example, VM, VMM etc). + /// + + /// The affected object correlationId for the event. + /// + + /// The severity of the event. + /// + + /// The time of occurrence of the event. + /// + + /// The ARM ID of the fabric. + /// + + /// The provider specific settings. + /// + + /// The event specific settings. + /// + + /// The list of errors / warnings capturing details associated with the + /// issue(s). + /// + public EventProperties(string eventCode = default(string), string description = default(string), string eventType = default(string), string affectedObjectFriendlyName = default(string), string affectedObjectCorrelationId = default(string), string severity = default(string), System.DateTime? timeOfOccurrence = default(System.DateTime?), string fabricId = default(string), EventProviderSpecificDetails providerSpecificDetails = default(EventProviderSpecificDetails), EventSpecificDetails eventSpecificDetails = default(EventSpecificDetails), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList)) + { - EventCode = eventCode; - Description = description; - EventType = eventType; - AffectedObjectFriendlyName = affectedObjectFriendlyName; - AffectedObjectCorrelationId = affectedObjectCorrelationId; - Severity = severity; - TimeOfOccurrence = timeOfOccurrence; - FabricId = fabricId; - ProviderSpecificDetails = providerSpecificDetails; - EventSpecificDetails = eventSpecificDetails; - HealthErrors = healthErrors; + this.EventCode = eventCode; + this.Description = description; + this.EventType = eventType; + this.AffectedObjectFriendlyName = affectedObjectFriendlyName; + this.AffectedObjectCorrelationId = affectedObjectCorrelationId; + this.Severity = severity; + this.TimeOfOccurrence = timeOfOccurrence; + this.FabricId = fabricId; + this.ProviderSpecificDetails = providerSpecificDetails; + this.EventSpecificDetails = eventSpecificDetails; + this.HealthErrors = healthErrors; CustomInit(); } @@ -71,74 +81,74 @@ public EventProperties() /// partial void CustomInit(); + /// /// Gets or sets the Id of the monitoring event. /// - [JsonProperty(PropertyName = "eventCode")] - public string EventCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "eventCode")] + public string EventCode {get; set; } /// /// Gets or sets the event name. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } /// - /// Gets or sets the type of the event. for example: VM Health, Server - /// Health, Job Failure etc. + /// Gets or sets the type of the event. for example: VM Health, Server Health, + /// Job Failure etc. /// - [JsonProperty(PropertyName = "eventType")] - public string EventType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "eventType")] + public string EventType {get; set; } /// - /// Gets or sets the friendly name of the source of the event on which - /// it is raised (for example, VM, VMM etc). + /// Gets or sets the friendly name of the source of the event on which it is + /// raised (for example, VM, VMM etc). /// - [JsonProperty(PropertyName = "affectedObjectFriendlyName")] - public string AffectedObjectFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedObjectFriendlyName")] + public string AffectedObjectFriendlyName {get; set; } /// /// Gets or sets the affected object correlationId for the event. /// - [JsonProperty(PropertyName = "affectedObjectCorrelationId")] - public string AffectedObjectCorrelationId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedObjectCorrelationId")] + public string AffectedObjectCorrelationId {get; set; } /// /// Gets or sets the severity of the event. /// - [JsonProperty(PropertyName = "severity")] - public string Severity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "severity")] + public string Severity {get; set; } /// /// Gets or sets the time of occurrence of the event. /// - [JsonProperty(PropertyName = "timeOfOccurrence")] - public System.DateTime? TimeOfOccurrence { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "timeOfOccurrence")] + public System.DateTime? TimeOfOccurrence {get; set; } /// /// Gets or sets the ARM ID of the fabric. /// - [JsonProperty(PropertyName = "fabricId")] - public string FabricId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricId")] + public string FabricId {get; set; } /// /// Gets or sets the provider specific settings. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public EventProviderSpecificDetails ProviderSpecificDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public EventProviderSpecificDetails ProviderSpecificDetails {get; set; } /// /// Gets or sets the event specific settings. /// - [JsonProperty(PropertyName = "eventSpecificDetails")] - public EventSpecificDetails EventSpecificDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "eventSpecificDetails")] + public EventSpecificDetails EventSpecificDetails {get; set; } /// - /// Gets or sets the list of errors / warnings capturing details - /// associated with the issue(s). + /// Gets or sets the list of errors / warnings capturing details associated + /// with the issue(s). /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventProviderSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventProviderSpecificDetails.cs index 93b369cc5784..5eef85608ca4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventProviderSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventProviderSpecificDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class EventProviderSpecificDetails { /// - /// Initializes a new instance of the EventProviderSpecificDetails - /// class. + /// Initializes a new instance of the EventProviderSpecificDetails class. /// public EventProviderSpecificDetails() { @@ -35,4 +28,4 @@ public EventProviderSpecificDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventQueryParameter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventQueryParameter.cs index 28caa55702a7..73d89ab8a0ee 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventQueryParameter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventQueryParameter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,32 +23,41 @@ public EventQueryParameter() /// /// Initializes a new instance of the EventQueryParameter class. /// - /// The source id of the events to be - /// queried. - /// The severity of the events to be - /// queried. - /// The type of the events to be - /// queried. - /// The affected object server id of the - /// events to be queried. - /// The affected object name - /// of the events to be queried. - /// The affected object - /// correlationId for the events to be queried. - /// The start time of the time range within - /// which the events are to be queried. - /// The end time of the time range within which - /// the events are to be queried. + + /// The source id of the events to be queried. + /// + + /// The severity of the events to be queried. + /// + + /// The type of the events to be queried. + /// + + /// The affected object server id of the events to be queried. + /// + + /// The affected object name of the events to be queried. + /// + + /// The affected object correlationId for the events to be queried. + /// + + /// The start time of the time range within which the events are to be queried. + /// + + /// The end time of the time range within which the events are to be queried. + /// public EventQueryParameter(string eventCode = default(string), string severity = default(string), string eventType = default(string), string fabricName = default(string), string affectedObjectFriendlyName = default(string), string affectedObjectCorrelationId = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?)) + { - EventCode = eventCode; - Severity = severity; - EventType = eventType; - FabricName = fabricName; - AffectedObjectFriendlyName = affectedObjectFriendlyName; - AffectedObjectCorrelationId = affectedObjectCorrelationId; - StartTime = startTime; - EndTime = endTime; + this.EventCode = eventCode; + this.Severity = severity; + this.EventType = eventType; + this.FabricName = fabricName; + this.AffectedObjectFriendlyName = affectedObjectFriendlyName; + this.AffectedObjectCorrelationId = affectedObjectCorrelationId; + this.StartTime = startTime; + this.EndTime = endTime; CustomInit(); } @@ -63,57 +66,56 @@ public EventQueryParameter() /// partial void CustomInit(); + /// /// Gets or sets the source id of the events to be queried. /// - [JsonProperty(PropertyName = "eventCode")] - public string EventCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "eventCode")] + public string EventCode {get; set; } /// /// Gets or sets the severity of the events to be queried. /// - [JsonProperty(PropertyName = "severity")] - public string Severity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "severity")] + public string Severity {get; set; } /// /// Gets or sets the type of the events to be queried. /// - [JsonProperty(PropertyName = "eventType")] - public string EventType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "eventType")] + public string EventType {get; set; } /// - /// Gets or sets the affected object server id of the events to be - /// queried. + /// Gets or sets the affected object server id of the events to be queried. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// /// Gets or sets the affected object name of the events to be queried. /// - [JsonProperty(PropertyName = "affectedObjectFriendlyName")] - public string AffectedObjectFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedObjectFriendlyName")] + public string AffectedObjectFriendlyName {get; set; } /// /// Gets or sets the affected object correlationId for the events to be /// queried. /// - [JsonProperty(PropertyName = "affectedObjectCorrelationId")] - public string AffectedObjectCorrelationId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedObjectCorrelationId")] + public string AffectedObjectCorrelationId {get; set; } /// - /// Gets or sets the start time of the time range within which the - /// events are to be queried. + /// Gets or sets the start time of the time range within which the events are + /// to be queried. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// - /// Gets or sets the end time of the time range within which the events - /// are to be queried. + /// Gets or sets the end time of the time range within which the events are to + /// be queried. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventSpecificDetails.cs index 2a0d276e7e28..eb07fcf716db 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/EventSpecificDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public EventSpecificDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingProtectionProfile.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingProtectionProfile.cs index 2faf4d1c5418..02e722a17872 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingProtectionProfile.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingProtectionProfile.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -31,11 +24,13 @@ public ExistingProtectionProfile() /// /// Initializes a new instance of the ExistingProtectionProfile class. /// - /// The protection profile Arm Id. - /// Throw error, if resource does not exists. + + /// The protection profile Arm Id. Throw error, if resource does not exists. + /// public ExistingProtectionProfile(string protectionProfileId) + { - ProtectionProfileId = protectionProfileId; + this.ProtectionProfileId = protectionProfileId; CustomInit(); } @@ -44,25 +39,26 @@ public ExistingProtectionProfile(string protectionProfileId) /// partial void CustomInit(); + /// - /// Gets or sets the protection profile Arm Id. Throw error, if - /// resource does not exists. + /// Gets or sets the protection profile Arm Id. Throw error, if resource does + /// not exists. /// - [JsonProperty(PropertyName = "protectionProfileId")] - public string ProtectionProfileId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionProfileId")] + public string ProtectionProfileId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ProtectionProfileId == null) + if (this.ProtectionProfileId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProtectionProfileId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProtectionProfileId"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryAvailabilitySet.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryAvailabilitySet.cs index faae0fdd4031..c63201890f5a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryAvailabilitySet.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryAvailabilitySet.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ExistingRecoveryAvailabilitySet : RecoveryAvailabilitySetCustomDetails { /// - /// Initializes a new instance of the ExistingRecoveryAvailabilitySet - /// class. + /// Initializes a new instance of the ExistingRecoveryAvailabilitySet class. /// public ExistingRecoveryAvailabilitySet() { @@ -29,14 +22,16 @@ public ExistingRecoveryAvailabilitySet() } /// - /// Initializes a new instance of the ExistingRecoveryAvailabilitySet - /// class. + /// Initializes a new instance of the ExistingRecoveryAvailabilitySet class. /// - /// The recovery availability - /// set Id. Will throw error, if resource does not exist. + + /// The recovery availability set Id. Will throw error, if resource does not + /// exist. + /// public ExistingRecoveryAvailabilitySet(string recoveryAvailabilitySetId = default(string)) + { - RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + this.RecoveryAvailabilitySetId = recoveryAvailabilitySetId; CustomInit(); } @@ -45,12 +40,12 @@ public ExistingRecoveryAvailabilitySet() /// partial void CustomInit(); + /// /// Gets or sets the recovery availability set Id. Will throw error, if /// resource does not exist. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] - public string RecoveryAvailabilitySetId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryProximityPlacementGroup.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryProximityPlacementGroup.cs index 8540face2a59..faa5c97c793f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryProximityPlacementGroup.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryProximityPlacementGroup.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ExistingRecoveryProximityPlacementGroup : RecoveryProximityPlacementGroupCustomDetails { /// - /// Initializes a new instance of the - /// ExistingRecoveryProximityPlacementGroup class. + /// Initializes a new instance of the ExistingRecoveryProximityPlacementGroup class. /// public ExistingRecoveryProximityPlacementGroup() { @@ -29,15 +22,16 @@ public ExistingRecoveryProximityPlacementGroup() } /// - /// Initializes a new instance of the - /// ExistingRecoveryProximityPlacementGroup class. + /// Initializes a new instance of the ExistingRecoveryProximityPlacementGroup class. /// - /// The recovery - /// proximity placement group Id. Will throw error, if resource does - /// not exist. + + /// The recovery proximity placement group Id. Will throw error, if resource + /// does not exist. + /// public ExistingRecoveryProximityPlacementGroup(string recoveryProximityPlacementGroupId = default(string)) + { - RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; + this.RecoveryProximityPlacementGroupId = recoveryProximityPlacementGroupId; CustomInit(); } @@ -46,12 +40,12 @@ public ExistingRecoveryProximityPlacementGroup() /// partial void CustomInit(); + /// - /// Gets or sets the recovery proximity placement group Id. Will throw - /// error, if resource does not exist. + /// Gets or sets the recovery proximity placement group Id. Will throw error, + /// if resource does not exist. /// - [JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] - public string RecoveryProximityPlacementGroupId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProximityPlacementGroupId")] + public string RecoveryProximityPlacementGroupId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryRecoveryResourceGroup.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryResourceGroup.cs similarity index 53% rename from src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryRecoveryResourceGroup.cs rename to src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryResourceGroup.cs index 227df071c1ad..3565816b0296 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryRecoveryResourceGroup.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryResourceGroup.cs @@ -1,42 +1,36 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// /// Existing recovery resource group input. /// [Newtonsoft.Json.JsonObject("Existing")] - public partial class ExistingRecoveryRecoveryResourceGroup : RecoveryResourceGroupCustomDetails + public partial class ExistingRecoveryResourceGroup : RecoveryResourceGroupCustomDetails { /// - /// Initializes a new instance of the - /// ExistingRecoveryRecoveryResourceGroup class. + /// Initializes a new instance of the ExistingRecoveryResourceGroup class. /// - public ExistingRecoveryRecoveryResourceGroup() + public ExistingRecoveryResourceGroup() { CustomInit(); } /// - /// Initializes a new instance of the - /// ExistingRecoveryRecoveryResourceGroup class. + /// Initializes a new instance of the ExistingRecoveryResourceGroup class. /// - /// The recovery resource group - /// Id. Valid for V2 scenarios. - public ExistingRecoveryRecoveryResourceGroup(string recoveryResourceGroupId = default(string)) + + /// The recovery resource group Id. Valid for V2 scenarios. + /// + public ExistingRecoveryResourceGroup(string recoveryResourceGroupId = default(string)) + { - RecoveryResourceGroupId = recoveryResourceGroupId; + this.RecoveryResourceGroupId = recoveryResourceGroupId; CustomInit(); } @@ -45,12 +39,11 @@ public ExistingRecoveryRecoveryResourceGroup() /// partial void CustomInit(); + /// - /// Gets or sets the recovery resource group Id. Valid for V2 - /// scenarios. + /// Gets or sets the recovery resource group Id. Valid for V2 scenarios. /// - [JsonProperty(PropertyName = "recoveryResourceGroupId")] - public string RecoveryResourceGroupId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryVirtualNetwork.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryVirtualNetwork.cs index 1d06d95248f0..0680375ef828 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryVirtualNetwork.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingRecoveryVirtualNetwork.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ExistingRecoveryVirtualNetwork : RecoveryVirtualNetworkCustomDetails { /// - /// Initializes a new instance of the ExistingRecoveryVirtualNetwork - /// class. + /// Initializes a new instance of the ExistingRecoveryVirtualNetwork class. /// public ExistingRecoveryVirtualNetwork() { @@ -30,16 +22,20 @@ public ExistingRecoveryVirtualNetwork() } /// - /// Initializes a new instance of the ExistingRecoveryVirtualNetwork - /// class. + /// Initializes a new instance of the ExistingRecoveryVirtualNetwork class. /// - /// The recovery virtual network - /// Id. Will throw error, if resource does not exist. - /// The recovery subnet name. + + /// The recovery virtual network Id. Will throw error, if resource does not + /// exist. + /// + + /// The recovery subnet name. + /// public ExistingRecoveryVirtualNetwork(string recoveryVirtualNetworkId, string recoverySubnetName = default(string)) + { - RecoveryVirtualNetworkId = recoveryVirtualNetworkId; - RecoverySubnetName = recoverySubnetName; + this.RecoveryVirtualNetworkId = recoveryVirtualNetworkId; + this.RecoverySubnetName = recoverySubnetName; CustomInit(); } @@ -48,31 +44,33 @@ public ExistingRecoveryVirtualNetwork() /// partial void CustomInit(); + /// - /// Gets or sets the recovery virtual network Id. Will throw error, if - /// resource does not exist. + /// Gets or sets the recovery virtual network Id. Will throw error, if resource + /// does not exist. /// - [JsonProperty(PropertyName = "recoveryVirtualNetworkId")] - public string RecoveryVirtualNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVirtualNetworkId")] + public string RecoveryVirtualNetworkId {get; set; } /// /// Gets or sets the recovery subnet name. /// - [JsonProperty(PropertyName = "recoverySubnetName")] - public string RecoverySubnetName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoverySubnetName")] + public string RecoverySubnetName {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryVirtualNetworkId == null) + if (this.RecoveryVirtualNetworkId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryVirtualNetworkId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryVirtualNetworkId"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingStorageAccount.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingStorageAccount.cs index f183508d8655..1e6c8f4b6c4f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingStorageAccount.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExistingStorageAccount.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -31,11 +24,13 @@ public ExistingStorageAccount() /// /// Initializes a new instance of the ExistingStorageAccount class. /// - /// The storage account Arm Id. - /// Throw error, if resource does not exists. + + /// The storage account Arm Id. Throw error, if resource does not exists. + /// public ExistingStorageAccount(string azureStorageAccountId) + { - AzureStorageAccountId = azureStorageAccountId; + this.AzureStorageAccountId = azureStorageAccountId; CustomInit(); } @@ -44,25 +39,26 @@ public ExistingStorageAccount(string azureStorageAccountId) /// partial void CustomInit(); + /// - /// Gets or sets the storage account Arm Id. Throw error, if resource - /// does not exists. + /// Gets or sets the storage account Arm Id. Throw error, if resource does not + /// exists. /// - [JsonProperty(PropertyName = "azureStorageAccountId")] - public string AzureStorageAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "azureStorageAccountId")] + public string AzureStorageAccountId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (AzureStorageAccountId == null) + if (this.AzureStorageAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "AzureStorageAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AzureStorageAccountId"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExportJobDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExportJobDetails.cs index 837665eeaeab..0d45e8365118 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExportJobDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExportJobDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,16 +24,22 @@ public ExportJobDetails() /// /// Initializes a new instance of the ExportJobDetails class. /// - /// The affected object properties - /// like source server, source cloud, target server, target cloud etc. - /// based on the workflow object details. - /// BlobUri of the exported jobs. - /// The sas token to access blob. - public ExportJobDetails(IDictionary affectedObjectDetails = default(IDictionary), string blobUri = default(string), string sasToken = default(string)) - : base(affectedObjectDetails) + + /// The affected object properties like source server, source cloud, target + /// server, target cloud etc. based on the workflow object details. + /// + + /// BlobUri of the exported jobs. + /// + + /// The sas token to access blob. + /// + public ExportJobDetails(System.Collections.Generic.IDictionary affectedObjectDetails = default(System.Collections.Generic.IDictionary), string blobUri = default(string), string sasToken = default(string)) + + : base(affectedObjectDetails) { - BlobUri = blobUri; - SasToken = sasToken; + this.BlobUri = blobUri; + this.SasToken = sasToken; CustomInit(); } @@ -50,17 +48,17 @@ public ExportJobDetails() /// partial void CustomInit(); + /// /// Gets or sets blobUri of the exported jobs. /// - [JsonProperty(PropertyName = "blobUri")] - public string BlobUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "blobUri")] + public string BlobUri {get; set; } /// /// Gets or sets the sas token to access blob. /// - [JsonProperty(PropertyName = "sasToken")] - public string SasToken { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "sasToken")] + public string SasToken {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExportJobOutputSerializationType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExportJobOutputSerializationType.cs index 560f3b988ffc..b1158d9482a0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExportJobOutputSerializationType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExportJobOutputSerializationType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for ExportJobOutputSerializationType. /// + + public static class ExportJobOutputSerializationType { public const string Json = "Json"; public const string Xml = "Xml"; public const string Excel = "Excel"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExtendedLocation.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExtendedLocation.cs index 750848ecfb9d..7ea0f44d5fdb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExtendedLocation.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExtendedLocation.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +23,13 @@ public ExtendedLocation() /// /// Initializes a new instance of the ExtendedLocation class. /// - /// The name of the extended location. + + /// The name of the extended location. + /// public ExtendedLocation(string name) + { - Name = name; + this.Name = name; CustomInit(); } /// @@ -49,30 +45,31 @@ static ExtendedLocation() /// partial void CustomInit(); + /// /// Gets or sets the name of the extended location. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// - /// The extended location type. + /// Gets or sets the extended location type. /// - [JsonProperty(PropertyName = "type")] - public static string Type { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public static string Type {get; private set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Name == null) + if (this.Name == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExtendedLocationType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExtendedLocationType.cs new file mode 100644 index 000000000000..c80fccc2e5d6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ExtendedLocationType.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models +{ + + /// + /// Defines values for ExtendedLocationType. + /// + + + public static class ExtendedLocationType + { + public const string EdgeZone = "EdgeZone"; + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Fabric.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Fabric.cs index a4390824e02f..15626e14310d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Fabric.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Fabric.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public Fabric() /// /// Initializes a new instance of the Fabric class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// Fabric related data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// Fabric related data. + /// public Fabric(string id = default(string), string name = default(string), string type = default(string), string location = default(string), FabricProperties properties = default(FabricProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public Fabric() /// partial void CustomInit(); + /// /// Gets or sets fabric related data. /// - [JsonProperty(PropertyName = "properties")] - public FabricProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public FabricProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricCreationInput.cs index 7713b2b2bb0c..0bf8d1b043bd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public FabricCreationInput() /// /// Initializes a new instance of the FabricCreationInput class. /// - /// Fabric creation input. + + /// Fabric creation input. + /// public FabricCreationInput(FabricCreationInputProperties properties = default(FabricCreationInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public FabricCreationInput() /// partial void CustomInit(); + /// /// Gets or sets fabric creation input. /// - [JsonProperty(PropertyName = "properties")] - public FabricCreationInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public FabricCreationInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricCreationInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricCreationInputProperties.cs index c8cd9243bc37..9dafc74cff61 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricCreationInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricCreationInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class FabricCreationInputProperties { /// - /// Initializes a new instance of the FabricCreationInputProperties - /// class. + /// Initializes a new instance of the FabricCreationInputProperties class. /// public FabricCreationInputProperties() { @@ -28,14 +21,15 @@ public FabricCreationInputProperties() } /// - /// Initializes a new instance of the FabricCreationInputProperties - /// class. + /// Initializes a new instance of the FabricCreationInputProperties class. /// - /// Fabric provider specific creation - /// input. + + /// Fabric provider specific creation input. + /// public FabricCreationInputProperties(FabricSpecificCreationInput customDetails = default(FabricSpecificCreationInput)) + { - CustomDetails = customDetails; + this.CustomDetails = customDetails; CustomInit(); } @@ -44,11 +38,11 @@ public FabricCreationInputProperties() /// partial void CustomInit(); + /// /// Gets or sets fabric provider specific creation input. /// - [JsonProperty(PropertyName = "customDetails")] - public FabricSpecificCreationInput CustomDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "customDetails")] + public FabricSpecificCreationInput CustomDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricProperties.cs index 43dfa19a3316..c27cda794aaf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,27 +23,41 @@ public FabricProperties() /// /// Initializes a new instance of the FabricProperties class. /// - /// Friendly name of the fabric. - /// Encryption details for the - /// fabric. - /// Rollover encryption details - /// for the fabric. - /// Dra Registration Id. - /// BCDR state of the fabric. - /// Fabric specific settings. - /// Fabric health error - /// details. - /// Health of fabric. - public FabricProperties(string friendlyName = default(string), EncryptionDetails encryptionDetails = default(EncryptionDetails), EncryptionDetails rolloverEncryptionDetails = default(EncryptionDetails), string internalIdentifier = default(string), string bcdrState = default(string), FabricSpecificDetails customDetails = default(FabricSpecificDetails), IList healthErrorDetails = default(IList), string health = default(string)) + + /// Friendly name of the fabric. + /// + + /// Encryption details for the fabric. + /// + + /// Rollover encryption details for the fabric. + /// + + /// Dra Registration Id. + /// + + /// BCDR state of the fabric. + /// + + /// Fabric specific settings. + /// + + /// Fabric health error details. + /// + + /// Health of fabric. + /// + public FabricProperties(string friendlyName = default(string), EncryptionDetails encryptionDetails = default(EncryptionDetails), EncryptionDetails rolloverEncryptionDetails = default(EncryptionDetails), string internalIdentifier = default(string), string bcdrState = default(string), FabricSpecificDetails customDetails = default(FabricSpecificDetails), System.Collections.Generic.IList healthErrorDetails = default(System.Collections.Generic.IList), string health = default(string)) + { - FriendlyName = friendlyName; - EncryptionDetails = encryptionDetails; - RolloverEncryptionDetails = rolloverEncryptionDetails; - InternalIdentifier = internalIdentifier; - BcdrState = bcdrState; - CustomDetails = customDetails; - HealthErrorDetails = healthErrorDetails; - Health = health; + this.FriendlyName = friendlyName; + this.EncryptionDetails = encryptionDetails; + this.RolloverEncryptionDetails = rolloverEncryptionDetails; + this.InternalIdentifier = internalIdentifier; + this.BcdrState = bcdrState; + this.CustomDetails = customDetails; + this.HealthErrorDetails = healthErrorDetails; + this.Health = health; CustomInit(); } @@ -60,53 +66,53 @@ public FabricProperties() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the fabric. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets encryption details for the fabric. /// - [JsonProperty(PropertyName = "encryptionDetails")] - public EncryptionDetails EncryptionDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionDetails")] + public EncryptionDetails EncryptionDetails {get; set; } /// /// Gets or sets rollover encryption details for the fabric. /// - [JsonProperty(PropertyName = "rolloverEncryptionDetails")] - public EncryptionDetails RolloverEncryptionDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rolloverEncryptionDetails")] + public EncryptionDetails RolloverEncryptionDetails {get; set; } /// /// Gets or sets dra Registration Id. /// - [JsonProperty(PropertyName = "internalIdentifier")] - public string InternalIdentifier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "internalIdentifier")] + public string InternalIdentifier {get; set; } /// - /// Gets or sets BCDR state of the fabric. + /// Gets or sets bCDR state of the fabric. /// - [JsonProperty(PropertyName = "bcdrState")] - public string BcdrState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "bcdrState")] + public string BcdrState {get; set; } /// /// Gets or sets fabric specific settings. /// - [JsonProperty(PropertyName = "customDetails")] - public FabricSpecificDetails CustomDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "customDetails")] + public FabricSpecificDetails CustomDetails {get; set; } /// /// Gets or sets fabric health error details. /// - [JsonProperty(PropertyName = "healthErrorDetails")] - public IList HealthErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrorDetails")] + public System.Collections.Generic.IList HealthErrorDetails {get; set; } /// /// Gets or sets health of fabric. /// - [JsonProperty(PropertyName = "health")] - public string Health { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricQueryParameter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricQueryParameter.cs index c82ea5bf7b0b..69fb37dc10a4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricQueryParameter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricQueryParameter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,32 +23,42 @@ public FabricQueryParameter() /// /// Initializes a new instance of the FabricQueryParameter class. /// - /// A value indicating whether the - /// zone to zone mappings are to be returned. - /// A value indicating whether - /// the Extended Location mappings are to be returned. - /// A value indicating whether the - /// location details are to be returned. - /// A value indicating whether the - /// agent details are to be fetched. - /// The BIOS Id to be used for fetching agent - /// details. - /// The FQDN to be used for fetching agent - /// details. - /// The type of the discovered machine to - /// be used for fetching agent details. - /// The OS type to be used for fetching agent - /// details. + + /// A value indicating whether the zone to zone mappings are to be returned. + /// + + /// A value indicating whether the Extended Location mappings are to be + /// returned. + /// + + /// A value indicating whether the location details are to be returned. + /// + + /// A value indicating whether the agent details are to be fetched. + /// + + /// The BIOS Id to be used for fetching agent details. + /// + + /// The FQDN to be used for fetching agent details. + /// + + /// The type of the discovered machine to be used for fetching agent details. + /// + + /// The OS type to be used for fetching agent details. + /// public FabricQueryParameter(string zoneToZoneMappings = default(string), string extendedLocationMappings = default(string), string locationDetails = default(string), string fetchAgentDetails = default(string), string biosId = default(string), string fqdn = default(string), string discoveryType = default(string), string osType = default(string)) + { - ZoneToZoneMappings = zoneToZoneMappings; - ExtendedLocationMappings = extendedLocationMappings; - LocationDetails = locationDetails; - FetchAgentDetails = fetchAgentDetails; - BiosId = biosId; - Fqdn = fqdn; - DiscoveryType = discoveryType; - OsType = osType; + this.ZoneToZoneMappings = zoneToZoneMappings; + this.ExtendedLocationMappings = extendedLocationMappings; + this.LocationDetails = locationDetails; + this.FetchAgentDetails = fetchAgentDetails; + this.BiosId = biosId; + this.Fqdn = fqdn; + this.DiscoveryType = discoveryType; + this.OSType = osType; CustomInit(); } @@ -63,58 +67,58 @@ public FabricQueryParameter() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether the zone to zone mappings - /// are to be returned. + /// Gets or sets a value indicating whether the zone to zone mappings are to be + /// returned. /// - [JsonProperty(PropertyName = "zoneToZoneMappings")] - public string ZoneToZoneMappings { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "zoneToZoneMappings")] + public string ZoneToZoneMappings {get; set; } /// - /// Gets or sets a value indicating whether the Extended Location - /// mappings are to be returned. + /// Gets or sets a value indicating whether the Extended Location mappings are + /// to be returned. /// - [JsonProperty(PropertyName = "extendedLocationMappings")] - public string ExtendedLocationMappings { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedLocationMappings")] + public string ExtendedLocationMappings {get; set; } /// - /// Gets or sets a value indicating whether the location details are to - /// be returned. + /// Gets or sets a value indicating whether the location details are to be + /// returned. /// - [JsonProperty(PropertyName = "locationDetails")] - public string LocationDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "locationDetails")] + public string LocationDetails {get; set; } /// /// Gets or sets a value indicating whether the agent details are to be /// fetched. /// - [JsonProperty(PropertyName = "fetchAgentDetails")] - public string FetchAgentDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fetchAgentDetails")] + public string FetchAgentDetails {get; set; } /// /// Gets or sets the BIOS Id to be used for fetching agent details. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; set; } /// /// Gets or sets the FQDN to be used for fetching agent details. /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdn")] + public string Fqdn {get; set; } /// - /// Gets or sets the type of the discovered machine to be used for - /// fetching agent details. + /// Gets or sets the type of the discovered machine to be used for fetching + /// agent details. /// - [JsonProperty(PropertyName = "discoveryType")] - public string DiscoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "discoveryType")] + public string DiscoveryType {get; set; } /// /// Gets or sets the OS type to be used for fetching agent details. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricReplicationGroupTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricReplicationGroupTaskDetails.cs index 3d01c8b8cfdd..b858e87b57c4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricReplicationGroupTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricReplicationGroupTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class FabricReplicationGroupTaskDetails : JobTaskDetails { /// - /// Initializes a new instance of the FabricReplicationGroupTaskDetails - /// class. + /// Initializes a new instance of the FabricReplicationGroupTaskDetails class. /// public FabricReplicationGroupTaskDetails() { @@ -29,18 +22,23 @@ public FabricReplicationGroupTaskDetails() } /// - /// Initializes a new instance of the FabricReplicationGroupTaskDetails - /// class. + /// Initializes a new instance of the FabricReplicationGroupTaskDetails class. /// - /// The job entity. - /// The skipped reason. - /// The skipped reason - /// string. + + /// The job entity. + /// + + /// The skipped reason. + /// + + /// The skipped reason string. + /// public FabricReplicationGroupTaskDetails(JobEntity jobTask = default(JobEntity), string skippedReason = default(string), string skippedReasonString = default(string)) - : base(jobTask) + + : base(jobTask) { - SkippedReason = skippedReason; - SkippedReasonString = skippedReasonString; + this.SkippedReason = skippedReason; + this.SkippedReasonString = skippedReasonString; CustomInit(); } @@ -49,17 +47,17 @@ public FabricReplicationGroupTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the skipped reason. /// - [JsonProperty(PropertyName = "skippedReason")] - public string SkippedReason { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "skippedReason")] + public string SkippedReason {get; set; } /// /// Gets or sets the skipped reason string. /// - [JsonProperty(PropertyName = "skippedReasonString")] - public string SkippedReasonString { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "skippedReasonString")] + public string SkippedReasonString {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificCreateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificCreateNetworkMappingInput.cs index c003e8479d84..4775594d2a08 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificCreateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificCreateNetworkMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class FabricSpecificCreateNetworkMappingInput { /// - /// Initializes a new instance of the - /// FabricSpecificCreateNetworkMappingInput class. + /// Initializes a new instance of the FabricSpecificCreateNetworkMappingInput class. /// public FabricSpecificCreateNetworkMappingInput() { @@ -35,4 +28,4 @@ public FabricSpecificCreateNetworkMappingInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificCreationInput.cs index 537737dc16fc..b88d234a0573 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class FabricSpecificCreationInput { /// - /// Initializes a new instance of the FabricSpecificCreationInput - /// class. + /// Initializes a new instance of the FabricSpecificCreationInput class. /// public FabricSpecificCreationInput() { @@ -35,4 +28,4 @@ public FabricSpecificCreationInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificDetails.cs index 1dd87dc0dea3..6e018bb807a2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public FabricSpecificDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificUpdateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificUpdateNetworkMappingInput.cs index ad1332b23e94..8e32a8bfab8b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificUpdateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FabricSpecificUpdateNetworkMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class FabricSpecificUpdateNetworkMappingInput { /// - /// Initializes a new instance of the - /// FabricSpecificUpdateNetworkMappingInput class. + /// Initializes a new instance of the FabricSpecificUpdateNetworkMappingInput class. /// public FabricSpecificUpdateNetworkMappingInput() { @@ -35,4 +28,4 @@ public FabricSpecificUpdateNetworkMappingInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverDeploymentModel.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverDeploymentModel.cs index fe0c5921f4a2..2ac1d44c4752 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverDeploymentModel.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverDeploymentModel.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for FailoverDeploymentModel. /// + + public static class FailoverDeploymentModel { public const string NotApplicable = "NotApplicable"; public const string Classic = "Classic"; public const string ResourceManager = "ResourceManager"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverJobDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverJobDetails.cs index 38f843a7506e..a4f86e0264d1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverJobDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverJobDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,14 +24,18 @@ public FailoverJobDetails() /// /// Initializes a new instance of the FailoverJobDetails class. /// - /// The affected object properties - /// like source server, source cloud, target server, target cloud etc. - /// based on the workflow object details. - /// The test VM details. - public FailoverJobDetails(IDictionary affectedObjectDetails = default(IDictionary), IList protectedItemDetails = default(IList)) - : base(affectedObjectDetails) + + /// The affected object properties like source server, source cloud, target + /// server, target cloud etc. based on the workflow object details. + /// + + /// The test VM details. + /// + public FailoverJobDetails(System.Collections.Generic.IDictionary affectedObjectDetails = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList protectedItemDetails = default(System.Collections.Generic.IList)) + + : base(affectedObjectDetails) { - ProtectedItemDetails = protectedItemDetails; + this.ProtectedItemDetails = protectedItemDetails; CustomInit(); } @@ -48,11 +44,11 @@ public FailoverJobDetails() /// partial void CustomInit(); + /// /// Gets or sets the test VM details. /// - [JsonProperty(PropertyName = "protectedItemDetails")] - public IList ProtectedItemDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemDetails")] + public System.Collections.Generic.IList ProtectedItemDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverProcessServerRequest.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverProcessServerRequest.cs index 860f6fab003e..67594a40917a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverProcessServerRequest.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverProcessServerRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class FailoverProcessServerRequest { /// - /// Initializes a new instance of the FailoverProcessServerRequest - /// class. + /// Initializes a new instance of the FailoverProcessServerRequest class. /// public FailoverProcessServerRequest() { @@ -28,14 +21,15 @@ public FailoverProcessServerRequest() } /// - /// Initializes a new instance of the FailoverProcessServerRequest - /// class. + /// Initializes a new instance of the FailoverProcessServerRequest class. /// - /// The properties of the PS Failover - /// request. + + /// The properties of the PS Failover request. + /// public FailoverProcessServerRequest(FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -44,11 +38,11 @@ public FailoverProcessServerRequest() /// partial void CustomInit(); + /// /// Gets or sets the properties of the PS Failover request. /// - [JsonProperty(PropertyName = "properties")] - public FailoverProcessServerRequestProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public FailoverProcessServerRequestProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverProcessServerRequestProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverProcessServerRequestProperties.cs index fde7cacddb45..75143365c6a5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverProcessServerRequestProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverProcessServerRequestProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class FailoverProcessServerRequestProperties { /// - /// Initializes a new instance of the - /// FailoverProcessServerRequestProperties class. + /// Initializes a new instance of the FailoverProcessServerRequestProperties class. /// public FailoverProcessServerRequestProperties() { @@ -30,23 +21,31 @@ public FailoverProcessServerRequestProperties() } /// - /// Initializes a new instance of the - /// FailoverProcessServerRequestProperties class. + /// Initializes a new instance of the FailoverProcessServerRequestProperties class. /// - /// The container identifier. - /// The source process - /// server. - /// The new process server. - /// The VMS to migrate. - /// A value for failover type. It can be - /// systemlevel/serverlevel. - public FailoverProcessServerRequestProperties(string containerName = default(string), string sourceProcessServerId = default(string), string targetProcessServerId = default(string), IList vmsToMigrate = default(IList), string updateType = default(string)) + + /// The container identifier. + /// + + /// The source process server. + /// + + /// The new process server. + /// + + /// The VMS to migrate. + /// + + /// A value for failover type. It can be systemlevel/serverlevel. + /// + public FailoverProcessServerRequestProperties(string containerName = default(string), string sourceProcessServerId = default(string), string targetProcessServerId = default(string), System.Collections.Generic.IList vmsToMigrate = default(System.Collections.Generic.IList), string updateType = default(string)) + { - ContainerName = containerName; - SourceProcessServerId = sourceProcessServerId; - TargetProcessServerId = targetProcessServerId; - VmsToMigrate = vmsToMigrate; - UpdateType = updateType; + this.ContainerName = containerName; + this.SourceProcessServerId = sourceProcessServerId; + this.TargetProcessServerId = targetProcessServerId; + this.VmsToMigrate = vmsToMigrate; + this.UpdateType = updateType; CustomInit(); } @@ -55,36 +54,35 @@ public FailoverProcessServerRequestProperties() /// partial void CustomInit(); + /// /// Gets or sets the container identifier. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets the source process server. /// - [JsonProperty(PropertyName = "sourceProcessServerId")] - public string SourceProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceProcessServerId")] + public string SourceProcessServerId {get; set; } /// /// Gets or sets the new process server. /// - [JsonProperty(PropertyName = "targetProcessServerId")] - public string TargetProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProcessServerId")] + public string TargetProcessServerId {get; set; } /// /// Gets or sets the VMS to migrate. /// - [JsonProperty(PropertyName = "vmsToMigrate")] - public IList VmsToMigrate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmsToMigrate")] + public System.Collections.Generic.IList VmsToMigrate {get; set; } /// - /// Gets or sets a value for failover type. It can be - /// systemlevel/serverlevel. + /// Gets or sets a value for failover type. It can be systemlevel/serverlevel. /// - [JsonProperty(PropertyName = "updateType")] - public string UpdateType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "updateType")] + public string UpdateType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverReplicationProtectedItemDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverReplicationProtectedItemDetails.cs index 4a76034c0692..91abee96a768 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverReplicationProtectedItemDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/FailoverReplicationProtectedItemDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class FailoverReplicationProtectedItemDetails { /// - /// Initializes a new instance of the - /// FailoverReplicationProtectedItemDetails class. + /// Initializes a new instance of the FailoverReplicationProtectedItemDetails class. /// public FailoverReplicationProtectedItemDetails() { @@ -28,31 +21,47 @@ public FailoverReplicationProtectedItemDetails() } /// - /// Initializes a new instance of the - /// FailoverReplicationProtectedItemDetails class. + /// Initializes a new instance of the FailoverReplicationProtectedItemDetails class. /// - /// The name. - /// The friendly name. - /// The test Vm name. - /// The test Vm friendly name. - /// The network connection - /// status. - /// The network friendly - /// name. - /// The network subnet. - /// The recovery point Id. - /// The recovery point time. - public FailoverReplicationProtectedItemDetails(string name = default(string), string friendlyName = default(string), string testVmName = default(string), string testVmFriendlyName = default(string), string networkConnectionStatus = default(string), string networkFriendlyName = default(string), string subnet = default(string), string recoveryPointId = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?)) + + /// The name. + /// + + /// The friendly name. + /// + + /// The test Vm name. + /// + + /// The test Vm friendly name. + /// + + /// The network connection status. + /// + + /// The network friendly name. + /// + + /// The network subnet. + /// + + /// The recovery point Id. + /// + + /// The recovery point time. + /// + public FailoverReplicationProtectedItemDetails(string name = default(string), string friendlyName = default(string), string testVMName = default(string), string testVMFriendlyName = default(string), string networkConnectionStatus = default(string), string networkFriendlyName = default(string), string subnet = default(string), string recoveryPointId = default(string), System.DateTime? recoveryPointTime = default(System.DateTime?)) + { - Name = name; - FriendlyName = friendlyName; - TestVmName = testVmName; - TestVmFriendlyName = testVmFriendlyName; - NetworkConnectionStatus = networkConnectionStatus; - NetworkFriendlyName = networkFriendlyName; - Subnet = subnet; - RecoveryPointId = recoveryPointId; - RecoveryPointTime = recoveryPointTime; + this.Name = name; + this.FriendlyName = friendlyName; + this.TestVMName = testVMName; + this.TestVMFriendlyName = testVMFriendlyName; + this.NetworkConnectionStatus = networkConnectionStatus; + this.NetworkFriendlyName = networkFriendlyName; + this.Subnet = subnet; + this.RecoveryPointId = recoveryPointId; + this.RecoveryPointTime = recoveryPointTime; CustomInit(); } @@ -61,59 +70,59 @@ public FailoverReplicationProtectedItemDetails() /// partial void CustomInit(); + /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the friendly name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the test Vm name. /// - [JsonProperty(PropertyName = "testVmName")] - public string TestVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testVmName")] + public string TestVMName {get; set; } /// /// Gets or sets the test Vm friendly name. /// - [JsonProperty(PropertyName = "testVmFriendlyName")] - public string TestVmFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testVmFriendlyName")] + public string TestVMFriendlyName {get; set; } /// /// Gets or sets the network connection status. /// - [JsonProperty(PropertyName = "networkConnectionStatus")] - public string NetworkConnectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkConnectionStatus")] + public string NetworkConnectionStatus {get; set; } /// /// Gets or sets the network friendly name. /// - [JsonProperty(PropertyName = "networkFriendlyName")] - public string NetworkFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkFriendlyName")] + public string NetworkFriendlyName {get; set; } /// /// Gets or sets the network subnet. /// - [JsonProperty(PropertyName = "subnet")] - public string Subnet { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subnet")] + public string Subnet {get; set; } /// /// Gets or sets the recovery point Id. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// /// Gets or sets the recovery point time. /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public System.DateTime? RecoveryPointTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/GroupTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/GroupTaskDetails.cs index 6ff662936263..1cefaf4e5308 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/GroupTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/GroupTaskDetails.cs @@ -1,23 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// This class represents the group task details when parent child - /// relationship exists in the drill down. + /// This class represents the group task details when parent child relationship + /// exists in the drill down. /// [Newtonsoft.Json.JsonObject("GroupTaskDetails")] public partial class GroupTaskDetails @@ -33,10 +25,13 @@ public GroupTaskDetails() /// /// Initializes a new instance of the GroupTaskDetails class. /// - /// The child tasks. - public GroupTaskDetails(IList childTasks = default(IList)) + + /// The child tasks. + /// + public GroupTaskDetails(System.Collections.Generic.IList childTasks = default(System.Collections.Generic.IList)) + { - ChildTasks = childTasks; + this.ChildTasks = childTasks; CustomInit(); } @@ -45,11 +40,11 @@ public GroupTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the child tasks. /// - [JsonProperty(PropertyName = "childTasks")] - public IList ChildTasks { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "childTasks")] + public System.Collections.Generic.IList ChildTasks {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthError.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthError.cs index a32264840521..3e307e9c6a0c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthError.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthError.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,48 +23,74 @@ public HealthError() /// /// Initializes a new instance of the HealthError class. /// - /// The inner health errors. - /// HealthError having a list of HealthError as child errors is - /// problematic. InnerHealthError is used because this will prevent an - /// infinite loop of structures when Hydra tries to auto-generate the - /// contract. We are exposing the related health errors as inner health - /// errors and all API consumers can utilize this in the same fashion - /// as Exception -&gt; InnerException. - /// Source of error. - /// Type of error. - /// Level of error. - /// Category of error. - /// Error code. - /// Summary message of the entity. - /// Error message. - /// Possible causes of error. - /// Recommended action to resolve - /// error. - /// Error creation time (UTC). - /// DRA error - /// message. - /// ID of the entity. - /// The health error unique id. - /// Value indicating whether the - /// health error is customer resolvable. Possible values include: - /// 'Allowed', 'NotAllowed' - public HealthError(IList innerHealthErrors = default(IList), string errorSource = default(string), string errorType = default(string), string errorLevel = default(string), string errorCategory = default(string), string errorCode = default(string), string summaryMessage = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), System.DateTime? creationTimeUtc = default(System.DateTime?), string recoveryProviderErrorMessage = default(string), string entityId = default(string), string errorId = default(string), string customerResolvability = default(string)) + + /// The inner health errors. HealthError having a list of HealthError as child + /// errors is problematic. InnerHealthError is used because this will prevent + /// an infinite loop of structures when Hydra tries to auto-generate the + /// contract. We are exposing the related health errors as inner health errors + /// and all API consumers can utilize this in the same fashion as Exception + /// -&gt; InnerException. + /// + + /// Source of error. + /// + + /// Type of error. + /// + + /// Level of error. + /// + + /// Category of error. + /// + + /// Error code. + /// + + /// Summary message of the entity. + /// + + /// Error message. + /// + + /// Possible causes of error. + /// + + /// Recommended action to resolve error. + /// + + /// Error creation time (UTC). + /// + + /// DRA error message. + /// + + /// ID of the entity. + /// + + /// The health error unique id. + /// + + /// Value indicating whether the health error is customer resolvable. + /// Possible values include: 'Allowed', 'NotAllowed' + public HealthError(System.Collections.Generic.IList innerHealthErrors = default(System.Collections.Generic.IList), string errorSource = default(string), string errorType = default(string), string errorLevel = default(string), string errorCategory = default(string), string errorCode = default(string), string summaryMessage = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), System.DateTime? creationTimeUtc = default(System.DateTime?), string recoveryProviderErrorMessage = default(string), string entityId = default(string), string errorId = default(string), string customerResolvability = default(string)) + { - InnerHealthErrors = innerHealthErrors; - ErrorSource = errorSource; - ErrorType = errorType; - ErrorLevel = errorLevel; - ErrorCategory = errorCategory; - ErrorCode = errorCode; - SummaryMessage = summaryMessage; - ErrorMessage = errorMessage; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - CreationTimeUtc = creationTimeUtc; - RecoveryProviderErrorMessage = recoveryProviderErrorMessage; - EntityId = entityId; - ErrorId = errorId; - CustomerResolvability = customerResolvability; + this.InnerHealthErrors = innerHealthErrors; + this.ErrorSource = errorSource; + this.ErrorType = errorType; + this.ErrorLevel = errorLevel; + this.ErrorCategory = errorCategory; + this.ErrorCode = errorCode; + this.SummaryMessage = summaryMessage; + this.ErrorMessage = errorMessage; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.CreationTimeUtc = creationTimeUtc; + this.RecoveryProviderErrorMessage = recoveryProviderErrorMessage; + this.EntityId = entityId; + this.ErrorId = errorId; + this.CustomerResolvability = customerResolvability; CustomInit(); } @@ -81,102 +99,101 @@ public HealthError() /// partial void CustomInit(); + /// /// Gets or sets the inner health errors. HealthError having a list of - /// HealthError as child errors is problematic. InnerHealthError is - /// used because this will prevent an infinite loop of structures when - /// Hydra tries to auto-generate the contract. We are exposing the - /// related health errors as inner health errors and all API consumers - /// can utilize this in the same fashion as Exception -&amp;gt; - /// InnerException. + /// HealthError as child errors is problematic. InnerHealthError is used + /// because this will prevent an infinite loop of structures when Hydra tries + /// to auto-generate the contract. We are exposing the related health errors as + /// inner health errors and all API consumers can utilize this in the same + /// fashion as Exception -&gt; InnerException. /// - [JsonProperty(PropertyName = "innerHealthErrors")] - public IList InnerHealthErrors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "innerHealthErrors")] + public System.Collections.Generic.IList InnerHealthErrors {get; set; } /// /// Gets or sets source of error. /// - [JsonProperty(PropertyName = "errorSource")] - public string ErrorSource { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorSource")] + public string ErrorSource {get; set; } /// /// Gets or sets type of error. /// - [JsonProperty(PropertyName = "errorType")] - public string ErrorType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorType")] + public string ErrorType {get; set; } /// /// Gets or sets level of error. /// - [JsonProperty(PropertyName = "errorLevel")] - public string ErrorLevel { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorLevel")] + public string ErrorLevel {get; set; } /// /// Gets or sets category of error. /// - [JsonProperty(PropertyName = "errorCategory")] - public string ErrorCategory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCategory")] + public string ErrorCategory {get; set; } /// /// Gets or sets error code. /// - [JsonProperty(PropertyName = "errorCode")] - public string ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public string ErrorCode {get; set; } /// /// Gets or sets summary message of the entity. /// - [JsonProperty(PropertyName = "summaryMessage")] - public string SummaryMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "summaryMessage")] + public string SummaryMessage {get; set; } /// /// Gets or sets error message. /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; set; } /// /// Gets or sets possible causes of error. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; set; } /// /// Gets or sets recommended action to resolve error. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; set; } /// /// Gets or sets error creation time (UTC). /// - [JsonProperty(PropertyName = "creationTimeUtc")] - public System.DateTime? CreationTimeUtc { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "creationTimeUtc")] + public System.DateTime? CreationTimeUtc {get; set; } /// - /// Gets or sets DRA error message. + /// Gets or sets dRA error message. /// - [JsonProperty(PropertyName = "recoveryProviderErrorMessage")] - public string RecoveryProviderErrorMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProviderErrorMessage")] + public string RecoveryProviderErrorMessage {get; set; } /// - /// Gets or sets ID of the entity. + /// Gets or sets iD of the entity. /// - [JsonProperty(PropertyName = "entityId")] - public string EntityId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "entityId")] + public string EntityId {get; set; } /// /// Gets or sets the health error unique id. /// - [JsonProperty(PropertyName = "errorId")] - public string ErrorId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorId")] + public string ErrorId {get; set; } /// /// Gets or sets value indicating whether the health error is customer - /// resolvable. Possible values include: 'Allowed', 'NotAllowed' + /// resolvable. Possible values include: 'Allowed', 'NotAllowed' /// - [JsonProperty(PropertyName = "customerResolvability")] - public string CustomerResolvability { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "customerResolvability")] + public string CustomerResolvability {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorCategory.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorCategory.cs index 6b3558c8aea0..e814921f2658 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorCategory.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorCategory.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for HealthErrorCategory. /// + + public static class HealthErrorCategory { public const string None = "None"; @@ -28,4 +25,4 @@ public static class HealthErrorCategory public const string AgentAutoUpdateRunAsAccountExpiry = "AgentAutoUpdateRunAsAccountExpiry"; public const string AgentAutoUpdateRunAsAccountExpired = "AgentAutoUpdateRunAsAccountExpired"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorCustomerResolvability.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorCustomerResolvability.cs index 32d20b721dc6..8bec5dd813c2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorCustomerResolvability.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorCustomerResolvability.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for HealthErrorCustomerResolvability. /// + + public static class HealthErrorCustomerResolvability { public const string Allowed = "Allowed"; public const string NotAllowed = "NotAllowed"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorSummary.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorSummary.cs index 55f84d81c49e..23816e6e2203 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorSummary.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HealthErrorSummary.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,35 +23,44 @@ public HealthErrorSummary() /// /// Initializes a new instance of the HealthErrorSummary class. /// - /// The code of the health error. - /// The category of the health error. Possible - /// values include: 'None', 'Replication', 'TestFailover', + + /// The code of the health error. + /// + + /// The category of the health error. + /// Possible values include: 'None', 'Replication', 'TestFailover', /// 'Configuration', 'FabricInfrastructure', 'VersionExpiry', /// 'AgentAutoUpdateInfra', 'AgentAutoUpdateArtifactDeleted', /// 'AgentAutoUpdateRunAsAccount', 'AgentAutoUpdateRunAsAccountExpiry', /// 'AgentAutoUpdateRunAsAccountExpired' - /// Severity of error. Possible values include: - /// 'NONE', 'Warning', 'Error', 'Info' - /// The summary message of the health - /// error. - /// The type of affected ARM - /// resource. - /// The sub type of any - /// subcomponent within the ARM resource that this might be applicable. - /// Value remains null if not applicable. - /// The list of affected - /// resource correlation Ids. This can be used to uniquely identify the - /// count of items affected by a specific category and severity as well - /// as count of item affected by an specific issue. - public HealthErrorSummary(string summaryCode = default(string), string category = default(string), string severity = default(string), string summaryMessage = default(string), string affectedResourceType = default(string), string affectedResourceSubtype = default(string), IList affectedResourceCorrelationIds = default(IList)) + + /// Severity of error. + /// Possible values include: 'NONE', 'Warning', 'Error', 'Info' + + /// The summary message of the health error. + /// + + /// The type of affected ARM resource. + /// + + /// The sub type of any subcomponent within the ARM resource that this might be + /// applicable. Value remains null if not applicable. + /// + + /// The list of affected resource correlation Ids. This can be used to uniquely + /// identify the count of items affected by a specific category and severity as + /// well as count of item affected by an specific issue. + /// + public HealthErrorSummary(string summaryCode = default(string), string category = default(string), string severity = default(string), string summaryMessage = default(string), string affectedResourceType = default(string), string affectedResourceSubtype = default(string), System.Collections.Generic.IList affectedResourceCorrelationIds = default(System.Collections.Generic.IList)) + { - SummaryCode = summaryCode; - Category = category; - Severity = severity; - SummaryMessage = summaryMessage; - AffectedResourceType = affectedResourceType; - AffectedResourceSubtype = affectedResourceSubtype; - AffectedResourceCorrelationIds = affectedResourceCorrelationIds; + this.SummaryCode = summaryCode; + this.Category = category; + this.Severity = severity; + this.SummaryMessage = summaryMessage; + this.AffectedResourceType = affectedResourceType; + this.AffectedResourceSubtype = affectedResourceSubtype; + this.AffectedResourceCorrelationIds = affectedResourceCorrelationIds; CustomInit(); } @@ -68,58 +69,51 @@ public HealthErrorSummary() /// partial void CustomInit(); + /// /// Gets or sets the code of the health error. /// - [JsonProperty(PropertyName = "summaryCode")] - public string SummaryCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "summaryCode")] + public string SummaryCode {get; set; } /// - /// Gets or sets the category of the health error. Possible values - /// include: 'None', 'Replication', 'TestFailover', 'Configuration', - /// 'FabricInfrastructure', 'VersionExpiry', 'AgentAutoUpdateInfra', - /// 'AgentAutoUpdateArtifactDeleted', 'AgentAutoUpdateRunAsAccount', - /// 'AgentAutoUpdateRunAsAccountExpiry', - /// 'AgentAutoUpdateRunAsAccountExpired' + /// Gets or sets the category of the health error. Possible values include: 'None', 'Replication', 'TestFailover', 'Configuration', 'FabricInfrastructure', 'VersionExpiry', 'AgentAutoUpdateInfra', 'AgentAutoUpdateArtifactDeleted', 'AgentAutoUpdateRunAsAccount', 'AgentAutoUpdateRunAsAccountExpiry', 'AgentAutoUpdateRunAsAccountExpired' /// - [JsonProperty(PropertyName = "category")] - public string Category { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "category")] + public string Category {get; set; } /// - /// Gets or sets severity of error. Possible values include: 'NONE', - /// 'Warning', 'Error', 'Info' + /// Gets or sets severity of error. Possible values include: 'NONE', 'Warning', 'Error', 'Info' /// - [JsonProperty(PropertyName = "severity")] - public string Severity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "severity")] + public string Severity {get; set; } /// /// Gets or sets the summary message of the health error. /// - [JsonProperty(PropertyName = "summaryMessage")] - public string SummaryMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "summaryMessage")] + public string SummaryMessage {get; set; } /// /// Gets or sets the type of affected ARM resource. /// - [JsonProperty(PropertyName = "affectedResourceType")] - public string AffectedResourceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedResourceType")] + public string AffectedResourceType {get; set; } /// - /// Gets or sets the sub type of any subcomponent within the ARM - /// resource that this might be applicable. Value remains null if not - /// applicable. + /// Gets or sets the sub type of any subcomponent within the ARM resource that + /// this might be applicable. Value remains null if not applicable. /// - [JsonProperty(PropertyName = "affectedResourceSubtype")] - public string AffectedResourceSubtype { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedResourceSubtype")] + public string AffectedResourceSubtype {get; set; } /// - /// Gets or sets the list of affected resource correlation Ids. This - /// can be used to uniquely identify the count of items affected by a - /// specific category and severity as well as count of item affected by - /// an specific issue. + /// Gets or sets the list of affected resource correlation Ids. This can be + /// used to uniquely identify the count of items affected by a specific + /// category and severity as well as count of item affected by an specific + /// issue. /// - [JsonProperty(PropertyName = "affectedResourceCorrelationIds")] - public IList AffectedResourceCorrelationIds { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedResourceCorrelationIds")] + public System.Collections.Generic.IList AffectedResourceCorrelationIds {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVHostDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVHostDetails.cs index 572622f14b34..d4107707785c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVHostDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVHostDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,21 @@ public HyperVHostDetails() /// /// Initializes a new instance of the HyperVHostDetails class. /// - /// The Hyper-V host Id. - /// The Hyper-V host name. - /// The Mars agent version. + + /// The Hyper-V host Id. + /// + + /// The Hyper-V host name. + /// + + /// The Mars agent version. + /// public HyperVHostDetails(string id = default(string), string name = default(string), string marsAgentVersion = default(string)) + { - Id = id; - Name = name; - MarsAgentVersion = marsAgentVersion; + this.Id = id; + this.Name = name; + this.MarsAgentVersion = marsAgentVersion; CustomInit(); } @@ -45,23 +46,23 @@ public HyperVHostDetails() /// partial void CustomInit(); + /// /// Gets the Hyper-V host Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the Hyper-V host name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the Mars agent version. /// - [JsonProperty(PropertyName = "marsAgentVersion")] - public string MarsAgentVersion { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "marsAgentVersion")] + public string MarsAgentVersion {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplica2012EventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplica2012EventDetails.cs index ae9d166ba4bd..13fa4d95b668 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplica2012EventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplica2012EventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplica2012EventDetails : EventProviderSpecificDetails { /// - /// Initializes a new instance of the HyperVReplica2012EventDetails - /// class. + /// Initializes a new instance of the HyperVReplica2012EventDetails class. /// public HyperVReplica2012EventDetails() { @@ -29,20 +22,27 @@ public HyperVReplica2012EventDetails() } /// - /// Initializes a new instance of the HyperVReplica2012EventDetails - /// class. + /// Initializes a new instance of the HyperVReplica2012EventDetails class. /// - /// The container friendly name. - /// The fabric friendly name. - /// The remote container - /// name. - /// The remote fabric name. + + /// The container friendly name. + /// + + /// The fabric friendly name. + /// + + /// The remote container name. + /// + + /// The remote fabric name. + /// public HyperVReplica2012EventDetails(string containerName = default(string), string fabricName = default(string), string remoteContainerName = default(string), string remoteFabricName = default(string)) + { - ContainerName = containerName; - FabricName = fabricName; - RemoteContainerName = remoteContainerName; - RemoteFabricName = remoteFabricName; + this.ContainerName = containerName; + this.FabricName = fabricName; + this.RemoteContainerName = remoteContainerName; + this.RemoteFabricName = remoteFabricName; CustomInit(); } @@ -51,29 +51,29 @@ public HyperVReplica2012EventDetails() /// partial void CustomInit(); + /// /// Gets or sets the container friendly name. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets the fabric friendly name. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// /// Gets or sets the remote container name. /// - [JsonProperty(PropertyName = "remoteContainerName")] - public string RemoteContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "remoteContainerName")] + public string RemoteContainerName {get; set; } /// /// Gets or sets the remote fabric name. /// - [JsonProperty(PropertyName = "remoteFabricName")] - public string RemoteFabricName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "remoteFabricName")] + public string RemoteFabricName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplica2012R2EventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplica2012R2EventDetails.cs index 1fd012597b42..05bf8053e004 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplica2012R2EventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplica2012R2EventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplica2012R2EventDetails : EventProviderSpecificDetails { /// - /// Initializes a new instance of the HyperVReplica2012R2EventDetails - /// class. + /// Initializes a new instance of the HyperVReplica2012R2EventDetails class. /// public HyperVReplica2012R2EventDetails() { @@ -29,20 +22,27 @@ public HyperVReplica2012R2EventDetails() } /// - /// Initializes a new instance of the HyperVReplica2012R2EventDetails - /// class. + /// Initializes a new instance of the HyperVReplica2012R2EventDetails class. /// - /// The container friendly name. - /// The fabric friendly name. - /// The remote container - /// name. - /// The remote fabric name. + + /// The container friendly name. + /// + + /// The fabric friendly name. + /// + + /// The remote container name. + /// + + /// The remote fabric name. + /// public HyperVReplica2012R2EventDetails(string containerName = default(string), string fabricName = default(string), string remoteContainerName = default(string), string remoteFabricName = default(string)) + { - ContainerName = containerName; - FabricName = fabricName; - RemoteContainerName = remoteContainerName; - RemoteFabricName = remoteFabricName; + this.ContainerName = containerName; + this.FabricName = fabricName; + this.RemoteContainerName = remoteContainerName; + this.RemoteFabricName = remoteFabricName; CustomInit(); } @@ -51,29 +51,29 @@ public HyperVReplica2012R2EventDetails() /// partial void CustomInit(); + /// /// Gets or sets the container friendly name. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets the fabric friendly name. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// /// Gets or sets the remote container name. /// - [JsonProperty(PropertyName = "remoteContainerName")] - public string RemoteContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "remoteContainerName")] + public string RemoteContainerName {get; set; } /// /// Gets or sets the remote fabric name. /// - [JsonProperty(PropertyName = "remoteFabricName")] - public string RemoteFabricName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "remoteFabricName")] + public string RemoteFabricName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureApplyRecoveryPointInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureApplyRecoveryPointInput.cs index b550e4d11242..5aad3a59e73c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureApplyRecoveryPointInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureApplyRecoveryPointInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureApplyRecoveryPointInput : ApplyRecoveryPointProviderSpecificInput { /// - /// Initializes a new instance of the - /// HyperVReplicaAzureApplyRecoveryPointInput class. + /// Initializes a new instance of the HyperVReplicaAzureApplyRecoveryPointInput class. /// public HyperVReplicaAzureApplyRecoveryPointInput() { @@ -29,17 +22,19 @@ public HyperVReplicaAzureApplyRecoveryPointInput() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzureApplyRecoveryPointInput class. + /// Initializes a new instance of the HyperVReplicaAzureApplyRecoveryPointInput class. /// - /// The primary kek certificate - /// pfx. - /// The secondary kek - /// certificate pfx. + + /// The primary kek certificate pfx. + /// + + /// The secondary kek certificate pfx. + /// public HyperVReplicaAzureApplyRecoveryPointInput(string primaryKekCertificatePfx = default(string), string secondaryKekCertificatePfx = default(string)) + { - PrimaryKekCertificatePfx = primaryKekCertificatePfx; - SecondaryKekCertificatePfx = secondaryKekCertificatePfx; + this.PrimaryKekCertificatePfx = primaryKekCertificatePfx; + this.SecondaryKekCertificatePfx = secondaryKekCertificatePfx; CustomInit(); } @@ -48,17 +43,17 @@ public HyperVReplicaAzureApplyRecoveryPointInput() /// partial void CustomInit(); + /// /// Gets or sets the primary kek certificate pfx. /// - [JsonProperty(PropertyName = "primaryKekCertificatePfx")] - public string PrimaryKekCertificatePfx { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryKekCertificatePfx")] + public string PrimaryKekCertificatePfx {get; set; } /// /// Gets or sets the secondary kek certificate pfx. /// - [JsonProperty(PropertyName = "secondaryKekCertificatePfx")] - public string SecondaryKekCertificatePfx { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "secondaryKekCertificatePfx")] + public string SecondaryKekCertificatePfx {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureDiskInputDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureDiskInputDetails.cs index 0a2bb08d58c9..bf25c2141518 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureDiskInputDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureDiskInputDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureDiskInputDetails { /// - /// Initializes a new instance of the - /// HyperVReplicaAzureDiskInputDetails class. + /// Initializes a new instance of the HyperVReplicaAzureDiskInputDetails class. /// public HyperVReplicaAzureDiskInputDetails() { @@ -28,21 +21,27 @@ public HyperVReplicaAzureDiskInputDetails() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzureDiskInputDetails class. + /// Initializes a new instance of the HyperVReplicaAzureDiskInputDetails class. /// - /// The DiskId. - /// The LogStorageAccountId. - /// The DiskType. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - /// The DiskEncryptionSet ARM - /// ID. + + /// The DiskId. + /// + + /// The LogStorageAccountId. + /// + + /// The DiskType. + /// Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + + /// The DiskEncryptionSet ARM ID. + /// public HyperVReplicaAzureDiskInputDetails(string diskId = default(string), string logStorageAccountId = default(string), string diskType = default(string), string diskEncryptionSetId = default(string)) + { - DiskId = diskId; - LogStorageAccountId = logStorageAccountId; - DiskType = diskType; - DiskEncryptionSetId = diskEncryptionSetId; + this.DiskId = diskId; + this.LogStorageAccountId = logStorageAccountId; + this.DiskType = diskType; + this.DiskEncryptionSetId = diskEncryptionSetId; CustomInit(); } @@ -51,30 +50,29 @@ public HyperVReplicaAzureDiskInputDetails() /// partial void CustomInit(); + /// /// Gets or sets the DiskId. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the LogStorageAccountId. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } /// - /// Gets or sets the DiskType. Possible values include: 'Standard_LRS', - /// 'Premium_LRS', 'StandardSSD_LRS' + /// Gets or sets the DiskType. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// /// Gets or sets the DiskEncryptionSet ARM ID. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureEnableProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureEnableProtectionInput.cs index b7273b5dcdb2..f2a551151c83 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureEnableProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureEnableProtectionInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureEnableProtectionInput : EnableProtectionProviderSpecificInput { /// - /// Initializes a new instance of the - /// HyperVReplicaAzureEnableProtectionInput class. + /// Initializes a new instance of the HyperVReplicaAzureEnableProtectionInput class. /// public HyperVReplicaAzureEnableProtectionInput() { @@ -31,91 +22,126 @@ public HyperVReplicaAzureEnableProtectionInput() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzureEnableProtectionInput class. + /// Initializes a new instance of the HyperVReplicaAzureEnableProtectionInput class. /// - /// The Hyper-V host VM Id. - /// The VM Name. - /// The OS type associated with VM. - /// The OS disk VHD id associated with VM. - /// The storage account - /// Id. - /// The selected target Azure - /// network Id. - /// The selected target Azure subnet - /// Id. - /// The selected option to enable - /// RDP\SSH on target vm after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. - /// The target azure VM Name. - /// The storage account to be used - /// for logging during replication. - /// The list of VHD Ids of disks to be - /// protected. - /// The Id of the target - /// resource group (for classic deployment) in which the failover VM is - /// to be created. - /// The Id of the target - /// resource group (for resource manager deployment) in which the - /// failover VM is to be created. - /// A value indicating whether managed - /// disks should be used during failover. - /// The target availability set - /// ARM Id for resource manager deployment. - /// The target availability - /// zone. - /// License type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'WindowsServer' + + /// The Hyper-V host VM Id. + /// + + /// The VM Name. + /// + + /// The OS type associated with VM. + /// + + /// The OS disk VHD id associated with VM. + /// + + /// The storage account Id. + /// + + /// The selected target Azure network Id. + /// + + /// The selected target Azure subnet Id. + /// + + /// The selected option to enable RDP\SSH on target vm after failover. String + /// value of SrsDataContract.EnableRDPOnTargetOption enum. + /// + + /// The target azure VM Name. + /// + + /// The storage account to be used for logging during replication. + /// + + /// The list of VHD Ids of disks to be protected. + /// + + /// The Id of the target resource group (for classic deployment) in which the + /// failover VM is to be created. + /// + + /// The Id of the target resource group (for resource manager deployment) in + /// which the failover VM is to be created. + /// + + /// A value indicating whether managed disks should be used during failover. + /// + + /// The target availability set ARM Id for resource manager deployment. + /// + + /// The target availability zone. + /// + + /// License type. + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' + /// The SQL Server license type. - /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', - /// 'AHUB' - /// The target VM size. - /// The proximity - /// placement group ARM Id. - /// A value indicating - /// whether managed disks should be used during replication. - /// The DiskType. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - /// The disks to include - /// list for managed disks. - /// The DiskEncryptionSet ARM - /// Id. - /// The target VM tags. - /// The tags for the seed managed - /// disks. - /// The tags for the target managed - /// disks. - /// The tags for the target NICs. - public HyperVReplicaAzureEnableProtectionInput(string hvHostVmId = default(string), string vmName = default(string), string osType = default(string), string vhdId = default(string), string targetStorageAccountId = default(string), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRdpOnTargetOption = default(string), string targetAzureVmName = default(string), string logStorageAccountId = default(string), IList disksToInclude = default(IList), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), string targetVmSize = default(string), string targetProximityPlacementGroupId = default(string), string useManagedDisksForReplication = default(string), string diskType = default(string), IList disksToIncludeForManagedDisks = default(IList), string diskEncryptionSetId = default(string), IDictionary targetVmTags = default(IDictionary), IDictionary seedManagedDiskTags = default(IDictionary), IDictionary targetManagedDiskTags = default(IDictionary), IDictionary targetNicTags = default(IDictionary)) + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + + /// The target VM size. + /// + + /// The proximity placement group ARM Id. + /// + + /// A value indicating whether managed disks should be used during replication. + /// + + /// The DiskType. + /// Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + + /// The disks to include list for managed disks. + /// + + /// The DiskEncryptionSet ARM Id. + /// + + /// The target VM tags. + /// + + /// The tags for the seed managed disks. + /// + + /// The tags for the target managed disks. + /// + + /// The tags for the target NICs. + /// + public HyperVReplicaAzureEnableProtectionInput(string hvHostVMId = default(string), string vmName = default(string), string osType = default(string), string vhdId = default(string), string targetStorageAccountId = default(string), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRdpOnTargetOption = default(string), string targetAzureVMName = default(string), string logStorageAccountId = default(string), System.Collections.Generic.IList disksToInclude = default(System.Collections.Generic.IList), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), string targetVMSize = default(string), string targetProximityPlacementGroupId = default(string), string useManagedDisksForReplication = default(string), string diskType = default(string), System.Collections.Generic.IList disksToIncludeForManagedDisks = default(System.Collections.Generic.IList), string diskEncryptionSetId = default(string), System.Collections.Generic.IDictionary targetVMTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary seedManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetNicTags = default(System.Collections.Generic.IDictionary)) + { - HvHostVmId = hvHostVmId; - VmName = vmName; - OsType = osType; - VhdId = vhdId; - TargetStorageAccountId = targetStorageAccountId; - TargetAzureNetworkId = targetAzureNetworkId; - TargetAzureSubnetId = targetAzureSubnetId; - EnableRdpOnTargetOption = enableRdpOnTargetOption; - TargetAzureVmName = targetAzureVmName; - LogStorageAccountId = logStorageAccountId; - DisksToInclude = disksToInclude; - TargetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId; - TargetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId; - UseManagedDisks = useManagedDisks; - TargetAvailabilitySetId = targetAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - LicenseType = licenseType; - SqlServerLicenseType = sqlServerLicenseType; - TargetVmSize = targetVmSize; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - UseManagedDisksForReplication = useManagedDisksForReplication; - DiskType = diskType; - DisksToIncludeForManagedDisks = disksToIncludeForManagedDisks; - DiskEncryptionSetId = diskEncryptionSetId; - TargetVmTags = targetVmTags; - SeedManagedDiskTags = seedManagedDiskTags; - TargetManagedDiskTags = targetManagedDiskTags; - TargetNicTags = targetNicTags; + this.HvHostVMId = hvHostVMId; + this.VMName = vmName; + this.OSType = osType; + this.VhdId = vhdId; + this.TargetStorageAccountId = targetStorageAccountId; + this.TargetAzureNetworkId = targetAzureNetworkId; + this.TargetAzureSubnetId = targetAzureSubnetId; + this.EnableRdpOnTargetOption = enableRdpOnTargetOption; + this.TargetAzureVMName = targetAzureVMName; + this.LogStorageAccountId = logStorageAccountId; + this.DisksToInclude = disksToInclude; + this.TargetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId; + this.TargetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId; + this.UseManagedDisks = useManagedDisks; + this.TargetAvailabilitySetId = targetAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.LicenseType = licenseType; + this.SqlServerLicenseType = sqlServerLicenseType; + this.TargetVMSize = targetVMSize; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.UseManagedDisksForReplication = useManagedDisksForReplication; + this.DiskType = diskType; + this.DisksToIncludeForManagedDisks = disksToIncludeForManagedDisks; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.TargetVMTags = targetVMTags; + this.SeedManagedDiskTags = seedManagedDiskTags; + this.TargetManagedDiskTags = targetManagedDiskTags; + this.TargetNicTags = targetNicTags; CustomInit(); } @@ -124,184 +150,179 @@ public HyperVReplicaAzureEnableProtectionInput() /// partial void CustomInit(); + /// /// Gets or sets the Hyper-V host VM Id. /// - [JsonProperty(PropertyName = "hvHostVmId")] - public string HvHostVmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hvHostVmId")] + public string HvHostVMId {get; set; } /// /// Gets or sets the VM Name. /// - [JsonProperty(PropertyName = "vmName")] - public string VmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmName")] + public string VMName {get; set; } /// /// Gets or sets the OS type associated with VM. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the OS disk VHD id associated with VM. /// - [JsonProperty(PropertyName = "vhdId")] - public string VhdId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vhdId")] + public string VhdId {get; set; } /// /// Gets or sets the storage account Id. /// - [JsonProperty(PropertyName = "targetStorageAccountId")] - public string TargetStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetStorageAccountId")] + public string TargetStorageAccountId {get; set; } /// /// Gets or sets the selected target Azure network Id. /// - [JsonProperty(PropertyName = "targetAzureNetworkId")] - public string TargetAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureNetworkId")] + public string TargetAzureNetworkId {get; set; } /// /// Gets or sets the selected target Azure subnet Id. /// - [JsonProperty(PropertyName = "targetAzureSubnetId")] - public string TargetAzureSubnetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureSubnetId")] + public string TargetAzureSubnetId {get; set; } /// - /// Gets or sets the selected option to enable RDP\SSH on target vm - /// after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. + /// Gets or sets the selected option to enable RDP\SSH on target vm after + /// failover. String value of SrsDataContract.EnableRDPOnTargetOption enum. /// - [JsonProperty(PropertyName = "enableRdpOnTargetOption")] - public string EnableRdpOnTargetOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableRdpOnTargetOption")] + public string EnableRdpOnTargetOption {get; set; } /// /// Gets or sets the target azure VM Name. /// - [JsonProperty(PropertyName = "targetAzureVmName")] - public string TargetAzureVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureVmName")] + public string TargetAzureVMName {get; set; } /// - /// Gets or sets the storage account to be used for logging during - /// replication. + /// Gets or sets the storage account to be used for logging during replication. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } /// /// Gets or sets the list of VHD Ids of disks to be protected. /// - [JsonProperty(PropertyName = "disksToInclude")] - public IList DisksToInclude { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "disksToInclude")] + public System.Collections.Generic.IList DisksToInclude {get; set; } /// - /// Gets or sets the Id of the target resource group (for classic - /// deployment) in which the failover VM is to be created. + /// Gets or sets the Id of the target resource group (for classic deployment) + /// in which the failover VM is to be created. /// - [JsonProperty(PropertyName = "targetAzureV1ResourceGroupId")] - public string TargetAzureV1ResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureV1ResourceGroupId")] + public string TargetAzureV1ResourceGroupId {get; set; } /// - /// Gets or sets the Id of the target resource group (for resource - /// manager deployment) in which the failover VM is to be created. + /// Gets or sets the Id of the target resource group (for resource manager + /// deployment) in which the failover VM is to be created. /// - [JsonProperty(PropertyName = "targetAzureV2ResourceGroupId")] - public string TargetAzureV2ResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureV2ResourceGroupId")] + public string TargetAzureV2ResourceGroupId {get; set; } /// - /// Gets or sets a value indicating whether managed disks should be - /// used during failover. + /// Gets or sets a value indicating whether managed disks should be used during + /// failover. /// - [JsonProperty(PropertyName = "useManagedDisks")] - public string UseManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks {get; set; } /// - /// Gets or sets the target availability set ARM Id for resource - /// manager deployment. + /// Gets or sets the target availability set ARM Id for resource manager + /// deployment. /// - [JsonProperty(PropertyName = "targetAvailabilitySetId")] - public string TargetAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilitySetId")] + public string TargetAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// - /// Gets or sets license type. Possible values include: 'NotSpecified', - /// 'NoLicenseType', 'WindowsServer' + /// Gets or sets license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// - /// Gets or sets the SQL Server license type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + /// Gets or sets the SQL Server license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' /// - [JsonProperty(PropertyName = "sqlServerLicenseType")] - public string SqlServerLicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerLicenseType")] + public string SqlServerLicenseType {get; set; } /// /// Gets or sets the target VM size. /// - [JsonProperty(PropertyName = "targetVmSize")] - public string TargetVmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSize")] + public string TargetVMSize {get; set; } /// /// Gets or sets the proximity placement group ARM Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// - /// Gets or sets a value indicating whether managed disks should be - /// used during replication. + /// Gets or sets a value indicating whether managed disks should be used during + /// replication. /// - [JsonProperty(PropertyName = "useManagedDisksForReplication")] - public string UseManagedDisksForReplication { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "useManagedDisksForReplication")] + public string UseManagedDisksForReplication {get; set; } /// - /// Gets or sets the DiskType. Possible values include: 'Standard_LRS', - /// 'Premium_LRS', 'StandardSSD_LRS' + /// Gets or sets the DiskType. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// /// Gets or sets the disks to include list for managed disks. /// - [JsonProperty(PropertyName = "disksToIncludeForManagedDisks")] - public IList DisksToIncludeForManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "disksToIncludeForManagedDisks")] + public System.Collections.Generic.IList DisksToIncludeForManagedDisks {get; set; } /// /// Gets or sets the DiskEncryptionSet ARM Id. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } /// /// Gets or sets the target VM tags. /// - [JsonProperty(PropertyName = "targetVmTags")] - public IDictionary TargetVmTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmTags")] + public System.Collections.Generic.IDictionary TargetVMTags {get; set; } /// /// Gets or sets the tags for the seed managed disks. /// - [JsonProperty(PropertyName = "seedManagedDiskTags")] - public IDictionary SeedManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedManagedDiskTags")] + public System.Collections.Generic.IDictionary SeedManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target managed disks. /// - [JsonProperty(PropertyName = "targetManagedDiskTags")] - public IDictionary TargetManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetManagedDiskTags")] + public System.Collections.Generic.IDictionary TargetManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target NICs. /// - [JsonProperty(PropertyName = "targetNicTags")] - public IDictionary TargetNicTags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicTags")] + public System.Collections.Generic.IDictionary TargetNicTags {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureEventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureEventDetails.cs index 68f05b52408d..60f27aef8280 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureEventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureEventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureEventDetails : EventProviderSpecificDetails { /// - /// Initializes a new instance of the HyperVReplicaAzureEventDetails - /// class. + /// Initializes a new instance of the HyperVReplicaAzureEventDetails class. /// public HyperVReplicaAzureEventDetails() { @@ -29,18 +22,23 @@ public HyperVReplicaAzureEventDetails() } /// - /// Initializes a new instance of the HyperVReplicaAzureEventDetails - /// class. + /// Initializes a new instance of the HyperVReplicaAzureEventDetails class. /// - /// The container friendly name. - /// The fabric friendly name. - /// The remote container - /// name. + + /// The container friendly name. + /// + + /// The fabric friendly name. + /// + + /// The remote container name. + /// public HyperVReplicaAzureEventDetails(string containerName = default(string), string fabricName = default(string), string remoteContainerName = default(string)) + { - ContainerName = containerName; - FabricName = fabricName; - RemoteContainerName = remoteContainerName; + this.ContainerName = containerName; + this.FabricName = fabricName; + this.RemoteContainerName = remoteContainerName; CustomInit(); } @@ -49,23 +47,23 @@ public HyperVReplicaAzureEventDetails() /// partial void CustomInit(); + /// /// Gets or sets the container friendly name. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets the fabric friendly name. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// /// Gets or sets the remote container name. /// - [JsonProperty(PropertyName = "remoteContainerName")] - public string RemoteContainerName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "remoteContainerName")] + public string RemoteContainerName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureFailbackProviderInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureFailbackProviderInput.cs index 33398747c760..49128321f9dc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureFailbackProviderInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureFailbackProviderInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureFailbackProviderInput : PlannedFailoverProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// HyperVReplicaAzureFailbackProviderInput class. + /// Initializes a new instance of the HyperVReplicaAzureFailbackProviderInput class. /// public HyperVReplicaAzureFailbackProviderInput() { @@ -29,19 +22,23 @@ public HyperVReplicaAzureFailbackProviderInput() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzureFailbackProviderInput class. + /// Initializes a new instance of the HyperVReplicaAzureFailbackProviderInput class. /// - /// Data sync option. - /// ALR options to create - /// alternate recovery. - /// Provider Id for - /// alternate location. - public HyperVReplicaAzureFailbackProviderInput(string dataSyncOption = default(string), string recoveryVmCreationOption = default(string), string providerIdForAlternateRecovery = default(string)) + + /// Data sync option. + /// + + /// ALR options to create alternate recovery. + /// + + /// Provider Id for alternate location. + /// + public HyperVReplicaAzureFailbackProviderInput(string dataSyncOption = default(string), string recoveryVMCreationOption = default(string), string providerIdForAlternateRecovery = default(string)) + { - DataSyncOption = dataSyncOption; - RecoveryVmCreationOption = recoveryVmCreationOption; - ProviderIdForAlternateRecovery = providerIdForAlternateRecovery; + this.DataSyncOption = dataSyncOption; + this.RecoveryVMCreationOption = recoveryVMCreationOption; + this.ProviderIdForAlternateRecovery = providerIdForAlternateRecovery; CustomInit(); } @@ -50,23 +47,23 @@ public HyperVReplicaAzureFailbackProviderInput() /// partial void CustomInit(); + /// /// Gets or sets data sync option. /// - [JsonProperty(PropertyName = "dataSyncOption")] - public string DataSyncOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataSyncOption")] + public string DataSyncOption {get; set; } /// - /// Gets or sets ALR options to create alternate recovery. + /// Gets or sets aLR options to create alternate recovery. /// - [JsonProperty(PropertyName = "recoveryVmCreationOption")] - public string RecoveryVmCreationOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVmCreationOption")] + public string RecoveryVMCreationOption {get; set; } /// /// Gets or sets provider Id for alternate location. /// - [JsonProperty(PropertyName = "providerIdForAlternateRecovery")] - public string ProviderIdForAlternateRecovery { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerIdForAlternateRecovery")] + public string ProviderIdForAlternateRecovery {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureManagedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureManagedDiskDetails.cs index b98bd5790f55..efb51aefef9e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureManagedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureManagedDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureManagedDiskDetails { /// - /// Initializes a new instance of the - /// HyperVReplicaAzureManagedDiskDetails class. + /// Initializes a new instance of the HyperVReplicaAzureManagedDiskDetails class. /// public HyperVReplicaAzureManagedDiskDetails() { @@ -28,20 +21,27 @@ public HyperVReplicaAzureManagedDiskDetails() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzureManagedDiskDetails class. + /// Initializes a new instance of the HyperVReplicaAzureManagedDiskDetails class. /// - /// The disk Id. - /// Seed managed disk Id. - /// The replica disk type. - /// The disk encryption set ARM - /// Id. + + /// The disk Id. + /// + + /// Seed managed disk Id. + /// + + /// The replica disk type. + /// + + /// The disk encryption set ARM Id. + /// public HyperVReplicaAzureManagedDiskDetails(string diskId = default(string), string seedManagedDiskId = default(string), string replicaDiskType = default(string), string diskEncryptionSetId = default(string)) + { - DiskId = diskId; - SeedManagedDiskId = seedManagedDiskId; - ReplicaDiskType = replicaDiskType; - DiskEncryptionSetId = diskEncryptionSetId; + this.DiskId = diskId; + this.SeedManagedDiskId = seedManagedDiskId; + this.ReplicaDiskType = replicaDiskType; + this.DiskEncryptionSetId = diskEncryptionSetId; CustomInit(); } @@ -50,29 +50,29 @@ public HyperVReplicaAzureManagedDiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets seed managed disk Id. /// - [JsonProperty(PropertyName = "seedManagedDiskId")] - public string SeedManagedDiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedManagedDiskId")] + public string SeedManagedDiskId {get; set; } /// /// Gets or sets the replica disk type. /// - [JsonProperty(PropertyName = "replicaDiskType")] - public string ReplicaDiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaDiskType")] + public string ReplicaDiskType {get; set; } /// /// Gets or sets the disk encryption set ARM Id. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePlannedFailoverProviderInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePlannedFailoverProviderInput.cs index 4018e7885c5d..a448f35b5fa8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePlannedFailoverProviderInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePlannedFailoverProviderInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzurePlannedFailoverProviderInput : PlannedFailoverProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// HyperVReplicaAzurePlannedFailoverProviderInput class. + /// Initializes a new instance of the HyperVReplicaAzurePlannedFailoverProviderInput class. /// public HyperVReplicaAzurePlannedFailoverProviderInput() { @@ -29,21 +22,24 @@ public HyperVReplicaAzurePlannedFailoverProviderInput() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzurePlannedFailoverProviderInput class. + /// Initializes a new instance of the HyperVReplicaAzurePlannedFailoverProviderInput class. /// - /// Primary kek certificate - /// pfx. - /// Secondary kek certificate - /// pfx. - /// The recovery point id to be passed to - /// failover to a particular recovery point. In case of latest recovery - /// point, null should be passed. + + /// Primary kek certificate pfx. + /// + + /// Secondary kek certificate pfx. + /// + + /// The recovery point id to be passed to failover to a particular recovery + /// point. In case of latest recovery point, null should be passed. + /// public HyperVReplicaAzurePlannedFailoverProviderInput(string primaryKekCertificatePfx = default(string), string secondaryKekCertificatePfx = default(string), string recoveryPointId = default(string)) + { - PrimaryKekCertificatePfx = primaryKekCertificatePfx; - SecondaryKekCertificatePfx = secondaryKekCertificatePfx; - RecoveryPointId = recoveryPointId; + this.PrimaryKekCertificatePfx = primaryKekCertificatePfx; + this.SecondaryKekCertificatePfx = secondaryKekCertificatePfx; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -52,25 +48,24 @@ public HyperVReplicaAzurePlannedFailoverProviderInput() /// partial void CustomInit(); + /// /// Gets or sets primary kek certificate pfx. /// - [JsonProperty(PropertyName = "primaryKekCertificatePfx")] - public string PrimaryKekCertificatePfx { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryKekCertificatePfx")] + public string PrimaryKekCertificatePfx {get; set; } /// /// Gets or sets secondary kek certificate pfx. /// - [JsonProperty(PropertyName = "secondaryKekCertificatePfx")] - public string SecondaryKekCertificatePfx { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secondaryKekCertificatePfx")] + public string SecondaryKekCertificatePfx {get; set; } /// - /// Gets or sets the recovery point id to be passed to failover to a - /// particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePolicyDetails.cs index 6d95e3e70516..c2b52db84829 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzurePolicyDetails : PolicyProviderSpecificDetails { /// - /// Initializes a new instance of the HyperVReplicaAzurePolicyDetails - /// class. + /// Initializes a new instance of the HyperVReplicaAzurePolicyDetails class. /// public HyperVReplicaAzurePolicyDetails() { @@ -29,31 +22,39 @@ public HyperVReplicaAzurePolicyDetails() } /// - /// Initializes a new instance of the HyperVReplicaAzurePolicyDetails - /// class. + /// Initializes a new instance of the HyperVReplicaAzurePolicyDetails class. /// - /// The duration (in - /// hours) to which point the recovery history needs to be - /// maintained. - /// The - /// interval (in hours) at which Hyper-V Replica should create an - /// application consistent snapshot within the VM. - /// The replication interval. - /// The scheduled start time - /// for the initial replication. If this parameter is Null, the initial - /// replication starts immediately. - /// A value indicating whether encryption is - /// enabled for virtual machines in this cloud. - /// The active storage account - /// Id. + + /// The duration (in hours) to which point the recovery history needs to be + /// maintained. + /// + + /// The interval (in hours) at which Hyper-V Replica should create an + /// application consistent snapshot within the VM. + /// + + /// The replication interval. + /// + + /// The scheduled start time for the initial replication. If this parameter is + /// Null, the initial replication starts immediately. + /// + + /// A value indicating whether encryption is enabled for virtual machines in + /// this cloud. + /// + + /// The active storage account Id. + /// public HyperVReplicaAzurePolicyDetails(int? recoveryPointHistoryDurationInHours = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), int? replicationInterval = default(int?), string onlineReplicationStartTime = default(string), string encryption = default(string), string activeStorageAccountId = default(string)) + { - RecoveryPointHistoryDurationInHours = recoveryPointHistoryDurationInHours; - ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; - ReplicationInterval = replicationInterval; - OnlineReplicationStartTime = onlineReplicationStartTime; - Encryption = encryption; - ActiveStorageAccountId = activeStorageAccountId; + this.RecoveryPointHistoryDurationInHours = recoveryPointHistoryDurationInHours; + this.ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + this.ReplicationInterval = replicationInterval; + this.OnlineReplicationStartTime = onlineReplicationStartTime; + this.Encryption = encryption; + this.ActiveStorageAccountId = activeStorageAccountId; CustomInit(); } @@ -62,46 +63,45 @@ public HyperVReplicaAzurePolicyDetails() /// partial void CustomInit(); + /// - /// Gets or sets the duration (in hours) to which point the recovery - /// history needs to be maintained. + /// Gets or sets the duration (in hours) to which point the recovery history + /// needs to be maintained. /// - [JsonProperty(PropertyName = "recoveryPointHistoryDurationInHours")] - public int? RecoveryPointHistoryDurationInHours { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistoryDurationInHours")] + public int? RecoveryPointHistoryDurationInHours {get; set; } /// - /// Gets or sets the interval (in hours) at which Hyper-V Replica - /// should create an application consistent snapshot within the VM. + /// Gets or sets the interval (in hours) at which Hyper-V Replica should create + /// an application consistent snapshot within the VM. /// - [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] - public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours {get; set; } /// /// Gets or sets the replication interval. /// - [JsonProperty(PropertyName = "replicationInterval")] - public int? ReplicationInterval { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationInterval")] + public int? ReplicationInterval {get; set; } /// - /// Gets or sets the scheduled start time for the initial replication. - /// If this parameter is Null, the initial replication starts - /// immediately. + /// Gets or sets the scheduled start time for the initial replication. If this + /// parameter is Null, the initial replication starts immediately. /// - [JsonProperty(PropertyName = "onlineReplicationStartTime")] - public string OnlineReplicationStartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime {get; set; } /// - /// Gets or sets a value indicating whether encryption is enabled for - /// virtual machines in this cloud. + /// Gets or sets a value indicating whether encryption is enabled for virtual + /// machines in this cloud. /// - [JsonProperty(PropertyName = "encryption")] - public string Encryption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "encryption")] + public string Encryption {get; set; } /// /// Gets or sets the active storage account Id. /// - [JsonProperty(PropertyName = "activeStorageAccountId")] - public string ActiveStorageAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "activeStorageAccountId")] + public string ActiveStorageAccountId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePolicyInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePolicyInput.cs index d73e70d94c06..bd7fdac4a60f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePolicyInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzurePolicyInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzurePolicyInput : PolicyProviderSpecificInput { /// - /// Initializes a new instance of the HyperVReplicaAzurePolicyInput - /// class. + /// Initializes a new instance of the HyperVReplicaAzurePolicyInput class. /// public HyperVReplicaAzurePolicyInput() { @@ -31,27 +22,35 @@ public HyperVReplicaAzurePolicyInput() } /// - /// Initializes a new instance of the HyperVReplicaAzurePolicyInput - /// class. + /// Initializes a new instance of the HyperVReplicaAzurePolicyInput class. /// - /// The duration (in hours) - /// to which point the recovery history needs to be maintained. - /// The - /// interval (in hours) at which Hyper-V Replica should create an - /// application consistent snapshot within the VM. - /// The replication interval. - /// The scheduled start time - /// for the initial replication. If this parameter is Null, the initial - /// replication starts immediately. - /// The list of storage accounts to which - /// the VMs in the primary cloud can replicate to. - public HyperVReplicaAzurePolicyInput(int? recoveryPointHistoryDuration = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), int? replicationInterval = default(int?), string onlineReplicationStartTime = default(string), IList storageAccounts = default(IList)) + + /// The duration (in hours) to which point the recovery history needs to be + /// maintained. + /// + + /// The interval (in hours) at which Hyper-V Replica should create an + /// application consistent snapshot within the VM. + /// + + /// The replication interval. + /// + + /// The scheduled start time for the initial replication. If this parameter is + /// Null, the initial replication starts immediately. + /// + + /// The list of storage accounts to which the VMs in the primary cloud can + /// replicate to. + /// + public HyperVReplicaAzurePolicyInput(int? recoveryPointHistoryDuration = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), int? replicationInterval = default(int?), string onlineReplicationStartTime = default(string), System.Collections.Generic.IList storageAccounts = default(System.Collections.Generic.IList)) + { - RecoveryPointHistoryDuration = recoveryPointHistoryDuration; - ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; - ReplicationInterval = replicationInterval; - OnlineReplicationStartTime = onlineReplicationStartTime; - StorageAccounts = storageAccounts; + this.RecoveryPointHistoryDuration = recoveryPointHistoryDuration; + this.ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + this.ReplicationInterval = replicationInterval; + this.OnlineReplicationStartTime = onlineReplicationStartTime; + this.StorageAccounts = storageAccounts; CustomInit(); } @@ -60,40 +59,39 @@ public HyperVReplicaAzurePolicyInput() /// partial void CustomInit(); + /// - /// Gets or sets the duration (in hours) to which point the recovery - /// history needs to be maintained. + /// Gets or sets the duration (in hours) to which point the recovery history + /// needs to be maintained. /// - [JsonProperty(PropertyName = "recoveryPointHistoryDuration")] - public int? RecoveryPointHistoryDuration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistoryDuration")] + public int? RecoveryPointHistoryDuration {get; set; } /// - /// Gets or sets the interval (in hours) at which Hyper-V Replica - /// should create an application consistent snapshot within the VM. + /// Gets or sets the interval (in hours) at which Hyper-V Replica should create + /// an application consistent snapshot within the VM. /// - [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] - public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours {get; set; } /// /// Gets or sets the replication interval. /// - [JsonProperty(PropertyName = "replicationInterval")] - public int? ReplicationInterval { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationInterval")] + public int? ReplicationInterval {get; set; } /// - /// Gets or sets the scheduled start time for the initial replication. - /// If this parameter is Null, the initial replication starts - /// immediately. + /// Gets or sets the scheduled start time for the initial replication. If this + /// parameter is Null, the initial replication starts immediately. /// - [JsonProperty(PropertyName = "onlineReplicationStartTime")] - public string OnlineReplicationStartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime {get; set; } /// - /// Gets or sets the list of storage accounts to which the VMs in the - /// primary cloud can replicate to. + /// Gets or sets the list of storage accounts to which the VMs in the primary + /// cloud can replicate to. /// - [JsonProperty(PropertyName = "storageAccounts")] - public IList StorageAccounts { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccounts")] + public System.Collections.Generic.IList StorageAccounts {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureReplicationDetails.cs index 697b99c10322..af85ad8ec9de 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureReplicationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureReplicationDetails : ReplicationProviderSpecificSettings { /// - /// Initializes a new instance of the - /// HyperVReplicaAzureReplicationDetails class. + /// Initializes a new instance of the HyperVReplicaAzureReplicationDetails class. /// public HyperVReplicaAzureReplicationDetails() { @@ -31,104 +22,147 @@ public HyperVReplicaAzureReplicationDetails() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzureReplicationDetails class. - /// - /// Azure VM Disk details. - /// Recovery Azure given - /// name. - /// The Recovery Azure VM - /// size. - /// The recovery Azure - /// storage account. - /// The ARM id of the - /// log storage account used for replication. This will be set to null - /// if no log storage account was provided during enable - /// protection. - /// The Last replication time. - /// Last RPO value. - /// The last RPO calculated - /// time. - /// The virtual machine Id. - /// The protection state for the - /// vm. - /// The protection state - /// description for the vm. - /// Initial replication - /// details. - /// The PE Network details. - /// The selected recovery - /// azure network Id. - /// The selected source nic Id which - /// will be used as the primary nic during failover. - /// The encryption info. - /// The operating system info. - /// The RAM size of the VM on the - /// primary side. - /// The CPU count of the VM on the - /// primary side. - /// The selected option to enable - /// RDP\SSH on target vm after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. - /// The target resource - /// group Id. - /// The recovery availability - /// set Id. - /// The target availability - /// zone. - /// The target proximity - /// placement group Id. - /// A value indicating whether managed - /// disks should be used during failover. - /// License Type of the VM to be - /// used. - /// The SQL Server license - /// type. - /// The last recovery point - /// received time. - /// The target VM tags. - /// The tags for the seed managed - /// disks. - /// The tags for the target managed - /// disks. - /// The tags for the target NICs. - /// The list of protected managed - /// disks. - public HyperVReplicaAzureReplicationDetails(IList azureVmDiskDetails = default(IList), string recoveryAzureVmName = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureStorageAccount = default(string), string recoveryAzureLogStorageAccountId = default(string), System.DateTime? lastReplicatedTime = default(System.DateTime?), long? rpoInSeconds = default(long?), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), IList vmNics = default(IList), string selectedRecoveryAzureNetworkId = default(string), string selectedSourceNicId = default(string), string encryption = default(string), OSDetails oSDetails = default(OSDetails), int? sourceVmRamSizeInMB = default(int?), int? sourceVmCpuCount = default(int?), string enableRdpOnTargetOption = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string useManagedDisks = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?), IDictionary targetVmTags = default(IDictionary), IDictionary seedManagedDiskTags = default(IDictionary), IDictionary targetManagedDiskTags = default(IDictionary), IDictionary targetNicTags = default(IDictionary), IList protectedManagedDisks = default(IList)) + /// Initializes a new instance of the HyperVReplicaAzureReplicationDetails class. + /// + + /// Azure VM Disk details. + /// + + /// Recovery Azure given name. + /// + + /// The Recovery Azure VM size. + /// + + /// The recovery Azure storage account. + /// + + /// The ARM id of the log storage account used for replication. This will be + /// set to null if no log storage account was provided during enable + /// protection. + /// + + /// The Last replication time. + /// + + /// Last RPO value. + /// + + /// The last RPO calculated time. + /// + + /// The virtual machine Id. + /// + + /// The protection state for the vm. + /// + + /// The protection state description for the vm. + /// + + /// Initial replication details. + /// + + /// The PE Network details. + /// + + /// The selected recovery azure network Id. + /// + + /// The selected source nic Id which will be used as the primary nic during + /// failover. + /// + + /// The encryption info. + /// + + /// The operating system info. + /// + + /// The RAM size of the VM on the primary side. + /// + + /// The CPU count of the VM on the primary side. + /// + + /// The selected option to enable RDP\SSH on target vm after failover. String + /// value of SrsDataContract.EnableRDPOnTargetOption enum. + /// + + /// The target resource group Id. + /// + + /// The recovery availability set Id. + /// + + /// The target availability zone. + /// + + /// The target proximity placement group Id. + /// + + /// A value indicating whether managed disks should be used during failover. + /// + + /// License Type of the VM to be used. + /// + + /// The SQL Server license type. + /// + + /// The last recovery point received time. + /// + + /// The target VM tags. + /// + + /// The tags for the seed managed disks. + /// + + /// The tags for the target managed disks. + /// + + /// The tags for the target NICs. + /// + + /// The list of protected managed disks. + /// + public HyperVReplicaAzureReplicationDetails(System.Collections.Generic.IList azureVMDiskDetails = default(System.Collections.Generic.IList), string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureStorageAccount = default(string), string recoveryAzureLogStorageAccountId = default(string), System.DateTime? lastReplicatedTime = default(System.DateTime?), long? rpoInSeconds = default(long?), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), string selectedRecoveryAzureNetworkId = default(string), string selectedSourceNicId = default(string), string encryption = default(string), OSDetails osDetails = default(OSDetails), int? sourceVMRamSizeInMb = default(int?), int? sourceVMCpuCount = default(int?), string enableRdpOnTargetOption = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string useManagedDisks = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?), System.Collections.Generic.IDictionary targetVMTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary seedManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetNicTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList protectedManagedDisks = default(System.Collections.Generic.IList)) + { - AzureVmDiskDetails = azureVmDiskDetails; - RecoveryAzureVmName = recoveryAzureVmName; - RecoveryAzureVMSize = recoveryAzureVMSize; - RecoveryAzureStorageAccount = recoveryAzureStorageAccount; - RecoveryAzureLogStorageAccountId = recoveryAzureLogStorageAccountId; - LastReplicatedTime = lastReplicatedTime; - RpoInSeconds = rpoInSeconds; - LastRpoCalculatedTime = lastRpoCalculatedTime; - VmId = vmId; - VmProtectionState = vmProtectionState; - VmProtectionStateDescription = vmProtectionStateDescription; - InitialReplicationDetails = initialReplicationDetails; - VmNics = vmNics; - SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; - SelectedSourceNicId = selectedSourceNicId; - Encryption = encryption; - OSDetails = oSDetails; - SourceVmRamSizeInMB = sourceVmRamSizeInMB; - SourceVmCpuCount = sourceVmCpuCount; - EnableRdpOnTargetOption = enableRdpOnTargetOption; - RecoveryAzureResourceGroupId = recoveryAzureResourceGroupId; - RecoveryAvailabilitySetId = recoveryAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - UseManagedDisks = useManagedDisks; - LicenseType = licenseType; - SqlServerLicenseType = sqlServerLicenseType; - LastRecoveryPointReceived = lastRecoveryPointReceived; - TargetVmTags = targetVmTags; - SeedManagedDiskTags = seedManagedDiskTags; - TargetManagedDiskTags = targetManagedDiskTags; - TargetNicTags = targetNicTags; - ProtectedManagedDisks = protectedManagedDisks; + this.AzureVMDiskDetails = azureVMDiskDetails; + this.RecoveryAzureVMName = recoveryAzureVMName; + this.RecoveryAzureVMSize = recoveryAzureVMSize; + this.RecoveryAzureStorageAccount = recoveryAzureStorageAccount; + this.RecoveryAzureLogStorageAccountId = recoveryAzureLogStorageAccountId; + this.LastReplicatedTime = lastReplicatedTime; + this.RpoInSeconds = rpoInSeconds; + this.LastRpoCalculatedTime = lastRpoCalculatedTime; + this.VMId = vmId; + this.VMProtectionState = vmProtectionState; + this.VMProtectionStateDescription = vmProtectionStateDescription; + this.InitialReplicationDetails = initialReplicationDetails; + this.VMNics = vmNics; + this.SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + this.SelectedSourceNicId = selectedSourceNicId; + this.Encryption = encryption; + this.OSDetails = osDetails; + this.SourceVMRamSizeInMb = sourceVMRamSizeInMb; + this.SourceVMCpuCount = sourceVMCpuCount; + this.EnableRdpOnTargetOption = enableRdpOnTargetOption; + this.RecoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + this.RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.UseManagedDisks = useManagedDisks; + this.LicenseType = licenseType; + this.SqlServerLicenseType = sqlServerLicenseType; + this.LastRecoveryPointReceived = lastRecoveryPointReceived; + this.TargetVMTags = targetVMTags; + this.SeedManagedDiskTags = seedManagedDiskTags; + this.TargetManagedDiskTags = targetManagedDiskTags; + this.TargetNicTags = targetNicTags; + this.ProtectedManagedDisks = protectedManagedDisks; CustomInit(); } @@ -137,209 +171,208 @@ public HyperVReplicaAzureReplicationDetails() /// partial void CustomInit(); + /// /// Gets or sets azure VM Disk details. /// - [JsonProperty(PropertyName = "azureVmDiskDetails")] - public IList AzureVmDiskDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureVmDiskDetails")] + public System.Collections.Generic.IList AzureVMDiskDetails {get; set; } /// /// Gets or sets recovery Azure given name. /// - [JsonProperty(PropertyName = "recoveryAzureVmName")] - public string RecoveryAzureVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureVmName")] + public string RecoveryAzureVMName {get; set; } /// /// Gets or sets the Recovery Azure VM size. /// - [JsonProperty(PropertyName = "recoveryAzureVMSize")] - public string RecoveryAzureVMSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureVMSize")] + public string RecoveryAzureVMSize {get; set; } /// /// Gets or sets the recovery Azure storage account. /// - [JsonProperty(PropertyName = "recoveryAzureStorageAccount")] - public string RecoveryAzureStorageAccount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureStorageAccount")] + public string RecoveryAzureStorageAccount {get; set; } /// - /// Gets or sets the ARM id of the log storage account used for - /// replication. This will be set to null if no log storage account was - /// provided during enable protection. + /// Gets or sets the ARM id of the log storage account used for replication. + /// This will be set to null if no log storage account was provided during + /// enable protection. /// - [JsonProperty(PropertyName = "recoveryAzureLogStorageAccountId")] - public string RecoveryAzureLogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureLogStorageAccountId")] + public string RecoveryAzureLogStorageAccountId {get; set; } /// /// Gets or sets the Last replication time. /// - [JsonProperty(PropertyName = "lastReplicatedTime")] - public System.DateTime? LastReplicatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastReplicatedTime")] + public System.DateTime? LastReplicatedTime {get; set; } /// /// Gets or sets last RPO value. /// - [JsonProperty(PropertyName = "rpoInSeconds")] - public long? RpoInSeconds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds {get; set; } /// /// Gets or sets the last RPO calculated time. /// - [JsonProperty(PropertyName = "lastRpoCalculatedTime")] - public System.DateTime? LastRpoCalculatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRpoCalculatedTime")] + public System.DateTime? LastRpoCalculatedTime {get; set; } /// /// Gets or sets the virtual machine Id. /// - [JsonProperty(PropertyName = "vmId")] - public string VmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmId")] + public string VMId {get; set; } /// /// Gets or sets the protection state for the vm. /// - [JsonProperty(PropertyName = "vmProtectionState")] - public string VmProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionState")] + public string VMProtectionState {get; set; } /// /// Gets or sets the protection state description for the vm. /// - [JsonProperty(PropertyName = "vmProtectionStateDescription")] - public string VmProtectionStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VMProtectionStateDescription {get; set; } /// /// Gets or sets initial replication details. /// - [JsonProperty(PropertyName = "initialReplicationDetails")] - public InitialReplicationDetails InitialReplicationDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationDetails")] + public InitialReplicationDetails InitialReplicationDetails {get; set; } /// /// Gets or sets the PE Network details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets the selected recovery azure network Id. /// - [JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] - public string SelectedRecoveryAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] + public string SelectedRecoveryAzureNetworkId {get; set; } /// - /// Gets or sets the selected source nic Id which will be used as the - /// primary nic during failover. + /// Gets or sets the selected source nic Id which will be used as the primary + /// nic during failover. /// - [JsonProperty(PropertyName = "selectedSourceNicId")] - public string SelectedSourceNicId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedSourceNicId")] + public string SelectedSourceNicId {get; set; } /// /// Gets or sets the encryption info. /// - [JsonProperty(PropertyName = "encryption")] - public string Encryption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "encryption")] + public string Encryption {get; set; } /// /// Gets or sets the operating system info. /// - [JsonProperty(PropertyName = "oSDetails")] - public OSDetails OSDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oSDetails")] + public OSDetails OSDetails {get; set; } /// /// Gets or sets the RAM size of the VM on the primary side. /// - [JsonProperty(PropertyName = "sourceVmRamSizeInMB")] - public int? SourceVmRamSizeInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceVmRamSizeInMB")] + public int? SourceVMRamSizeInMb {get; set; } /// /// Gets or sets the CPU count of the VM on the primary side. /// - [JsonProperty(PropertyName = "sourceVmCpuCount")] - public int? SourceVmCpuCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceVmCpuCount")] + public int? SourceVMCpuCount {get; set; } /// - /// Gets or sets the selected option to enable RDP\SSH on target vm - /// after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. + /// Gets or sets the selected option to enable RDP\SSH on target vm after + /// failover. String value of SrsDataContract.EnableRDPOnTargetOption enum. /// - [JsonProperty(PropertyName = "enableRdpOnTargetOption")] - public string EnableRdpOnTargetOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableRdpOnTargetOption")] + public string EnableRdpOnTargetOption {get; set; } /// /// Gets or sets the target resource group Id. /// - [JsonProperty(PropertyName = "recoveryAzureResourceGroupId")] - public string RecoveryAzureResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureResourceGroupId")] + public string RecoveryAzureResourceGroupId {get; set; } /// /// Gets or sets the recovery availability set Id. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] - public string RecoveryAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target proximity placement group Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// - /// Gets or sets a value indicating whether managed disks should be - /// used during failover. + /// Gets or sets a value indicating whether managed disks should be used during + /// failover. /// - [JsonProperty(PropertyName = "useManagedDisks")] - public string UseManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks {get; set; } /// /// Gets or sets license Type of the VM to be used. /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// /// Gets or sets the SQL Server license type. /// - [JsonProperty(PropertyName = "sqlServerLicenseType")] - public string SqlServerLicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerLicenseType")] + public string SqlServerLicenseType {get; set; } /// /// Gets the last recovery point received time. /// - [JsonProperty(PropertyName = "lastRecoveryPointReceived")] - public System.DateTime? LastRecoveryPointReceived { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRecoveryPointReceived")] + public System.DateTime? LastRecoveryPointReceived {get; private set; } /// /// Gets or sets the target VM tags. /// - [JsonProperty(PropertyName = "targetVmTags")] - public IDictionary TargetVmTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmTags")] + public System.Collections.Generic.IDictionary TargetVMTags {get; set; } /// /// Gets or sets the tags for the seed managed disks. /// - [JsonProperty(PropertyName = "seedManagedDiskTags")] - public IDictionary SeedManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedManagedDiskTags")] + public System.Collections.Generic.IDictionary SeedManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target managed disks. /// - [JsonProperty(PropertyName = "targetManagedDiskTags")] - public IDictionary TargetManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetManagedDiskTags")] + public System.Collections.Generic.IDictionary TargetManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target NICs. /// - [JsonProperty(PropertyName = "targetNicTags")] - public IDictionary TargetNicTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicTags")] + public System.Collections.Generic.IDictionary TargetNicTags {get; set; } /// /// Gets or sets the list of protected managed disks. /// - [JsonProperty(PropertyName = "protectedManagedDisks")] - public IList ProtectedManagedDisks { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedManagedDisks")] + public System.Collections.Generic.IList ProtectedManagedDisks {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureReprotectInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureReprotectInput.cs index ecc68a123db1..566bfef78670 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureReprotectInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureReprotectInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureReprotectInput : ReverseReplicationProviderSpecificInput { /// - /// Initializes a new instance of the HyperVReplicaAzureReprotectInput - /// class. + /// Initializes a new instance of the HyperVReplicaAzureReprotectInput class. /// public HyperVReplicaAzureReprotectInput() { @@ -29,24 +22,35 @@ public HyperVReplicaAzureReprotectInput() } /// - /// Initializes a new instance of the HyperVReplicaAzureReprotectInput - /// class. + /// Initializes a new instance of the HyperVReplicaAzureReprotectInput class. /// - /// The Hyper-V host Vm Id. - /// The Vm Name. - /// The OS type associated with vm. - /// The OS disk VHD id associated with vm. - /// The storage account name. - /// The storage account to be used - /// for logging during replication. - public HyperVReplicaAzureReprotectInput(string hvHostVmId = default(string), string vmName = default(string), string osType = default(string), string vHDId = default(string), string storageAccountId = default(string), string logStorageAccountId = default(string)) + + /// The Hyper-V host Vm Id. + /// + + /// The Vm Name. + /// + + /// The OS type associated with vm. + /// + + /// The OS disk VHD id associated with vm. + /// + + /// The storage account name. + /// + + /// The storage account to be used for logging during replication. + /// + public HyperVReplicaAzureReprotectInput(string hvHostVMId = default(string), string vmName = default(string), string osType = default(string), string vHdId = default(string), string storageAccountId = default(string), string logStorageAccountId = default(string)) + { - HvHostVmId = hvHostVmId; - VmName = vmName; - OsType = osType; - VHDId = vHDId; - StorageAccountId = storageAccountId; - LogStorageAccountId = logStorageAccountId; + this.HvHostVMId = hvHostVMId; + this.VMName = vmName; + this.OSType = osType; + this.VHdId = vHdId; + this.StorageAccountId = storageAccountId; + this.LogStorageAccountId = logStorageAccountId; CustomInit(); } @@ -55,42 +59,41 @@ public HyperVReplicaAzureReprotectInput() /// partial void CustomInit(); + /// /// Gets or sets the Hyper-V host Vm Id. /// - [JsonProperty(PropertyName = "hvHostVmId")] - public string HvHostVmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hvHostVmId")] + public string HvHostVMId {get; set; } /// /// Gets or sets the Vm Name. /// - [JsonProperty(PropertyName = "vmName")] - public string VmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmName")] + public string VMName {get; set; } /// /// Gets or sets the OS type associated with vm. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the OS disk VHD id associated with vm. /// - [JsonProperty(PropertyName = "vHDId")] - public string VHDId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vHDId")] + public string VHdId {get; set; } /// /// Gets or sets the storage account name. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; set; } /// - /// Gets or sets the storage account to be used for logging during - /// replication. + /// Gets or sets the storage account to be used for logging during replication. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureRpRecoveryPointType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureRpRecoveryPointType.cs index 84e11ccc0bee..649dbcbe7ea6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureRpRecoveryPointType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureRpRecoveryPointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for HyperVReplicaAzureRpRecoveryPointType. /// + + public static class HyperVReplicaAzureRpRecoveryPointType { public const string Latest = "Latest"; public const string LatestApplicationConsistent = "LatestApplicationConsistent"; public const string LatestProcessed = "LatestProcessed"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureTestFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureTestFailoverInput.cs index 5598ecda4c2e..d5ff606089af 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureTestFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureTestFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureTestFailoverInput : TestFailoverProviderSpecificInput { /// - /// Initializes a new instance of the - /// HyperVReplicaAzureTestFailoverInput class. + /// Initializes a new instance of the HyperVReplicaAzureTestFailoverInput class. /// public HyperVReplicaAzureTestFailoverInput() { @@ -29,21 +22,24 @@ public HyperVReplicaAzureTestFailoverInput() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzureTestFailoverInput class. + /// Initializes a new instance of the HyperVReplicaAzureTestFailoverInput class. /// - /// Primary kek certificate - /// pfx. - /// Secondary kek certificate - /// pfx. - /// The recovery point id to be passed to - /// test failover to a particular recovery point. In case of latest - /// recovery point, null should be passed. + + /// Primary kek certificate pfx. + /// + + /// Secondary kek certificate pfx. + /// + + /// The recovery point id to be passed to test failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. + /// public HyperVReplicaAzureTestFailoverInput(string primaryKekCertificatePfx = default(string), string secondaryKekCertificatePfx = default(string), string recoveryPointId = default(string)) + { - PrimaryKekCertificatePfx = primaryKekCertificatePfx; - SecondaryKekCertificatePfx = secondaryKekCertificatePfx; - RecoveryPointId = recoveryPointId; + this.PrimaryKekCertificatePfx = primaryKekCertificatePfx; + this.SecondaryKekCertificatePfx = secondaryKekCertificatePfx; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -52,25 +48,25 @@ public HyperVReplicaAzureTestFailoverInput() /// partial void CustomInit(); + /// /// Gets or sets primary kek certificate pfx. /// - [JsonProperty(PropertyName = "primaryKekCertificatePfx")] - public string PrimaryKekCertificatePfx { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryKekCertificatePfx")] + public string PrimaryKekCertificatePfx {get; set; } /// /// Gets or sets secondary kek certificate pfx. /// - [JsonProperty(PropertyName = "secondaryKekCertificatePfx")] - public string SecondaryKekCertificatePfx { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secondaryKekCertificatePfx")] + public string SecondaryKekCertificatePfx {get; set; } /// - /// Gets or sets the recovery point id to be passed to test failover to - /// a particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to test failover to a + /// particular recovery point. In case of latest recovery point, null should be + /// passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureUnplannedFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureUnplannedFailoverInput.cs index 150bf3a29304..c2c6bebb5e98 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureUnplannedFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureUnplannedFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureUnplannedFailoverInput : UnplannedFailoverProviderSpecificInput { /// - /// Initializes a new instance of the - /// HyperVReplicaAzureUnplannedFailoverInput class. + /// Initializes a new instance of the HyperVReplicaAzureUnplannedFailoverInput class. /// public HyperVReplicaAzureUnplannedFailoverInput() { @@ -29,21 +22,24 @@ public HyperVReplicaAzureUnplannedFailoverInput() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzureUnplannedFailoverInput class. + /// Initializes a new instance of the HyperVReplicaAzureUnplannedFailoverInput class. /// - /// Primary kek certificate - /// pfx. - /// Secondary kek certificate - /// pfx. - /// The recovery point id to be passed to - /// failover to a particular recovery point. In case of latest recovery - /// point, null should be passed. + + /// Primary kek certificate pfx. + /// + + /// Secondary kek certificate pfx. + /// + + /// The recovery point id to be passed to failover to a particular recovery + /// point. In case of latest recovery point, null should be passed. + /// public HyperVReplicaAzureUnplannedFailoverInput(string primaryKekCertificatePfx = default(string), string secondaryKekCertificatePfx = default(string), string recoveryPointId = default(string)) + { - PrimaryKekCertificatePfx = primaryKekCertificatePfx; - SecondaryKekCertificatePfx = secondaryKekCertificatePfx; - RecoveryPointId = recoveryPointId; + this.PrimaryKekCertificatePfx = primaryKekCertificatePfx; + this.SecondaryKekCertificatePfx = secondaryKekCertificatePfx; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -52,25 +48,24 @@ public HyperVReplicaAzureUnplannedFailoverInput() /// partial void CustomInit(); + /// /// Gets or sets primary kek certificate pfx. /// - [JsonProperty(PropertyName = "primaryKekCertificatePfx")] - public string PrimaryKekCertificatePfx { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryKekCertificatePfx")] + public string PrimaryKekCertificatePfx {get; set; } /// /// Gets or sets secondary kek certificate pfx. /// - [JsonProperty(PropertyName = "secondaryKekCertificatePfx")] - public string SecondaryKekCertificatePfx { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secondaryKekCertificatePfx")] + public string SecondaryKekCertificatePfx {get; set; } /// - /// Gets or sets the recovery point id to be passed to failover to a - /// particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs index f174c198672b..03bad8729263 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaAzureUpdateReplicationProtectedItemInput : UpdateReplicationProtectedItemProviderInput { /// - /// Initializes a new instance of the - /// HyperVReplicaAzureUpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the HyperVReplicaAzureUpdateReplicationProtectedItemInput class. /// public HyperVReplicaAzureUpdateReplicationProtectedItemInput() { @@ -31,42 +22,55 @@ public HyperVReplicaAzureUpdateReplicationProtectedItemInput() } /// - /// Initializes a new instance of the - /// HyperVReplicaAzureUpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the HyperVReplicaAzureUpdateReplicationProtectedItemInput class. /// - /// The recovery Azure - /// resource group Id for classic deployment. - /// The recovery Azure - /// resource group Id for resource manager deployment. - /// A value indicating whether managed - /// disks should be used during failover. - /// The dictionary of disk - /// resource Id to disk encryption set ARM Id. - /// The target proximity - /// placement group Id. - /// The target availability - /// zone. - /// The target VM tags. - /// The tags for the target managed - /// disks. - /// The tags for the target NICs. + + /// The recovery Azure resource group Id for classic deployment. + /// + + /// The recovery Azure resource group Id for resource manager deployment. + /// + + /// A value indicating whether managed disks should be used during failover. + /// + + /// The dictionary of disk resource Id to disk encryption set ARM Id. + /// + + /// The target proximity placement group Id. + /// + + /// The target availability zone. + /// + + /// The target VM tags. + /// + + /// The tags for the target managed disks. + /// + + /// The tags for the target NICs. + /// + /// The SQL Server license type. - /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', - /// 'AHUB' - /// The list of disk update properties. - public HyperVReplicaAzureUpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string), IDictionary diskIdToDiskEncryptionMap = default(IDictionary), string targetProximityPlacementGroupId = default(string), string targetAvailabilityZone = default(string), IDictionary targetVmTags = default(IDictionary), IDictionary targetManagedDiskTags = default(IDictionary), IDictionary targetNicTags = default(IDictionary), string sqlServerLicenseType = default(string), IList vmDisks = default(IList)) + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + + /// The list of disk update properties. + /// + public HyperVReplicaAzureUpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string), System.Collections.Generic.IDictionary diskIdToDiskEncryptionMap = default(System.Collections.Generic.IDictionary), string targetProximityPlacementGroupId = default(string), string targetAvailabilityZone = default(string), System.Collections.Generic.IDictionary targetVMTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetNicTags = default(System.Collections.Generic.IDictionary), string sqlServerLicenseType = default(string), System.Collections.Generic.IList vmDisks = default(System.Collections.Generic.IList)) + { - RecoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId; - RecoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId; - UseManagedDisks = useManagedDisks; - DiskIdToDiskEncryptionMap = diskIdToDiskEncryptionMap; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetVmTags = targetVmTags; - TargetManagedDiskTags = targetManagedDiskTags; - TargetNicTags = targetNicTags; - SqlServerLicenseType = sqlServerLicenseType; - VmDisks = vmDisks; + this.RecoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId; + this.RecoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId; + this.UseManagedDisks = useManagedDisks; + this.DiskIdToDiskEncryptionMap = diskIdToDiskEncryptionMap; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetVMTags = targetVMTags; + this.TargetManagedDiskTags = targetManagedDiskTags; + this.TargetNicTags = targetNicTags; + this.SqlServerLicenseType = sqlServerLicenseType; + this.VMDisks = vmDisks; CustomInit(); } @@ -75,76 +79,74 @@ public HyperVReplicaAzureUpdateReplicationProtectedItemInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery Azure resource group Id for classic - /// deployment. + /// Gets or sets the recovery Azure resource group Id for classic deployment. /// - [JsonProperty(PropertyName = "recoveryAzureV1ResourceGroupId")] - public string RecoveryAzureV1ResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureV1ResourceGroupId")] + public string RecoveryAzureV1ResourceGroupId {get; set; } /// - /// Gets or sets the recovery Azure resource group Id for resource - /// manager deployment. + /// Gets or sets the recovery Azure resource group Id for resource manager + /// deployment. /// - [JsonProperty(PropertyName = "recoveryAzureV2ResourceGroupId")] - public string RecoveryAzureV2ResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureV2ResourceGroupId")] + public string RecoveryAzureV2ResourceGroupId {get; set; } /// - /// Gets or sets a value indicating whether managed disks should be - /// used during failover. + /// Gets or sets a value indicating whether managed disks should be used during + /// failover. /// - [JsonProperty(PropertyName = "useManagedDisks")] - public string UseManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks {get; set; } /// - /// Gets or sets the dictionary of disk resource Id to disk encryption - /// set ARM Id. + /// Gets or sets the dictionary of disk resource Id to disk encryption set ARM + /// Id. /// - [JsonProperty(PropertyName = "diskIdToDiskEncryptionMap")] - public IDictionary DiskIdToDiskEncryptionMap { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskIdToDiskEncryptionMap")] + public System.Collections.Generic.IDictionary DiskIdToDiskEncryptionMap {get; set; } /// /// Gets or sets the target proximity placement group Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target VM tags. /// - [JsonProperty(PropertyName = "targetVmTags")] - public IDictionary TargetVmTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmTags")] + public System.Collections.Generic.IDictionary TargetVMTags {get; set; } /// /// Gets or sets the tags for the target managed disks. /// - [JsonProperty(PropertyName = "targetManagedDiskTags")] - public IDictionary TargetManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetManagedDiskTags")] + public System.Collections.Generic.IDictionary TargetManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target NICs. /// - [JsonProperty(PropertyName = "targetNicTags")] - public IDictionary TargetNicTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicTags")] + public System.Collections.Generic.IDictionary TargetNicTags {get; set; } /// - /// Gets or sets the SQL Server license type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + /// Gets or sets the SQL Server license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' /// - [JsonProperty(PropertyName = "sqlServerLicenseType")] - public string SqlServerLicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerLicenseType")] + public string SqlServerLicenseType {get; set; } /// /// Gets or sets the list of disk update properties. /// - [JsonProperty(PropertyName = "vmDisks")] - public IList VmDisks { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisks")] + public System.Collections.Generic.IList VMDisks {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBaseEventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBaseEventDetails.cs index 0a7a7280a6e8..2303b26efd8a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBaseEventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBaseEventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaBaseEventDetails : EventProviderSpecificDetails { /// - /// Initializes a new instance of the HyperVReplicaBaseEventDetails - /// class. + /// Initializes a new instance of the HyperVReplicaBaseEventDetails class. /// public HyperVReplicaBaseEventDetails() { @@ -29,20 +22,27 @@ public HyperVReplicaBaseEventDetails() } /// - /// Initializes a new instance of the HyperVReplicaBaseEventDetails - /// class. + /// Initializes a new instance of the HyperVReplicaBaseEventDetails class. /// - /// The container friendly name. - /// The fabric friendly name. - /// The remote container - /// name. - /// The remote fabric name. + + /// The container friendly name. + /// + + /// The fabric friendly name. + /// + + /// The remote container name. + /// + + /// The remote fabric name. + /// public HyperVReplicaBaseEventDetails(string containerName = default(string), string fabricName = default(string), string remoteContainerName = default(string), string remoteFabricName = default(string)) + { - ContainerName = containerName; - FabricName = fabricName; - RemoteContainerName = remoteContainerName; - RemoteFabricName = remoteFabricName; + this.ContainerName = containerName; + this.FabricName = fabricName; + this.RemoteContainerName = remoteContainerName; + this.RemoteFabricName = remoteFabricName; CustomInit(); } @@ -51,29 +51,29 @@ public HyperVReplicaBaseEventDetails() /// partial void CustomInit(); + /// /// Gets or sets the container friendly name. /// - [JsonProperty(PropertyName = "containerName")] - public string ContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerName")] + public string ContainerName {get; set; } /// /// Gets or sets the fabric friendly name. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; set; } /// /// Gets or sets the remote container name. /// - [JsonProperty(PropertyName = "remoteContainerName")] - public string RemoteContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "remoteContainerName")] + public string RemoteContainerName {get; set; } /// /// Gets or sets the remote fabric name. /// - [JsonProperty(PropertyName = "remoteFabricName")] - public string RemoteFabricName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "remoteFabricName")] + public string RemoteFabricName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBasePolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBasePolicyDetails.cs index 535e6d794bfd..b41b153369e0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBasePolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBasePolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaBasePolicyDetails : PolicyProviderSpecificDetails { /// - /// Initializes a new instance of the HyperVReplicaBasePolicyDetails - /// class. + /// Initializes a new instance of the HyperVReplicaBasePolicyDetails class. /// public HyperVReplicaBasePolicyDetails() { @@ -29,42 +22,52 @@ public HyperVReplicaBasePolicyDetails() } /// - /// Initializes a new instance of the HyperVReplicaBasePolicyDetails - /// class. + /// Initializes a new instance of the HyperVReplicaBasePolicyDetails class. /// - /// A value indicating the number of - /// recovery points. - /// A value - /// indicating the application consistent frequency. - /// A value indicating whether compression - /// has to be enabled. - /// A value indicating whether - /// IR is online. - /// A value indicating the - /// online IR start time. - /// A value indicating the - /// offline IR import path. - /// A value indicating the - /// offline IR export path. - /// A value indicating the recovery HTTPS - /// port. - /// A value indicating the - /// authentication type. - /// A value indicating whether the - /// VM has to be auto deleted. Supported Values: String.Empty, None, - /// OnRecoveryCloud. + + /// A value indicating the number of recovery points. + /// + + /// A value indicating the application consistent frequency. + /// + + /// A value indicating whether compression has to be enabled. + /// + + /// A value indicating whether IR is online. + /// + + /// A value indicating the online IR start time. + /// + + /// A value indicating the offline IR import path. + /// + + /// A value indicating the offline IR export path. + /// + + /// A value indicating the recovery HTTPS port. + /// + + /// A value indicating the authentication type. + /// + + /// A value indicating whether the VM has to be auto deleted. Supported Values: + /// String.Empty, None, OnRecoveryCloud. + /// public HyperVReplicaBasePolicyDetails(int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletionOption = default(string)) + { - RecoveryPoints = recoveryPoints; - ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; - Compression = compression; - InitialReplicationMethod = initialReplicationMethod; - OnlineReplicationStartTime = onlineReplicationStartTime; - OfflineReplicationImportPath = offlineReplicationImportPath; - OfflineReplicationExportPath = offlineReplicationExportPath; - ReplicationPort = replicationPort; - AllowedAuthenticationType = allowedAuthenticationType; - ReplicaDeletionOption = replicaDeletionOption; + this.RecoveryPoints = recoveryPoints; + this.ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + this.Compression = compression; + this.InitialReplicationMethod = initialReplicationMethod; + this.OnlineReplicationStartTime = onlineReplicationStartTime; + this.OfflineReplicationImportPath = offlineReplicationImportPath; + this.OfflineReplicationExportPath = offlineReplicationExportPath; + this.ReplicationPort = replicationPort; + this.AllowedAuthenticationType = allowedAuthenticationType; + this.ReplicaDeletionOption = replicaDeletionOption; CustomInit(); } @@ -73,68 +76,66 @@ public HyperVReplicaBasePolicyDetails() /// partial void CustomInit(); + /// /// Gets or sets a value indicating the number of recovery points. /// - [JsonProperty(PropertyName = "recoveryPoints")] - public int? RecoveryPoints { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPoints")] + public int? RecoveryPoints {get; set; } /// - /// Gets or sets a value indicating the application consistent - /// frequency. + /// Gets or sets a value indicating the application consistent frequency. /// - [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] - public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours {get; set; } /// - /// Gets or sets a value indicating whether compression has to be - /// enabled. + /// Gets or sets a value indicating whether compression has to be enabled. /// - [JsonProperty(PropertyName = "compression")] - public string Compression { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "compression")] + public string Compression {get; set; } /// /// Gets or sets a value indicating whether IR is online. /// - [JsonProperty(PropertyName = "initialReplicationMethod")] - public string InitialReplicationMethod { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationMethod")] + public string InitialReplicationMethod {get; set; } /// /// Gets or sets a value indicating the online IR start time. /// - [JsonProperty(PropertyName = "onlineReplicationStartTime")] - public string OnlineReplicationStartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime {get; set; } /// /// Gets or sets a value indicating the offline IR import path. /// - [JsonProperty(PropertyName = "offlineReplicationImportPath")] - public string OfflineReplicationImportPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "offlineReplicationImportPath")] + public string OfflineReplicationImportPath {get; set; } /// /// Gets or sets a value indicating the offline IR export path. /// - [JsonProperty(PropertyName = "offlineReplicationExportPath")] - public string OfflineReplicationExportPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "offlineReplicationExportPath")] + public string OfflineReplicationExportPath {get; set; } /// /// Gets or sets a value indicating the recovery HTTPS port. /// - [JsonProperty(PropertyName = "replicationPort")] - public int? ReplicationPort { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationPort")] + public int? ReplicationPort {get; set; } /// /// Gets or sets a value indicating the authentication type. /// - [JsonProperty(PropertyName = "allowedAuthenticationType")] - public int? AllowedAuthenticationType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedAuthenticationType")] + public int? AllowedAuthenticationType {get; set; } /// - /// Gets or sets a value indicating whether the VM has to be auto - /// deleted. Supported Values: String.Empty, None, OnRecoveryCloud. + /// Gets or sets a value indicating whether the VM has to be auto deleted. + /// Supported Values: String.Empty, None, OnRecoveryCloud. /// - [JsonProperty(PropertyName = "replicaDeletionOption")] - public string ReplicaDeletionOption { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaDeletionOption")] + public string ReplicaDeletionOption {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBaseReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBaseReplicationDetails.cs index 723f8cdf4096..0ece2f585cc7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBaseReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBaseReplicationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaBaseReplicationDetails : ReplicationProviderSpecificSettings { /// - /// Initializes a new instance of the - /// HyperVReplicaBaseReplicationDetails class. + /// Initializes a new instance of the HyperVReplicaBaseReplicationDetails class. /// public HyperVReplicaBaseReplicationDetails() { @@ -31,28 +22,39 @@ public HyperVReplicaBaseReplicationDetails() } /// - /// Initializes a new instance of the - /// HyperVReplicaBaseReplicationDetails class. + /// Initializes a new instance of the HyperVReplicaBaseReplicationDetails class. /// - /// The Last replication time. - /// The PE Network details. - /// The virtual machine Id. - /// The protection state for the - /// vm. - /// The protection state - /// description for the vm. - /// Initial replication - /// details. - /// VM disk details. - public HyperVReplicaBaseReplicationDetails(System.DateTime? lastReplicatedTime = default(System.DateTime?), IList vmNics = default(IList), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), IList vMDiskDetails = default(IList)) + + /// The Last replication time. + /// + + /// The PE Network details. + /// + + /// The virtual machine Id. + /// + + /// The protection state for the vm. + /// + + /// The protection state description for the vm. + /// + + /// Initial replication details. + /// + + /// VM disk details. + /// + public HyperVReplicaBaseReplicationDetails(System.DateTime? lastReplicatedTime = default(System.DateTime?), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), System.Collections.Generic.IList vmDiskDetails = default(System.Collections.Generic.IList)) + { - LastReplicatedTime = lastReplicatedTime; - VmNics = vmNics; - VmId = vmId; - VmProtectionState = vmProtectionState; - VmProtectionStateDescription = vmProtectionStateDescription; - InitialReplicationDetails = initialReplicationDetails; - VMDiskDetails = vMDiskDetails; + this.LastReplicatedTime = lastReplicatedTime; + this.VMNics = vmNics; + this.VMId = vmId; + this.VMProtectionState = vmProtectionState; + this.VMProtectionStateDescription = vmProtectionStateDescription; + this.InitialReplicationDetails = initialReplicationDetails; + this.VMDiskDetails = vmDiskDetails; CustomInit(); } @@ -61,47 +63,47 @@ public HyperVReplicaBaseReplicationDetails() /// partial void CustomInit(); + /// /// Gets or sets the Last replication time. /// - [JsonProperty(PropertyName = "lastReplicatedTime")] - public System.DateTime? LastReplicatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastReplicatedTime")] + public System.DateTime? LastReplicatedTime {get; set; } /// /// Gets or sets the PE Network details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets the virtual machine Id. /// - [JsonProperty(PropertyName = "vmId")] - public string VmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmId")] + public string VMId {get; set; } /// /// Gets or sets the protection state for the vm. /// - [JsonProperty(PropertyName = "vmProtectionState")] - public string VmProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionState")] + public string VMProtectionState {get; set; } /// /// Gets or sets the protection state description for the vm. /// - [JsonProperty(PropertyName = "vmProtectionStateDescription")] - public string VmProtectionStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VMProtectionStateDescription {get; set; } /// /// Gets or sets initial replication details. /// - [JsonProperty(PropertyName = "initialReplicationDetails")] - public InitialReplicationDetails InitialReplicationDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationDetails")] + public InitialReplicationDetails InitialReplicationDetails {get; set; } /// - /// Gets or sets VM disk details. + /// Gets or sets vM disk details. /// - [JsonProperty(PropertyName = "vMDiskDetails")] - public IList VMDiskDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vMDiskDetails")] + public System.Collections.Generic.IList VMDiskDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBluePolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBluePolicyDetails.cs index 4728aabe3741..76ed913c5206 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBluePolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBluePolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaBluePolicyDetails : PolicyProviderSpecificDetails { /// - /// Initializes a new instance of the HyperVReplicaBluePolicyDetails - /// class. + /// Initializes a new instance of the HyperVReplicaBluePolicyDetails class. /// public HyperVReplicaBluePolicyDetails() { @@ -29,45 +22,56 @@ public HyperVReplicaBluePolicyDetails() } /// - /// Initializes a new instance of the HyperVReplicaBluePolicyDetails - /// class. + /// Initializes a new instance of the HyperVReplicaBluePolicyDetails class. /// - /// A value indicating the - /// replication interval. - /// A value indicating the number of - /// recovery points. - /// A value - /// indicating the application consistent frequency. - /// A value indicating whether compression - /// has to be enabled. - /// A value indicating whether - /// IR is online. - /// A value indicating the - /// online IR start time. - /// A value indicating the - /// offline IR import path. - /// A value indicating the - /// offline IR export path. - /// A value indicating the recovery HTTPS - /// port. - /// A value indicating the - /// authentication type. - /// A value indicating whether the - /// VM has to be auto deleted. Supported Values: String.Empty, None, - /// OnRecoveryCloud + + /// A value indicating the replication interval. + /// + + /// A value indicating the number of recovery points. + /// + + /// A value indicating the application consistent frequency. + /// + + /// A value indicating whether compression has to be enabled. + /// + + /// A value indicating whether IR is online. + /// + + /// A value indicating the online IR start time. + /// + + /// A value indicating the offline IR import path. + /// + + /// A value indicating the offline IR export path. + /// + + /// A value indicating the recovery HTTPS port. + /// + + /// A value indicating the authentication type. + /// + + /// A value indicating whether the VM has to be auto deleted. Supported Values: + /// String.Empty, None, OnRecoveryCloud + /// public HyperVReplicaBluePolicyDetails(int? replicationFrequencyInSeconds = default(int?), int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletionOption = default(string)) + { - ReplicationFrequencyInSeconds = replicationFrequencyInSeconds; - RecoveryPoints = recoveryPoints; - ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; - Compression = compression; - InitialReplicationMethod = initialReplicationMethod; - OnlineReplicationStartTime = onlineReplicationStartTime; - OfflineReplicationImportPath = offlineReplicationImportPath; - OfflineReplicationExportPath = offlineReplicationExportPath; - ReplicationPort = replicationPort; - AllowedAuthenticationType = allowedAuthenticationType; - ReplicaDeletionOption = replicaDeletionOption; + this.ReplicationFrequencyInSeconds = replicationFrequencyInSeconds; + this.RecoveryPoints = recoveryPoints; + this.ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + this.Compression = compression; + this.InitialReplicationMethod = initialReplicationMethod; + this.OnlineReplicationStartTime = onlineReplicationStartTime; + this.OfflineReplicationImportPath = offlineReplicationImportPath; + this.OfflineReplicationExportPath = offlineReplicationExportPath; + this.ReplicationPort = replicationPort; + this.AllowedAuthenticationType = allowedAuthenticationType; + this.ReplicaDeletionOption = replicaDeletionOption; CustomInit(); } @@ -76,74 +80,72 @@ public HyperVReplicaBluePolicyDetails() /// partial void CustomInit(); + /// /// Gets or sets a value indicating the replication interval. /// - [JsonProperty(PropertyName = "replicationFrequencyInSeconds")] - public int? ReplicationFrequencyInSeconds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationFrequencyInSeconds")] + public int? ReplicationFrequencyInSeconds {get; set; } /// /// Gets or sets a value indicating the number of recovery points. /// - [JsonProperty(PropertyName = "recoveryPoints")] - public int? RecoveryPoints { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPoints")] + public int? RecoveryPoints {get; set; } /// - /// Gets or sets a value indicating the application consistent - /// frequency. + /// Gets or sets a value indicating the application consistent frequency. /// - [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] - public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours {get; set; } /// - /// Gets or sets a value indicating whether compression has to be - /// enabled. + /// Gets or sets a value indicating whether compression has to be enabled. /// - [JsonProperty(PropertyName = "compression")] - public string Compression { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "compression")] + public string Compression {get; set; } /// /// Gets or sets a value indicating whether IR is online. /// - [JsonProperty(PropertyName = "initialReplicationMethod")] - public string InitialReplicationMethod { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationMethod")] + public string InitialReplicationMethod {get; set; } /// /// Gets or sets a value indicating the online IR start time. /// - [JsonProperty(PropertyName = "onlineReplicationStartTime")] - public string OnlineReplicationStartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime {get; set; } /// /// Gets or sets a value indicating the offline IR import path. /// - [JsonProperty(PropertyName = "offlineReplicationImportPath")] - public string OfflineReplicationImportPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "offlineReplicationImportPath")] + public string OfflineReplicationImportPath {get; set; } /// /// Gets or sets a value indicating the offline IR export path. /// - [JsonProperty(PropertyName = "offlineReplicationExportPath")] - public string OfflineReplicationExportPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "offlineReplicationExportPath")] + public string OfflineReplicationExportPath {get; set; } /// /// Gets or sets a value indicating the recovery HTTPS port. /// - [JsonProperty(PropertyName = "replicationPort")] - public int? ReplicationPort { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationPort")] + public int? ReplicationPort {get; set; } /// /// Gets or sets a value indicating the authentication type. /// - [JsonProperty(PropertyName = "allowedAuthenticationType")] - public int? AllowedAuthenticationType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedAuthenticationType")] + public int? AllowedAuthenticationType {get; set; } /// - /// Gets or sets a value indicating whether the VM has to be auto - /// deleted. Supported Values: String.Empty, None, OnRecoveryCloud + /// Gets or sets a value indicating whether the VM has to be auto deleted. + /// Supported Values: String.Empty, None, OnRecoveryCloud /// - [JsonProperty(PropertyName = "replicaDeletionOption")] - public string ReplicaDeletionOption { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaDeletionOption")] + public string ReplicaDeletionOption {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBluePolicyInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBluePolicyInput.cs index a7dc2e63f013..6b6aeac99268 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBluePolicyInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBluePolicyInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaBluePolicyInput : HyperVReplicaPolicyInput { /// - /// Initializes a new instance of the HyperVReplicaBluePolicyInput - /// class. + /// Initializes a new instance of the HyperVReplicaBluePolicyInput class. /// public HyperVReplicaBluePolicyInput() { @@ -29,35 +22,46 @@ public HyperVReplicaBluePolicyInput() } /// - /// Initializes a new instance of the HyperVReplicaBluePolicyInput - /// class. + /// Initializes a new instance of the HyperVReplicaBluePolicyInput class. /// - /// A value indicating the number of - /// recovery points. - /// A value - /// indicating the application consistent frequency. - /// A value indicating whether compression - /// has to be enabled. - /// A value indicating whether - /// IR is online. - /// A value indicating the - /// online IR start time. - /// A value indicating the - /// offline IR import path. - /// A value indicating the - /// offline IR export path. - /// A value indicating the recovery HTTPS - /// port. - /// A value indicating the - /// authentication type. - /// A value indicating whether the VM has - /// to be auto deleted. - /// A value indicating the - /// replication interval. + + /// A value indicating the number of recovery points. + /// + + /// A value indicating the application consistent frequency. + /// + + /// A value indicating whether compression has to be enabled. + /// + + /// A value indicating whether IR is online. + /// + + /// A value indicating the online IR start time. + /// + + /// A value indicating the offline IR import path. + /// + + /// A value indicating the offline IR export path. + /// + + /// A value indicating the recovery HTTPS port. + /// + + /// A value indicating the authentication type. + /// + + /// A value indicating whether the VM has to be auto deleted. + /// + + /// A value indicating the replication interval. + /// public HyperVReplicaBluePolicyInput(int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletion = default(string), int? replicationFrequencyInSeconds = default(int?)) - : base(recoveryPoints, applicationConsistentSnapshotFrequencyInHours, compression, initialReplicationMethod, onlineReplicationStartTime, offlineReplicationImportPath, offlineReplicationExportPath, replicationPort, allowedAuthenticationType, replicaDeletion) + + : base(recoveryPoints, applicationConsistentSnapshotFrequencyInHours, compression, initialReplicationMethod, onlineReplicationStartTime, offlineReplicationImportPath, offlineReplicationExportPath, replicationPort, allowedAuthenticationType, replicaDeletion) { - ReplicationFrequencyInSeconds = replicationFrequencyInSeconds; + this.ReplicationFrequencyInSeconds = replicationFrequencyInSeconds; CustomInit(); } @@ -66,11 +70,11 @@ public HyperVReplicaBluePolicyInput() /// partial void CustomInit(); + /// /// Gets or sets a value indicating the replication interval. /// - [JsonProperty(PropertyName = "replicationFrequencyInSeconds")] - public int? ReplicationFrequencyInSeconds { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationFrequencyInSeconds")] + public int? ReplicationFrequencyInSeconds {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBlueReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBlueReplicationDetails.cs index a70453387077..841b752c9443 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBlueReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaBlueReplicationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaBlueReplicationDetails : ReplicationProviderSpecificSettings { /// - /// Initializes a new instance of the - /// HyperVReplicaBlueReplicationDetails class. + /// Initializes a new instance of the HyperVReplicaBlueReplicationDetails class. /// public HyperVReplicaBlueReplicationDetails() { @@ -31,28 +22,39 @@ public HyperVReplicaBlueReplicationDetails() } /// - /// Initializes a new instance of the - /// HyperVReplicaBlueReplicationDetails class. + /// Initializes a new instance of the HyperVReplicaBlueReplicationDetails class. /// - /// The Last replication time. - /// The PE Network details. - /// The virtual machine Id. - /// The protection state for the - /// vm. - /// The protection state - /// description for the vm. - /// Initial replication - /// details. - /// VM disk details. - public HyperVReplicaBlueReplicationDetails(System.DateTime? lastReplicatedTime = default(System.DateTime?), IList vmNics = default(IList), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), IList vMDiskDetails = default(IList)) + + /// The Last replication time. + /// + + /// The PE Network details. + /// + + /// The virtual machine Id. + /// + + /// The protection state for the vm. + /// + + /// The protection state description for the vm. + /// + + /// Initial replication details. + /// + + /// VM disk details. + /// + public HyperVReplicaBlueReplicationDetails(System.DateTime? lastReplicatedTime = default(System.DateTime?), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), System.Collections.Generic.IList vmDiskDetails = default(System.Collections.Generic.IList)) + { - LastReplicatedTime = lastReplicatedTime; - VmNics = vmNics; - VmId = vmId; - VmProtectionState = vmProtectionState; - VmProtectionStateDescription = vmProtectionStateDescription; - InitialReplicationDetails = initialReplicationDetails; - VMDiskDetails = vMDiskDetails; + this.LastReplicatedTime = lastReplicatedTime; + this.VMNics = vmNics; + this.VMId = vmId; + this.VMProtectionState = vmProtectionState; + this.VMProtectionStateDescription = vmProtectionStateDescription; + this.InitialReplicationDetails = initialReplicationDetails; + this.VMDiskDetails = vmDiskDetails; CustomInit(); } @@ -61,47 +63,47 @@ public HyperVReplicaBlueReplicationDetails() /// partial void CustomInit(); + /// /// Gets or sets the Last replication time. /// - [JsonProperty(PropertyName = "lastReplicatedTime")] - public System.DateTime? LastReplicatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastReplicatedTime")] + public System.DateTime? LastReplicatedTime {get; set; } /// /// Gets or sets the PE Network details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets the virtual machine Id. /// - [JsonProperty(PropertyName = "vmId")] - public string VmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmId")] + public string VMId {get; set; } /// /// Gets or sets the protection state for the vm. /// - [JsonProperty(PropertyName = "vmProtectionState")] - public string VmProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionState")] + public string VMProtectionState {get; set; } /// /// Gets or sets the protection state description for the vm. /// - [JsonProperty(PropertyName = "vmProtectionStateDescription")] - public string VmProtectionStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VMProtectionStateDescription {get; set; } /// /// Gets or sets initial replication details. /// - [JsonProperty(PropertyName = "initialReplicationDetails")] - public InitialReplicationDetails InitialReplicationDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationDetails")] + public InitialReplicationDetails InitialReplicationDetails {get; set; } /// - /// Gets or sets VM disk details. + /// Gets or sets vM disk details. /// - [JsonProperty(PropertyName = "vMDiskDetails")] - public IList VMDiskDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vMDiskDetails")] + public System.Collections.Generic.IList VMDiskDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaPolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaPolicyDetails.cs index 330052a0db3e..e2fa5aaba508 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaPolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaPolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,39 +24,50 @@ public HyperVReplicaPolicyDetails() /// /// Initializes a new instance of the HyperVReplicaPolicyDetails class. /// - /// A value indicating the number of - /// recovery points. - /// A value - /// indicating the application consistent frequency. - /// A value indicating whether compression - /// has to be enabled. - /// A value indicating whether - /// IR is online. - /// A value indicating the - /// online IR start time. - /// A value indicating the - /// offline IR import path. - /// A value indicating the - /// offline IR export path. - /// A value indicating the recovery HTTPS - /// port. - /// A value indicating the - /// authentication type. - /// A value indicating whether the - /// VM has to be auto deleted. Supported Values: String.Empty, None, - /// OnRecoveryCloud + + /// A value indicating the number of recovery points. + /// + + /// A value indicating the application consistent frequency. + /// + + /// A value indicating whether compression has to be enabled. + /// + + /// A value indicating whether IR is online. + /// + + /// A value indicating the online IR start time. + /// + + /// A value indicating the offline IR import path. + /// + + /// A value indicating the offline IR export path. + /// + + /// A value indicating the recovery HTTPS port. + /// + + /// A value indicating the authentication type. + /// + + /// A value indicating whether the VM has to be auto deleted. Supported Values: + /// String.Empty, None, OnRecoveryCloud + /// public HyperVReplicaPolicyDetails(int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletionOption = default(string)) + { - RecoveryPoints = recoveryPoints; - ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; - Compression = compression; - InitialReplicationMethod = initialReplicationMethod; - OnlineReplicationStartTime = onlineReplicationStartTime; - OfflineReplicationImportPath = offlineReplicationImportPath; - OfflineReplicationExportPath = offlineReplicationExportPath; - ReplicationPort = replicationPort; - AllowedAuthenticationType = allowedAuthenticationType; - ReplicaDeletionOption = replicaDeletionOption; + this.RecoveryPoints = recoveryPoints; + this.ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + this.Compression = compression; + this.InitialReplicationMethod = initialReplicationMethod; + this.OnlineReplicationStartTime = onlineReplicationStartTime; + this.OfflineReplicationImportPath = offlineReplicationImportPath; + this.OfflineReplicationExportPath = offlineReplicationExportPath; + this.ReplicationPort = replicationPort; + this.AllowedAuthenticationType = allowedAuthenticationType; + this.ReplicaDeletionOption = replicaDeletionOption; CustomInit(); } @@ -71,68 +76,66 @@ public HyperVReplicaPolicyDetails() /// partial void CustomInit(); + /// /// Gets or sets a value indicating the number of recovery points. /// - [JsonProperty(PropertyName = "recoveryPoints")] - public int? RecoveryPoints { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPoints")] + public int? RecoveryPoints {get; set; } /// - /// Gets or sets a value indicating the application consistent - /// frequency. + /// Gets or sets a value indicating the application consistent frequency. /// - [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] - public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours {get; set; } /// - /// Gets or sets a value indicating whether compression has to be - /// enabled. + /// Gets or sets a value indicating whether compression has to be enabled. /// - [JsonProperty(PropertyName = "compression")] - public string Compression { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "compression")] + public string Compression {get; set; } /// /// Gets or sets a value indicating whether IR is online. /// - [JsonProperty(PropertyName = "initialReplicationMethod")] - public string InitialReplicationMethod { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationMethod")] + public string InitialReplicationMethod {get; set; } /// /// Gets or sets a value indicating the online IR start time. /// - [JsonProperty(PropertyName = "onlineReplicationStartTime")] - public string OnlineReplicationStartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime {get; set; } /// /// Gets or sets a value indicating the offline IR import path. /// - [JsonProperty(PropertyName = "offlineReplicationImportPath")] - public string OfflineReplicationImportPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "offlineReplicationImportPath")] + public string OfflineReplicationImportPath {get; set; } /// /// Gets or sets a value indicating the offline IR export path. /// - [JsonProperty(PropertyName = "offlineReplicationExportPath")] - public string OfflineReplicationExportPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "offlineReplicationExportPath")] + public string OfflineReplicationExportPath {get; set; } /// /// Gets or sets a value indicating the recovery HTTPS port. /// - [JsonProperty(PropertyName = "replicationPort")] - public int? ReplicationPort { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationPort")] + public int? ReplicationPort {get; set; } /// /// Gets or sets a value indicating the authentication type. /// - [JsonProperty(PropertyName = "allowedAuthenticationType")] - public int? AllowedAuthenticationType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedAuthenticationType")] + public int? AllowedAuthenticationType {get; set; } /// - /// Gets or sets a value indicating whether the VM has to be auto - /// deleted. Supported Values: String.Empty, None, OnRecoveryCloud + /// Gets or sets a value indicating whether the VM has to be auto deleted. + /// Supported Values: String.Empty, None, OnRecoveryCloud /// - [JsonProperty(PropertyName = "replicaDeletionOption")] - public string ReplicaDeletionOption { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaDeletionOption")] + public string ReplicaDeletionOption {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaPolicyInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaPolicyInput.cs index d71946210412..267b2348adce 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaPolicyInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaPolicyInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,38 +24,49 @@ public HyperVReplicaPolicyInput() /// /// Initializes a new instance of the HyperVReplicaPolicyInput class. /// - /// A value indicating the number of - /// recovery points. - /// A value - /// indicating the application consistent frequency. - /// A value indicating whether compression - /// has to be enabled. - /// A value indicating whether - /// IR is online. - /// A value indicating the - /// online IR start time. - /// A value indicating the - /// offline IR import path. - /// A value indicating the - /// offline IR export path. - /// A value indicating the recovery HTTPS - /// port. - /// A value indicating the - /// authentication type. - /// A value indicating whether the VM has - /// to be auto deleted. + + /// A value indicating the number of recovery points. + /// + + /// A value indicating the application consistent frequency. + /// + + /// A value indicating whether compression has to be enabled. + /// + + /// A value indicating whether IR is online. + /// + + /// A value indicating the online IR start time. + /// + + /// A value indicating the offline IR import path. + /// + + /// A value indicating the offline IR export path. + /// + + /// A value indicating the recovery HTTPS port. + /// + + /// A value indicating the authentication type. + /// + + /// A value indicating whether the VM has to be auto deleted. + /// public HyperVReplicaPolicyInput(int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletion = default(string)) + { - RecoveryPoints = recoveryPoints; - ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; - Compression = compression; - InitialReplicationMethod = initialReplicationMethod; - OnlineReplicationStartTime = onlineReplicationStartTime; - OfflineReplicationImportPath = offlineReplicationImportPath; - OfflineReplicationExportPath = offlineReplicationExportPath; - ReplicationPort = replicationPort; - AllowedAuthenticationType = allowedAuthenticationType; - ReplicaDeletion = replicaDeletion; + this.RecoveryPoints = recoveryPoints; + this.ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + this.Compression = compression; + this.InitialReplicationMethod = initialReplicationMethod; + this.OnlineReplicationStartTime = onlineReplicationStartTime; + this.OfflineReplicationImportPath = offlineReplicationImportPath; + this.OfflineReplicationExportPath = offlineReplicationExportPath; + this.ReplicationPort = replicationPort; + this.AllowedAuthenticationType = allowedAuthenticationType; + this.ReplicaDeletion = replicaDeletion; CustomInit(); } @@ -70,68 +75,65 @@ public HyperVReplicaPolicyInput() /// partial void CustomInit(); + /// /// Gets or sets a value indicating the number of recovery points. /// - [JsonProperty(PropertyName = "recoveryPoints")] - public int? RecoveryPoints { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPoints")] + public int? RecoveryPoints {get; set; } /// - /// Gets or sets a value indicating the application consistent - /// frequency. + /// Gets or sets a value indicating the application consistent frequency. /// - [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] - public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours {get; set; } /// - /// Gets or sets a value indicating whether compression has to be - /// enabled. + /// Gets or sets a value indicating whether compression has to be enabled. /// - [JsonProperty(PropertyName = "compression")] - public string Compression { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "compression")] + public string Compression {get; set; } /// /// Gets or sets a value indicating whether IR is online. /// - [JsonProperty(PropertyName = "initialReplicationMethod")] - public string InitialReplicationMethod { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationMethod")] + public string InitialReplicationMethod {get; set; } /// /// Gets or sets a value indicating the online IR start time. /// - [JsonProperty(PropertyName = "onlineReplicationStartTime")] - public string OnlineReplicationStartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime {get; set; } /// /// Gets or sets a value indicating the offline IR import path. /// - [JsonProperty(PropertyName = "offlineReplicationImportPath")] - public string OfflineReplicationImportPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "offlineReplicationImportPath")] + public string OfflineReplicationImportPath {get; set; } /// /// Gets or sets a value indicating the offline IR export path. /// - [JsonProperty(PropertyName = "offlineReplicationExportPath")] - public string OfflineReplicationExportPath { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "offlineReplicationExportPath")] + public string OfflineReplicationExportPath {get; set; } /// /// Gets or sets a value indicating the recovery HTTPS port. /// - [JsonProperty(PropertyName = "replicationPort")] - public int? ReplicationPort { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationPort")] + public int? ReplicationPort {get; set; } /// /// Gets or sets a value indicating the authentication type. /// - [JsonProperty(PropertyName = "allowedAuthenticationType")] - public int? AllowedAuthenticationType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedAuthenticationType")] + public int? AllowedAuthenticationType {get; set; } /// - /// Gets or sets a value indicating whether the VM has to be auto - /// deleted. + /// Gets or sets a value indicating whether the VM has to be auto deleted. /// - [JsonProperty(PropertyName = "replicaDeletion")] - public string ReplicaDeletion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaDeletion")] + public string ReplicaDeletion {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaReplicationDetails.cs index 613f2c97625d..a865978a0a7a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVReplicaReplicationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVReplicaReplicationDetails : ReplicationProviderSpecificSettings { /// - /// Initializes a new instance of the HyperVReplicaReplicationDetails - /// class. + /// Initializes a new instance of the HyperVReplicaReplicationDetails class. /// public HyperVReplicaReplicationDetails() { @@ -31,28 +22,39 @@ public HyperVReplicaReplicationDetails() } /// - /// Initializes a new instance of the HyperVReplicaReplicationDetails - /// class. + /// Initializes a new instance of the HyperVReplicaReplicationDetails class. /// - /// The Last replication time. - /// The PE Network details. - /// The virtual machine Id. - /// The protection state for the - /// vm. - /// The protection state - /// description for the vm. - /// Initial replication - /// details. - /// VM disk details. - public HyperVReplicaReplicationDetails(System.DateTime? lastReplicatedTime = default(System.DateTime?), IList vmNics = default(IList), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), IList vMDiskDetails = default(IList)) + + /// The Last replication time. + /// + + /// The PE Network details. + /// + + /// The virtual machine Id. + /// + + /// The protection state for the vm. + /// + + /// The protection state description for the vm. + /// + + /// Initial replication details. + /// + + /// VM disk details. + /// + public HyperVReplicaReplicationDetails(System.DateTime? lastReplicatedTime = default(System.DateTime?), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), System.Collections.Generic.IList vmDiskDetails = default(System.Collections.Generic.IList)) + { - LastReplicatedTime = lastReplicatedTime; - VmNics = vmNics; - VmId = vmId; - VmProtectionState = vmProtectionState; - VmProtectionStateDescription = vmProtectionStateDescription; - InitialReplicationDetails = initialReplicationDetails; - VMDiskDetails = vMDiskDetails; + this.LastReplicatedTime = lastReplicatedTime; + this.VMNics = vmNics; + this.VMId = vmId; + this.VMProtectionState = vmProtectionState; + this.VMProtectionStateDescription = vmProtectionStateDescription; + this.InitialReplicationDetails = initialReplicationDetails; + this.VMDiskDetails = vmDiskDetails; CustomInit(); } @@ -61,47 +63,47 @@ public HyperVReplicaReplicationDetails() /// partial void CustomInit(); + /// /// Gets or sets the Last replication time. /// - [JsonProperty(PropertyName = "lastReplicatedTime")] - public System.DateTime? LastReplicatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastReplicatedTime")] + public System.DateTime? LastReplicatedTime {get; set; } /// /// Gets or sets the PE Network details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets the virtual machine Id. /// - [JsonProperty(PropertyName = "vmId")] - public string VmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmId")] + public string VMId {get; set; } /// /// Gets or sets the protection state for the vm. /// - [JsonProperty(PropertyName = "vmProtectionState")] - public string VmProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionState")] + public string VMProtectionState {get; set; } /// /// Gets or sets the protection state description for the vm. /// - [JsonProperty(PropertyName = "vmProtectionStateDescription")] - public string VmProtectionStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VMProtectionStateDescription {get; set; } /// /// Gets or sets initial replication details. /// - [JsonProperty(PropertyName = "initialReplicationDetails")] - public InitialReplicationDetails InitialReplicationDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationDetails")] + public InitialReplicationDetails InitialReplicationDetails {get; set; } /// - /// Gets or sets VM disk details. + /// Gets or sets vM disk details. /// - [JsonProperty(PropertyName = "vMDiskDetails")] - public IList VMDiskDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vMDiskDetails")] + public System.Collections.Generic.IList VMDiskDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVSiteDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVSiteDetails.cs index 7eefe0861533..e563374ec097 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVSiteDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVSiteDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,11 +24,13 @@ public HyperVSiteDetails() /// /// Initializes a new instance of the HyperVSiteDetails class. /// - /// The list of Hyper-V hosts associated with - /// the fabric. - public HyperVSiteDetails(IList hyperVHosts = default(IList)) + + /// The list of Hyper-V hosts associated with the fabric. + /// + public HyperVSiteDetails(System.Collections.Generic.IList hyperVHosts = default(System.Collections.Generic.IList)) + { - HyperVHosts = hyperVHosts; + this.HyperVHosts = hyperVHosts; CustomInit(); } @@ -45,11 +39,11 @@ public HyperVSiteDetails() /// partial void CustomInit(); + /// /// Gets or sets the list of Hyper-V hosts associated with the fabric. /// - [JsonProperty(PropertyName = "hyperVHosts")] - public IList HyperVHosts { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "hyperVHosts")] + public System.Collections.Generic.IList HyperVHosts {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVVirtualMachineDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVVirtualMachineDetails.cs index 1b59d20fc169..3092f8bb081b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVVirtualMachineDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/HyperVVirtualMachineDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class HyperVVirtualMachineDetails : ConfigurationSettings { /// - /// Initializes a new instance of the HyperVVirtualMachineDetails - /// class. + /// Initializes a new instance of the HyperVVirtualMachineDetails class. /// public HyperVVirtualMachineDetails() { @@ -31,38 +22,46 @@ public HyperVVirtualMachineDetails() } /// - /// Initializes a new instance of the HyperVVirtualMachineDetails - /// class. + /// Initializes a new instance of the HyperVVirtualMachineDetails class. /// - /// The source id of the object. - /// The id of the object in fabric. - /// The Last replication time. - /// The Last successful failover - /// time. - /// A value indicating whether the VM has - /// a physical disk attached. String value of - /// SrsDataContract.PresenceStatus enum. Possible values include: - /// 'Unknown', 'Present', 'NotPresent' - /// A value indicating whether the - /// VM has a fibre channel adapter attached. String value of - /// SrsDataContract.PresenceStatus enum. Possible values include: - /// 'Unknown', 'Present', 'NotPresent' - /// A value indicating whether the VM has a - /// shared VHD attached. String value of SrsDataContract.PresenceStatus - /// enum. Possible values include: 'Unknown', 'Present', - /// 'NotPresent' - /// The Id of the hyper-v host in - /// fabric. - public HyperVVirtualMachineDetails(string sourceItemId = default(string), string generation = default(string), OSDetails osDetails = default(OSDetails), IList diskDetails = default(IList), string hasPhysicalDisk = default(string), string hasFibreChannelAdapter = default(string), string hasSharedVhd = default(string), string hyperVHostId = default(string)) + + /// The source id of the object. + /// + + /// The id of the object in fabric. + /// + + /// The Last replication time. + /// + + /// The Last successful failover time. + /// + + /// A value indicating whether the VM has a physical disk attached. String + /// value of SrsDataContract.PresenceStatus enum. + /// Possible values include: 'Unknown', 'Present', 'NotPresent' + + /// A value indicating whether the VM has a fibre channel adapter attached. + /// String value of SrsDataContract.PresenceStatus enum. + /// Possible values include: 'Unknown', 'Present', 'NotPresent' + + /// A value indicating whether the VM has a shared VHD attached. String value + /// of SrsDataContract.PresenceStatus enum. + /// Possible values include: 'Unknown', 'Present', 'NotPresent' + + /// The Id of the hyper-v host in fabric. + /// + public HyperVVirtualMachineDetails(string sourceItemId = default(string), string generation = default(string), OSDetails osDetails = default(OSDetails), System.Collections.Generic.IList diskDetails = default(System.Collections.Generic.IList), string hasPhysicalDisk = default(string), string hasFibreChannelAdapter = default(string), string hasSharedVhd = default(string), string hyperVHostId = default(string)) + { - SourceItemId = sourceItemId; - Generation = generation; - OsDetails = osDetails; - DiskDetails = diskDetails; - HasPhysicalDisk = hasPhysicalDisk; - HasFibreChannelAdapter = hasFibreChannelAdapter; - HasSharedVhd = hasSharedVhd; - HyperVHostId = hyperVHostId; + this.SourceItemId = sourceItemId; + this.Generation = generation; + this.OSDetails = osDetails; + this.DiskDetails = diskDetails; + this.HasPhysicalDisk = hasPhysicalDisk; + this.HasFibreChannelAdapter = hasFibreChannelAdapter; + this.HasSharedVhd = hasSharedVhd; + this.HyperVHostId = hyperVHostId; CustomInit(); } @@ -71,59 +70,56 @@ public HyperVVirtualMachineDetails() /// partial void CustomInit(); + /// /// Gets or sets the source id of the object. /// - [JsonProperty(PropertyName = "sourceItemId")] - public string SourceItemId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceItemId")] + public string SourceItemId {get; set; } /// /// Gets or sets the id of the object in fabric. /// - [JsonProperty(PropertyName = "generation")] - public string Generation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "generation")] + public string Generation {get; set; } /// /// Gets or sets the Last replication time. /// - [JsonProperty(PropertyName = "osDetails")] - public OSDetails OsDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osDetails")] + public OSDetails OSDetails {get; set; } /// /// Gets or sets the Last successful failover time. /// - [JsonProperty(PropertyName = "diskDetails")] - public IList DiskDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskDetails")] + public System.Collections.Generic.IList DiskDetails {get; set; } /// /// Gets or sets a value indicating whether the VM has a physical disk - /// attached. String value of SrsDataContract.PresenceStatus enum. - /// Possible values include: 'Unknown', 'Present', 'NotPresent' + /// attached. String value of SrsDataContract.PresenceStatus enum. Possible values include: 'Unknown', 'Present', 'NotPresent' /// - [JsonProperty(PropertyName = "hasPhysicalDisk")] - public string HasPhysicalDisk { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hasPhysicalDisk")] + public string HasPhysicalDisk {get; set; } /// - /// Gets or sets a value indicating whether the VM has a fibre channel - /// adapter attached. String value of SrsDataContract.PresenceStatus - /// enum. Possible values include: 'Unknown', 'Present', 'NotPresent' + /// Gets or sets a value indicating whether the VM has a fibre channel adapter + /// attached. String value of SrsDataContract.PresenceStatus enum. Possible values include: 'Unknown', 'Present', 'NotPresent' /// - [JsonProperty(PropertyName = "hasFibreChannelAdapter")] - public string HasFibreChannelAdapter { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hasFibreChannelAdapter")] + public string HasFibreChannelAdapter {get; set; } /// - /// Gets or sets a value indicating whether the VM has a shared VHD - /// attached. String value of SrsDataContract.PresenceStatus enum. - /// Possible values include: 'Unknown', 'Present', 'NotPresent' + /// Gets or sets a value indicating whether the VM has a shared VHD attached. + /// String value of SrsDataContract.PresenceStatus enum. Possible values include: 'Unknown', 'Present', 'NotPresent' /// - [JsonProperty(PropertyName = "hasSharedVhd")] - public string HasSharedVhd { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hasSharedVhd")] + public string HasSharedVhd {get; set; } /// /// Gets or sets the Id of the hyper-v host in fabric. /// - [JsonProperty(PropertyName = "hyperVHostId")] - public string HyperVHostId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "hyperVHostId")] + public string HyperVHostId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IPConfigDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IPConfigDetails.cs index badd6b68e9ad..43bfe70b8bf1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IPConfigDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IPConfigDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class IPConfigDetails @@ -28,23 +20,69 @@ public IPConfigDetails() /// /// Initializes a new instance of the IPConfigDetails class. /// - public IPConfigDetails(string name = default(string), bool? isPrimary = default(bool?), string subnetName = default(string), string staticIPAddress = default(string), string ipAddressType = default(string), bool? isSeletedForFailover = default(bool?), string recoverySubnetName = default(string), string recoveryStaticIPAddress = default(string), string recoveryIPAddressType = default(string), string recoveryPublicIPAddressId = default(string), IList recoveryLBBackendAddressPoolIds = default(IList), string tfoSubnetName = default(string), string tfoStaticIPAddress = default(string), string tfoPublicIPAddressId = default(string), IList tfoLBBackendAddressPoolIds = default(IList)) + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + public IPConfigDetails(string name = default(string), bool? isPrimary = default(bool?), string subnetName = default(string), string staticIPAddress = default(string), string ipAddressType = default(string), bool? isSeletedForFailover = default(bool?), string recoverySubnetName = default(string), string recoveryStaticIPAddress = default(string), string recoveryIPAddressType = default(string), string recoveryPublicIPAddressId = default(string), System.Collections.Generic.IList recoveryLbBackendAddressPoolIds = default(System.Collections.Generic.IList), string tfoSubnetName = default(string), string tfoStaticIPAddress = default(string), string tfoPublicIPAddressId = default(string), System.Collections.Generic.IList tfoLbBackendAddressPoolIds = default(System.Collections.Generic.IList)) + { - Name = name; - IsPrimary = isPrimary; - SubnetName = subnetName; - StaticIPAddress = staticIPAddress; - IpAddressType = ipAddressType; - IsSeletedForFailover = isSeletedForFailover; - RecoverySubnetName = recoverySubnetName; - RecoveryStaticIPAddress = recoveryStaticIPAddress; - RecoveryIPAddressType = recoveryIPAddressType; - RecoveryPublicIPAddressId = recoveryPublicIPAddressId; - RecoveryLBBackendAddressPoolIds = recoveryLBBackendAddressPoolIds; - TfoSubnetName = tfoSubnetName; - TfoStaticIPAddress = tfoStaticIPAddress; - TfoPublicIPAddressId = tfoPublicIPAddressId; - TfoLBBackendAddressPoolIds = tfoLBBackendAddressPoolIds; + this.Name = name; + this.IsPrimary = isPrimary; + this.SubnetName = subnetName; + this.StaticIPAddress = staticIPAddress; + this.IPAddressType = ipAddressType; + this.IsSeletedForFailover = isSeletedForFailover; + this.RecoverySubnetName = recoverySubnetName; + this.RecoveryStaticIPAddress = recoveryStaticIPAddress; + this.RecoveryIPAddressType = recoveryIPAddressType; + this.RecoveryPublicIPAddressId = recoveryPublicIPAddressId; + this.RecoveryLbBackendAddressPoolIds = recoveryLbBackendAddressPoolIds; + this.TfoSubnetName = tfoSubnetName; + this.TfoStaticIPAddress = tfoStaticIPAddress; + this.TfoPublicIPAddressId = tfoPublicIPAddressId; + this.TfoLbBackendAddressPoolIds = tfoLbBackendAddressPoolIds; CustomInit(); } @@ -53,80 +91,95 @@ public IPConfigDetails() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "isPrimary")] - public bool? IsPrimary { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isPrimary")] + public bool? IsPrimary {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "subnetName")] - public string SubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subnetName")] + public string SubnetName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "staticIPAddress")] - public string StaticIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "staticIPAddress")] + public string StaticIPAddress {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "ipAddressType")] - public string IpAddressType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddressType")] + public string IPAddressType {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "isSeletedForFailover")] - public bool? IsSeletedForFailover { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isSeletedForFailover")] + public bool? IsSeletedForFailover {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "recoverySubnetName")] - public string RecoverySubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoverySubnetName")] + public string RecoverySubnetName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "recoveryStaticIPAddress")] - public string RecoveryStaticIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryStaticIPAddress")] + public string RecoveryStaticIPAddress {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "recoveryIPAddressType")] - public string RecoveryIPAddressType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryIPAddressType")] + public string RecoveryIPAddressType {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "recoveryPublicIPAddressId")] - public string RecoveryPublicIPAddressId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPublicIPAddressId")] + public string RecoveryPublicIPAddressId {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "recoveryLBBackendAddressPoolIds")] - public IList RecoveryLBBackendAddressPoolIds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryLBBackendAddressPoolIds")] + public System.Collections.Generic.IList RecoveryLbBackendAddressPoolIds {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "tfoSubnetName")] - public string TfoSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoSubnetName")] + public string TfoSubnetName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "tfoStaticIPAddress")] - public string TfoStaticIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoStaticIPAddress")] + public string TfoStaticIPAddress {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "tfoPublicIPAddressId")] - public string TfoPublicIPAddressId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoPublicIPAddressId")] + public string TfoPublicIPAddressId {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "tfoLBBackendAddressPoolIds")] - public IList TfoLBBackendAddressPoolIds { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoLBBackendAddressPoolIds")] + public System.Collections.Generic.IList TfoLbBackendAddressPoolIds {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IPConfigInputDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IPConfigInputDetails.cs index a854f6c485e9..ae48cf0d678b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IPConfigInputDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IPConfigInputDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; public partial class IPConfigInputDetails @@ -28,19 +20,53 @@ public IPConfigInputDetails() /// /// Initializes a new instance of the IPConfigInputDetails class. /// - public IPConfigInputDetails(string ipConfigName = default(string), bool? isPrimary = default(bool?), bool? isSeletedForFailover = default(bool?), string recoverySubnetName = default(string), string recoveryStaticIPAddress = default(string), string recoveryPublicIPAddressId = default(string), IList recoveryLBBackendAddressPoolIds = default(IList), string tfoSubnetName = default(string), string tfoStaticIPAddress = default(string), string tfoPublicIPAddressId = default(string), IList tfoLBBackendAddressPoolIds = default(IList)) + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// + public IPConfigInputDetails(string ipConfigName = default(string), bool? isPrimary = default(bool?), bool? isSeletedForFailover = default(bool?), string recoverySubnetName = default(string), string recoveryStaticIPAddress = default(string), string recoveryPublicIPAddressId = default(string), System.Collections.Generic.IList recoveryLbBackendAddressPoolIds = default(System.Collections.Generic.IList), string tfoSubnetName = default(string), string tfoStaticIPAddress = default(string), string tfoPublicIPAddressId = default(string), System.Collections.Generic.IList tfoLbBackendAddressPoolIds = default(System.Collections.Generic.IList)) + { - IpConfigName = ipConfigName; - IsPrimary = isPrimary; - IsSeletedForFailover = isSeletedForFailover; - RecoverySubnetName = recoverySubnetName; - RecoveryStaticIPAddress = recoveryStaticIPAddress; - RecoveryPublicIPAddressId = recoveryPublicIPAddressId; - RecoveryLBBackendAddressPoolIds = recoveryLBBackendAddressPoolIds; - TfoSubnetName = tfoSubnetName; - TfoStaticIPAddress = tfoStaticIPAddress; - TfoPublicIPAddressId = tfoPublicIPAddressId; - TfoLBBackendAddressPoolIds = tfoLBBackendAddressPoolIds; + this.IPConfigName = ipConfigName; + this.IsPrimary = isPrimary; + this.IsSeletedForFailover = isSeletedForFailover; + this.RecoverySubnetName = recoverySubnetName; + this.RecoveryStaticIPAddress = recoveryStaticIPAddress; + this.RecoveryPublicIPAddressId = recoveryPublicIPAddressId; + this.RecoveryLbBackendAddressPoolIds = recoveryLbBackendAddressPoolIds; + this.TfoSubnetName = tfoSubnetName; + this.TfoStaticIPAddress = tfoStaticIPAddress; + this.TfoPublicIPAddressId = tfoPublicIPAddressId; + this.TfoLbBackendAddressPoolIds = tfoLbBackendAddressPoolIds; CustomInit(); } @@ -49,60 +75,71 @@ public IPConfigInputDetails() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "ipConfigName")] - public string IpConfigName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipConfigName")] + public string IPConfigName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "isPrimary")] - public bool? IsPrimary { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isPrimary")] + public bool? IsPrimary {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "isSeletedForFailover")] - public bool? IsSeletedForFailover { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isSeletedForFailover")] + public bool? IsSeletedForFailover {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "recoverySubnetName")] - public string RecoverySubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoverySubnetName")] + public string RecoverySubnetName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "recoveryStaticIPAddress")] - public string RecoveryStaticIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryStaticIPAddress")] + public string RecoveryStaticIPAddress {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "recoveryPublicIPAddressId")] - public string RecoveryPublicIPAddressId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPublicIPAddressId")] + public string RecoveryPublicIPAddressId {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "recoveryLBBackendAddressPoolIds")] - public IList RecoveryLBBackendAddressPoolIds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryLBBackendAddressPoolIds")] + public System.Collections.Generic.IList RecoveryLbBackendAddressPoolIds {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "tfoSubnetName")] - public string TfoSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoSubnetName")] + public string TfoSubnetName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "tfoStaticIPAddress")] - public string TfoStaticIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoStaticIPAddress")] + public string TfoStaticIPAddress {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "tfoPublicIPAddressId")] - public string TfoPublicIPAddressId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoPublicIPAddressId")] + public string TfoPublicIPAddressId {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "tfoLBBackendAddressPoolIds")] - public IList TfoLBBackendAddressPoolIds { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoLBBackendAddressPoolIds")] + public System.Collections.Generic.IList TfoLbBackendAddressPoolIds {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IdentityProviderDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IdentityProviderDetails.cs index 99303f2891f4..9cc4c94e7cc7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IdentityProviderDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IdentityProviderDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,27 +23,34 @@ public IdentityProviderDetails() /// /// Initializes a new instance of the IdentityProviderDetails class. /// - /// The tenant Id for the service principal with - /// which the on-premise management/data plane components would - /// communicate with our Azure services. - /// The application/client Id for the - /// service principal with which the on-premise management/data plane - /// components would communicate with our Azure services. - /// The object Id of the service principal with - /// which the on-premise management/data plane components would - /// communicate with our Azure services. - /// The intended Audience of the service - /// principal with which the on-premise management/data plane - /// components would communicate with our Azure services. - /// The base authority for Azure Active - /// Directory authentication. + + /// The tenant Id for the service principal with which the on-premise + /// management/data plane components would communicate with our Azure services. + /// + + /// The application/client Id for the service principal with which the + /// on-premise management/data plane components would communicate with our + /// Azure services. + /// + + /// The object Id of the service principal with which the on-premise + /// management/data plane components would communicate with our Azure services. + /// + + /// The intended Audience of the service principal with which the on-premise + /// management/data plane components would communicate with our Azure services. + /// + + /// The base authority for Azure Active Directory authentication. + /// public IdentityProviderDetails(string tenantId = default(string), string applicationId = default(string), string objectId = default(string), string audience = default(string), string aadAuthority = default(string)) + { - TenantId = tenantId; - ApplicationId = applicationId; - ObjectId = objectId; - Audience = audience; - AadAuthority = aadAuthority; + this.TenantId = tenantId; + this.ApplicationId = applicationId; + this.ObjectId = objectId; + this.Audience = audience; + this.AadAuthority = aadAuthority; CustomInit(); } @@ -58,44 +59,43 @@ public IdentityProviderDetails() /// partial void CustomInit(); + /// /// Gets or sets the tenant Id for the service principal with which the - /// on-premise management/data plane components would communicate with - /// our Azure services. + /// on-premise management/data plane components would communicate with our + /// Azure services. /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; set; } /// - /// Gets or sets the application/client Id for the service principal - /// with which the on-premise management/data plane components would - /// communicate with our Azure services. + /// Gets or sets the application/client Id for the service principal with which + /// the on-premise management/data plane components would communicate with our + /// Azure services. /// - [JsonProperty(PropertyName = "applicationId")] - public string ApplicationId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationId")] + public string ApplicationId {get; set; } /// /// Gets or sets the object Id of the service principal with which the - /// on-premise management/data plane components would communicate with - /// our Azure services. + /// on-premise management/data plane components would communicate with our + /// Azure services. /// - [JsonProperty(PropertyName = "objectId")] - public string ObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "objectId")] + public string ObjectId {get; set; } /// - /// Gets or sets the intended Audience of the service principal with - /// which the on-premise management/data plane components would - /// communicate with our Azure services. + /// Gets or sets the intended Audience of the service principal with which the + /// on-premise management/data plane components would communicate with our + /// Azure services. /// - [JsonProperty(PropertyName = "audience")] - public string Audience { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "audience")] + public string Audience {get; set; } /// - /// Gets or sets the base authority for Azure Active Directory - /// authentication. + /// Gets or sets the base authority for Azure Active Directory authentication. /// - [JsonProperty(PropertyName = "aadAuthority")] - public string AadAuthority { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "aadAuthority")] + public string AadAuthority {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IdentityProviderInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IdentityProviderInput.cs index 32f32fbab4f0..39ed0091b5ac 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IdentityProviderInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/IdentityProviderInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,27 +23,34 @@ public IdentityProviderInput() /// /// Initializes a new instance of the IdentityProviderInput class. /// - /// The tenant Id for the service principal with - /// which the on-premise management/data plane components would - /// communicate with our Azure services. - /// The application/client Id for the - /// service principal with which the on-premise management/data plane - /// components would communicate with our Azure services. - /// The object Id of the service principal with - /// which the on-premise management/data plane components would - /// communicate with our Azure services. - /// The intended Audience of the service - /// principal with which the on-premise management/data plane - /// components would communicate with our Azure services. - /// The base authority for Azure Active - /// Directory authentication. + + /// The tenant Id for the service principal with which the on-premise + /// management/data plane components would communicate with our Azure services. + /// + + /// The application/client Id for the service principal with which the + /// on-premise management/data plane components would communicate with our + /// Azure services. + /// + + /// The object Id of the service principal with which the on-premise + /// management/data plane components would communicate with our Azure services. + /// + + /// The intended Audience of the service principal with which the on-premise + /// management/data plane components would communicate with our Azure services. + /// + + /// The base authority for Azure Active Directory authentication. + /// public IdentityProviderInput(string tenantId, string applicationId, string objectId, string audience, string aadAuthority) + { - TenantId = tenantId; - ApplicationId = applicationId; - ObjectId = objectId; - Audience = audience; - AadAuthority = aadAuthority; + this.TenantId = tenantId; + this.ApplicationId = applicationId; + this.ObjectId = objectId; + this.Audience = audience; + this.AadAuthority = aadAuthority; CustomInit(); } @@ -59,73 +59,77 @@ public IdentityProviderInput(string tenantId, string applicationId, string objec /// partial void CustomInit(); + /// /// Gets or sets the tenant Id for the service principal with which the - /// on-premise management/data plane components would communicate with - /// our Azure services. + /// on-premise management/data plane components would communicate with our + /// Azure services. /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; set; } /// - /// Gets or sets the application/client Id for the service principal - /// with which the on-premise management/data plane components would - /// communicate with our Azure services. + /// Gets or sets the application/client Id for the service principal with which + /// the on-premise management/data plane components would communicate with our + /// Azure services. /// - [JsonProperty(PropertyName = "applicationId")] - public string ApplicationId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationId")] + public string ApplicationId {get; set; } /// /// Gets or sets the object Id of the service principal with which the - /// on-premise management/data plane components would communicate with - /// our Azure services. + /// on-premise management/data plane components would communicate with our + /// Azure services. /// - [JsonProperty(PropertyName = "objectId")] - public string ObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "objectId")] + public string ObjectId {get; set; } /// - /// Gets or sets the intended Audience of the service principal with - /// which the on-premise management/data plane components would - /// communicate with our Azure services. + /// Gets or sets the intended Audience of the service principal with which the + /// on-premise management/data plane components would communicate with our + /// Azure services. /// - [JsonProperty(PropertyName = "audience")] - public string Audience { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "audience")] + public string Audience {get; set; } /// - /// Gets or sets the base authority for Azure Active Directory - /// authentication. + /// Gets or sets the base authority for Azure Active Directory authentication. /// - [JsonProperty(PropertyName = "aadAuthority")] - public string AadAuthority { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "aadAuthority")] + public string AadAuthority {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (TenantId == null) + if (this.TenantId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TenantId"); } - if (ApplicationId == null) + if (this.ApplicationId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ApplicationId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ApplicationId"); } - if (ObjectId == null) + if (this.ObjectId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ObjectId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ObjectId"); } - if (Audience == null) + if (this.Audience == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Audience"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Audience"); } - if (AadAuthority == null) + if (this.AadAuthority == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "AadAuthority"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AadAuthority"); } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAgentDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAgentDetails.cs index f1cc3c11eed2..9c38caec58b5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAgentDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAgentDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,25 @@ public InMageAgentDetails() /// /// Initializes a new instance of the InMageAgentDetails class. /// - /// The agent version. - /// A value indicating whether - /// installed agent needs to be updated. - /// A value indicating whether - /// reboot is required after update is applied. - /// Agent expiry date. + + /// The agent version. + /// + + /// A value indicating whether installed agent needs to be updated. + /// + + /// A value indicating whether reboot is required after update is applied. + /// + + /// Agent expiry date. + /// public InMageAgentDetails(string agentVersion = default(string), string agentUpdateStatus = default(string), string postUpdateRebootStatus = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?)) + { - AgentVersion = agentVersion; - AgentUpdateStatus = agentUpdateStatus; - PostUpdateRebootStatus = postUpdateRebootStatus; - AgentExpiryDate = agentExpiryDate; + this.AgentVersion = agentVersion; + this.AgentUpdateStatus = agentUpdateStatus; + this.PostUpdateRebootStatus = postUpdateRebootStatus; + this.AgentExpiryDate = agentExpiryDate; CustomInit(); } @@ -49,31 +50,31 @@ public InMageAgentDetails() /// partial void CustomInit(); + /// /// Gets or sets the agent version. /// - [JsonProperty(PropertyName = "agentVersion")] - public string AgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion {get; set; } /// /// Gets or sets a value indicating whether installed agent needs to be /// updated. /// - [JsonProperty(PropertyName = "agentUpdateStatus")] - public string AgentUpdateStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentUpdateStatus")] + public string AgentUpdateStatus {get; set; } /// - /// Gets or sets a value indicating whether reboot is required after - /// update is applied. + /// Gets or sets a value indicating whether reboot is required after update is + /// applied. /// - [JsonProperty(PropertyName = "postUpdateRebootStatus")] - public string PostUpdateRebootStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "postUpdateRebootStatus")] + public string PostUpdateRebootStatus {get; set; } /// /// Gets or sets agent expiry date. /// - [JsonProperty(PropertyName = "agentExpiryDate")] - public System.DateTime? AgentExpiryDate { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "agentExpiryDate")] + public System.DateTime? AgentExpiryDate {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ApplyRecoveryPointInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ApplyRecoveryPointInput.cs index cd18b311c64a..e9c352910957 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ApplyRecoveryPointInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ApplyRecoveryPointInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2ApplyRecoveryPointInput : ApplyRecoveryPointProviderSpecificInput { /// - /// Initializes a new instance of the - /// InMageAzureV2ApplyRecoveryPointInput class. + /// Initializes a new instance of the InMageAzureV2ApplyRecoveryPointInput class. /// public InMageAzureV2ApplyRecoveryPointInput() { @@ -35,4 +28,4 @@ public InMageAzureV2ApplyRecoveryPointInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2DiskInputDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2DiskInputDetails.cs index 6d6cff4d42ca..7e98b130ade1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2DiskInputDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2DiskInputDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2DiskInputDetails { /// - /// Initializes a new instance of the InMageAzureV2DiskInputDetails - /// class. + /// Initializes a new instance of the InMageAzureV2DiskInputDetails class. /// public InMageAzureV2DiskInputDetails() { @@ -28,21 +21,27 @@ public InMageAzureV2DiskInputDetails() } /// - /// Initializes a new instance of the InMageAzureV2DiskInputDetails - /// class. + /// Initializes a new instance of the InMageAzureV2DiskInputDetails class. /// - /// The DiskId. - /// The LogStorageAccountId. - /// The DiskType. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - /// The DiskEncryptionSet ARM - /// ID. + + /// The DiskId. + /// + + /// The LogStorageAccountId. + /// + + /// The DiskType. + /// Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + + /// The DiskEncryptionSet ARM ID. + /// public InMageAzureV2DiskInputDetails(string diskId = default(string), string logStorageAccountId = default(string), string diskType = default(string), string diskEncryptionSetId = default(string)) + { - DiskId = diskId; - LogStorageAccountId = logStorageAccountId; - DiskType = diskType; - DiskEncryptionSetId = diskEncryptionSetId; + this.DiskId = diskId; + this.LogStorageAccountId = logStorageAccountId; + this.DiskType = diskType; + this.DiskEncryptionSetId = diskEncryptionSetId; CustomInit(); } @@ -51,30 +50,29 @@ public InMageAzureV2DiskInputDetails() /// partial void CustomInit(); + /// /// Gets or sets the DiskId. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the LogStorageAccountId. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } /// - /// Gets or sets the DiskType. Possible values include: 'Standard_LRS', - /// 'Premium_LRS', 'StandardSSD_LRS' + /// Gets or sets the DiskType. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// /// Gets or sets the DiskEncryptionSet ARM ID. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2EnableProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2EnableProtectionInput.cs index 845a3309b3ca..4dad9253551e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2EnableProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2EnableProtectionInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2EnableProtectionInput : EnableProtectionProviderSpecificInput { /// - /// Initializes a new instance of the - /// InMageAzureV2EnableProtectionInput class. + /// Initializes a new instance of the InMageAzureV2EnableProtectionInput class. /// public InMageAzureV2EnableProtectionInput() { @@ -31,82 +22,118 @@ public InMageAzureV2EnableProtectionInput() } /// - /// Initializes a new instance of the - /// InMageAzureV2EnableProtectionInput class. + /// Initializes a new instance of the InMageAzureV2EnableProtectionInput class. /// - /// The Master target Id. - /// The Process Server Id. - /// The storage account Id. - /// The CS account Id. - /// The multi VM group Id. - /// The multi VM group name. - /// The disks to include list. - /// The selected target Azure - /// network Id. - /// The selected target Azure subnet - /// Id. - /// The selected option to enable - /// RDP\SSH on target VM after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. - /// The target azure VM Name. - /// The storage account to be used - /// for logging during replication. - /// The Id of the target - /// resource group (for classic deployment) in which the failover VM is - /// to be created. - /// The Id of the target - /// resource group (for resource manager deployment) in which the - /// failover VM is to be created. - /// The DiskType. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - /// The target availability set - /// ARM Id for resource manager deployment. - /// The target availability - /// zone. - /// The proximity - /// placement group ARM Id. - /// License type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'WindowsServer' + + /// The Master target Id. + /// + + /// The Process Server Id. + /// + + /// The storage account Id. + /// + + /// The CS account Id. + /// + + /// The multi VM group Id. + /// + + /// The multi VM group name. + /// + + /// The disks to include list. + /// + + /// The selected target Azure network Id. + /// + + /// The selected target Azure subnet Id. + /// + + /// The selected option to enable RDP\SSH on target VM after failover. String + /// value of SrsDataContract.EnableRDPOnTargetOption enum. + /// + + /// The target azure VM Name. + /// + + /// The storage account to be used for logging during replication. + /// + + /// The Id of the target resource group (for classic deployment) in which the + /// failover VM is to be created. + /// + + /// The Id of the target resource group (for resource manager deployment) in + /// which the failover VM is to be created. + /// + + /// The DiskType. + /// Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + + /// The target availability set ARM Id for resource manager deployment. + /// + + /// The target availability zone. + /// + + /// The proximity placement group ARM Id. + /// + + /// License type. + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' + /// The SQL Server license type. - /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', - /// 'AHUB' - /// The target VM size. - /// The DiskEncryptionSet ARM - /// Id. - /// The target VM tags. - /// The tags for the seed managed - /// disks. - /// The tags for the target managed - /// disks. - /// The tags for the target NICs. - public InMageAzureV2EnableProtectionInput(string masterTargetId = default(string), string processServerId = default(string), string storageAccountId = default(string), string runAsAccountId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), IList disksToInclude = default(IList), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRdpOnTargetOption = default(string), string targetAzureVmName = default(string), string logStorageAccountId = default(string), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string diskType = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), string targetVmSize = default(string), string diskEncryptionSetId = default(string), IDictionary targetVmTags = default(IDictionary), IDictionary seedManagedDiskTags = default(IDictionary), IDictionary targetManagedDiskTags = default(IDictionary), IDictionary targetNicTags = default(IDictionary)) + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + + /// The target VM size. + /// + + /// The DiskEncryptionSet ARM Id. + /// + + /// The target VM tags. + /// + + /// The tags for the seed managed disks. + /// + + /// The tags for the target managed disks. + /// + + /// The tags for the target NICs. + /// + public InMageAzureV2EnableProtectionInput(string masterTargetId = default(string), string processServerId = default(string), string storageAccountId = default(string), string runAsAccountId = default(string), string multiVMGroupId = default(string), string multiVMGroupName = default(string), System.Collections.Generic.IList disksToInclude = default(System.Collections.Generic.IList), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRdpOnTargetOption = default(string), string targetAzureVMName = default(string), string logStorageAccountId = default(string), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string diskType = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), string targetVMSize = default(string), string diskEncryptionSetId = default(string), System.Collections.Generic.IDictionary targetVMTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary seedManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetNicTags = default(System.Collections.Generic.IDictionary)) + { - MasterTargetId = masterTargetId; - ProcessServerId = processServerId; - StorageAccountId = storageAccountId; - RunAsAccountId = runAsAccountId; - MultiVmGroupId = multiVmGroupId; - MultiVmGroupName = multiVmGroupName; - DisksToInclude = disksToInclude; - TargetAzureNetworkId = targetAzureNetworkId; - TargetAzureSubnetId = targetAzureSubnetId; - EnableRdpOnTargetOption = enableRdpOnTargetOption; - TargetAzureVmName = targetAzureVmName; - LogStorageAccountId = logStorageAccountId; - TargetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId; - TargetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId; - DiskType = diskType; - TargetAvailabilitySetId = targetAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - LicenseType = licenseType; - SqlServerLicenseType = sqlServerLicenseType; - TargetVmSize = targetVmSize; - DiskEncryptionSetId = diskEncryptionSetId; - TargetVmTags = targetVmTags; - SeedManagedDiskTags = seedManagedDiskTags; - TargetManagedDiskTags = targetManagedDiskTags; - TargetNicTags = targetNicTags; + this.MasterTargetId = masterTargetId; + this.ProcessServerId = processServerId; + this.StorageAccountId = storageAccountId; + this.RunAsAccountId = runAsAccountId; + this.MultiVMGroupId = multiVMGroupId; + this.MultiVMGroupName = multiVMGroupName; + this.DisksToInclude = disksToInclude; + this.TargetAzureNetworkId = targetAzureNetworkId; + this.TargetAzureSubnetId = targetAzureSubnetId; + this.EnableRdpOnTargetOption = enableRdpOnTargetOption; + this.TargetAzureVMName = targetAzureVMName; + this.LogStorageAccountId = logStorageAccountId; + this.TargetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId; + this.TargetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId; + this.DiskType = diskType; + this.TargetAvailabilitySetId = targetAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.LicenseType = licenseType; + this.SqlServerLicenseType = sqlServerLicenseType; + this.TargetVMSize = targetVMSize; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.TargetVMTags = targetVMTags; + this.SeedManagedDiskTags = seedManagedDiskTags; + this.TargetManagedDiskTags = targetManagedDiskTags; + this.TargetNicTags = targetNicTags; CustomInit(); } @@ -115,170 +142,165 @@ public InMageAzureV2EnableProtectionInput() /// partial void CustomInit(); + /// /// Gets or sets the Master target Id. /// - [JsonProperty(PropertyName = "masterTargetId")] - public string MasterTargetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId {get; set; } /// /// Gets or sets the Process Server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the storage account Id. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; set; } /// /// Gets or sets the CS account Id. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } /// /// Gets or sets the multi VM group Id. /// - [JsonProperty(PropertyName = "multiVmGroupId")] - public string MultiVmGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVMGroupId {get; set; } /// /// Gets or sets the multi VM group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; set; } /// /// Gets or sets the disks to include list. /// - [JsonProperty(PropertyName = "disksToInclude")] - public IList DisksToInclude { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "disksToInclude")] + public System.Collections.Generic.IList DisksToInclude {get; set; } /// /// Gets or sets the selected target Azure network Id. /// - [JsonProperty(PropertyName = "targetAzureNetworkId")] - public string TargetAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureNetworkId")] + public string TargetAzureNetworkId {get; set; } /// /// Gets or sets the selected target Azure subnet Id. /// - [JsonProperty(PropertyName = "targetAzureSubnetId")] - public string TargetAzureSubnetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureSubnetId")] + public string TargetAzureSubnetId {get; set; } /// - /// Gets or sets the selected option to enable RDP\SSH on target VM - /// after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. + /// Gets or sets the selected option to enable RDP\SSH on target VM after + /// failover. String value of SrsDataContract.EnableRDPOnTargetOption enum. /// - [JsonProperty(PropertyName = "enableRdpOnTargetOption")] - public string EnableRdpOnTargetOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableRdpOnTargetOption")] + public string EnableRdpOnTargetOption {get; set; } /// /// Gets or sets the target azure VM Name. /// - [JsonProperty(PropertyName = "targetAzureVmName")] - public string TargetAzureVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureVmName")] + public string TargetAzureVMName {get; set; } /// - /// Gets or sets the storage account to be used for logging during - /// replication. + /// Gets or sets the storage account to be used for logging during replication. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } /// - /// Gets or sets the Id of the target resource group (for classic - /// deployment) in which the failover VM is to be created. + /// Gets or sets the Id of the target resource group (for classic deployment) + /// in which the failover VM is to be created. /// - [JsonProperty(PropertyName = "targetAzureV1ResourceGroupId")] - public string TargetAzureV1ResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureV1ResourceGroupId")] + public string TargetAzureV1ResourceGroupId {get; set; } /// - /// Gets or sets the Id of the target resource group (for resource - /// manager deployment) in which the failover VM is to be created. + /// Gets or sets the Id of the target resource group (for resource manager + /// deployment) in which the failover VM is to be created. /// - [JsonProperty(PropertyName = "targetAzureV2ResourceGroupId")] - public string TargetAzureV2ResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAzureV2ResourceGroupId")] + public string TargetAzureV2ResourceGroupId {get; set; } /// - /// Gets or sets the DiskType. Possible values include: 'Standard_LRS', - /// 'Premium_LRS', 'StandardSSD_LRS' + /// Gets or sets the DiskType. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// - /// Gets or sets the target availability set ARM Id for resource - /// manager deployment. + /// Gets or sets the target availability set ARM Id for resource manager + /// deployment. /// - [JsonProperty(PropertyName = "targetAvailabilitySetId")] - public string TargetAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilitySetId")] + public string TargetAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the proximity placement group ARM Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// - /// Gets or sets license type. Possible values include: 'NotSpecified', - /// 'NoLicenseType', 'WindowsServer' + /// Gets or sets license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// - /// Gets or sets the SQL Server license type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + /// Gets or sets the SQL Server license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' /// - [JsonProperty(PropertyName = "sqlServerLicenseType")] - public string SqlServerLicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerLicenseType")] + public string SqlServerLicenseType {get; set; } /// /// Gets or sets the target VM size. /// - [JsonProperty(PropertyName = "targetVmSize")] - public string TargetVmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSize")] + public string TargetVMSize {get; set; } /// /// Gets or sets the DiskEncryptionSet ARM Id. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } /// /// Gets or sets the target VM tags. /// - [JsonProperty(PropertyName = "targetVmTags")] - public IDictionary TargetVmTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmTags")] + public System.Collections.Generic.IDictionary TargetVMTags {get; set; } /// /// Gets or sets the tags for the seed managed disks. /// - [JsonProperty(PropertyName = "seedManagedDiskTags")] - public IDictionary SeedManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedManagedDiskTags")] + public System.Collections.Generic.IDictionary SeedManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target managed disks. /// - [JsonProperty(PropertyName = "targetManagedDiskTags")] - public IDictionary TargetManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetManagedDiskTags")] + public System.Collections.Generic.IDictionary TargetManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target NICs. /// - [JsonProperty(PropertyName = "targetNicTags")] - public IDictionary TargetNicTags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicTags")] + public System.Collections.Generic.IDictionary TargetNicTags {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2EventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2EventDetails.cs index abe6977ecbd6..6aee1859a2ac 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2EventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2EventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,24 +24,38 @@ public InMageAzureV2EventDetails() /// /// Initializes a new instance of the InMageAzureV2EventDetails class. /// - /// InMage Event type. Takes one of the values - /// of InMageDataContract.InMageMonitoringEventType. - /// InMage Event Category. - /// InMage Event Component. - /// Corrective Action string for the - /// event. - /// InMage Event Details. - /// InMage Event Summary. - /// VMware Site name. + + /// InMage Event type. Takes one of the values of + /// InMageDataContract.InMageMonitoringEventType. + /// + + /// InMage Event Category. + /// + + /// InMage Event Component. + /// + + /// Corrective Action string for the event. + /// + + /// InMage Event Details. + /// + + /// InMage Event Summary. + /// + + /// VMware Site name. + /// public InMageAzureV2EventDetails(string eventType = default(string), string category = default(string), string component = default(string), string correctiveAction = default(string), string details = default(string), string summary = default(string), string siteName = default(string)) + { - EventType = eventType; - Category = category; - Component = component; - CorrectiveAction = correctiveAction; - Details = details; - Summary = summary; - SiteName = siteName; + this.EventType = eventType; + this.Category = category; + this.Component = component; + this.CorrectiveAction = correctiveAction; + this.Details = details; + this.Summary = summary; + this.SiteName = siteName; CustomInit(); } @@ -56,48 +64,48 @@ public InMageAzureV2EventDetails() /// partial void CustomInit(); + /// /// Gets or sets inMage Event type. Takes one of the values of /// InMageDataContract.InMageMonitoringEventType. /// - [JsonProperty(PropertyName = "eventType")] - public string EventType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "eventType")] + public string EventType {get; set; } /// /// Gets or sets inMage Event Category. /// - [JsonProperty(PropertyName = "category")] - public string Category { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "category")] + public string Category {get; set; } /// /// Gets or sets inMage Event Component. /// - [JsonProperty(PropertyName = "component")] - public string Component { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "component")] + public string Component {get; set; } /// /// Gets or sets corrective Action string for the event. /// - [JsonProperty(PropertyName = "correctiveAction")] - public string CorrectiveAction { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "correctiveAction")] + public string CorrectiveAction {get; set; } /// /// Gets or sets inMage Event Details. /// - [JsonProperty(PropertyName = "details")] - public string Details { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public string Details {get; set; } /// /// Gets or sets inMage Event Summary. /// - [JsonProperty(PropertyName = "summary")] - public string Summary { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "summary")] + public string Summary {get; set; } /// /// Gets or sets vMware Site name. /// - [JsonProperty(PropertyName = "siteName")] - public string SiteName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "siteName")] + public string SiteName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ManagedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ManagedDiskDetails.cs index 564f71e32725..8a8f9400e137 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ManagedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ManagedDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2ManagedDiskDetails { /// - /// Initializes a new instance of the InMageAzureV2ManagedDiskDetails - /// class. + /// Initializes a new instance of the InMageAzureV2ManagedDiskDetails class. /// public InMageAzureV2ManagedDiskDetails() { @@ -28,22 +21,31 @@ public InMageAzureV2ManagedDiskDetails() } /// - /// Initializes a new instance of the InMageAzureV2ManagedDiskDetails - /// class. + /// Initializes a new instance of the InMageAzureV2ManagedDiskDetails class. /// - /// The disk id. - /// Seed managed disk Id. - /// The replica disk type. - /// The DiskEncryptionSet ARM - /// ID. - /// The target disk name. + + /// The disk id. + /// + + /// Seed managed disk Id. + /// + + /// The replica disk type. + /// + + /// The DiskEncryptionSet ARM ID. + /// + + /// The target disk name. + /// public InMageAzureV2ManagedDiskDetails(string diskId = default(string), string seedManagedDiskId = default(string), string replicaDiskType = default(string), string diskEncryptionSetId = default(string), string targetDiskName = default(string)) + { - DiskId = diskId; - SeedManagedDiskId = seedManagedDiskId; - ReplicaDiskType = replicaDiskType; - DiskEncryptionSetId = diskEncryptionSetId; - TargetDiskName = targetDiskName; + this.DiskId = diskId; + this.SeedManagedDiskId = seedManagedDiskId; + this.ReplicaDiskType = replicaDiskType; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.TargetDiskName = targetDiskName; CustomInit(); } @@ -52,35 +54,35 @@ public InMageAzureV2ManagedDiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets seed managed disk Id. /// - [JsonProperty(PropertyName = "seedManagedDiskId")] - public string SeedManagedDiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedManagedDiskId")] + public string SeedManagedDiskId {get; set; } /// /// Gets or sets the replica disk type. /// - [JsonProperty(PropertyName = "replicaDiskType")] - public string ReplicaDiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaDiskType")] + public string ReplicaDiskType {get; set; } /// /// Gets or sets the DiskEncryptionSet ARM ID. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } /// /// Gets or sets the target disk name. /// - [JsonProperty(PropertyName = "targetDiskName")] - public string TargetDiskName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDiskName")] + public string TargetDiskName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2PolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2PolicyDetails.cs index cc885d45b988..06d6d6a8ddc3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2PolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2PolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,23 +24,29 @@ public InMageAzureV2PolicyDetails() /// /// Initializes a new instance of the InMageAzureV2PolicyDetails class. /// - /// The crash - /// consistent snapshot frequency in minutes. - /// The recovery point - /// threshold in minutes. - /// The duration in minutes until - /// which the recovery points need to be stored. - /// The app consistent - /// snapshot frequency in minutes. - /// A value indicating whether multi-VM - /// sync has to be enabled. - public InMageAzureV2PolicyDetails(int? crashConsistentFrequencyInMinutes = default(int?), int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVmSyncStatus = default(string)) + + /// The crash consistent snapshot frequency in minutes. + /// + + /// The recovery point threshold in minutes. + /// + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The app consistent snapshot frequency in minutes. + /// + + /// A value indicating whether multi-VM sync has to be enabled. + /// + public InMageAzureV2PolicyDetails(int? crashConsistentFrequencyInMinutes = default(int?), int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVMSyncStatus = default(string)) + { - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; - RecoveryPointHistory = recoveryPointHistory; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - MultiVmSyncStatus = multiVmSyncStatus; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + this.RecoveryPointHistory = recoveryPointHistory; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.MultiVMSyncStatus = multiVMSyncStatus; CustomInit(); } @@ -55,37 +55,36 @@ public InMageAzureV2PolicyDetails() /// partial void CustomInit(); + /// /// Gets or sets the crash consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the recovery point threshold in minutes. /// - [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] - public int? RecoveryPointThresholdInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes {get; set; } /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistory")] - public int? RecoveryPointHistory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory {get; set; } /// /// Gets or sets the app consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2PolicyInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2PolicyInput.cs index 641c18d5a6b3..9fab5a9b671f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2PolicyInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2PolicyInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -31,24 +24,30 @@ public InMageAzureV2PolicyInput() /// /// Initializes a new instance of the InMageAzureV2PolicyInput class. /// - /// A value indicating whether multi-VM - /// sync has to be enabled. Value should be 'Enabled' or 'Disabled'. + + /// The recovery point threshold in minutes. + /// + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The crash consistent snapshot frequency (in minutes). + /// + + /// The app consistent snapshot frequency (in minutes). + /// + + /// A value indicating whether multi-VM sync has to be enabled. Value should be + /// 'Enabled' or 'Disabled'. /// Possible values include: 'Enable', 'Disable' - /// The recovery point - /// threshold in minutes. - /// The duration in minutes until - /// which the recovery points need to be stored. - /// The crash - /// consistent snapshot frequency (in minutes). - /// The app consistent - /// snapshot frequency (in minutes). - public InMageAzureV2PolicyInput(string multiVmSyncStatus, int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + public InMageAzureV2PolicyInput(string multiVMSyncStatus, int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + { - RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; - RecoveryPointHistory = recoveryPointHistory; - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - MultiVmSyncStatus = multiVmSyncStatus; + this.RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + this.RecoveryPointHistory = recoveryPointHistory; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.MultiVMSyncStatus = multiVMSyncStatus; CustomInit(); } @@ -57,51 +56,51 @@ public InMageAzureV2PolicyInput() /// partial void CustomInit(); + /// /// Gets or sets the recovery point threshold in minutes. /// - [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] - public int? RecoveryPointThresholdInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes {get; set; } /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistory")] - public int? RecoveryPointHistory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory {get; set; } /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the app consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. Value should be 'Enabled' or 'Disabled'. Possible values - /// include: 'Enable', 'Disable' + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (MultiVmSyncStatus == null) + if (this.MultiVMSyncStatus == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MultiVmSyncStatus"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MultiVMSyncStatus"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ProtectedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ProtectedDiskDetails.cs index 0d356f8f0b7e..abc9555be54a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ProtectedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ProtectedDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2ProtectedDiskDetails { /// - /// Initializes a new instance of the InMageAzureV2ProtectedDiskDetails - /// class. + /// Initializes a new instance of the InMageAzureV2ProtectedDiskDetails class. /// public InMageAzureV2ProtectedDiskDetails() { @@ -28,72 +21,103 @@ public InMageAzureV2ProtectedDiskDetails() } /// - /// Initializes a new instance of the InMageAzureV2ProtectedDiskDetails - /// class. - /// - /// The disk id. - /// The disk name. - /// The protection stage. - /// The health error code for the - /// disk. - /// The RPO in seconds. - /// A value indicating whether resync is - /// required for this disk. - /// The resync progress - /// percentage. - /// The resync duration in - /// seconds. - /// The disk capacity in - /// bytes. - /// The disk file system - /// capacity in bytes. - /// The source data transit in - /// MB. - /// The PS data transit in MB. - /// The target data transit in - /// MB. - /// A value indicating whether disk is - /// resized. - /// The last RPO calculated - /// time. - /// The resync processed - /// bytes. - /// The resync total - /// transferred bytes. - /// The resync last - /// 15 minutes transferred bytes. - /// The last data transfer - /// time in UTC. - /// The resync start time. - /// The Progress Health. - /// The Progress Status. - /// The seconds to take for - /// switch provider. - public InMageAzureV2ProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string protectionStage = default(string), string healthErrorCode = default(string), long? rpoInSeconds = default(long?), string resyncRequired = default(string), int? resyncProgressPercentage = default(int?), long? resyncDurationInSeconds = default(long?), long? diskCapacityInBytes = default(long?), long? fileSystemCapacityInBytes = default(long?), double? sourceDataInMegaBytes = default(double?), double? psDataInMegaBytes = default(double?), double? targetDataInMegaBytes = default(double?), string diskResized = default(string), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), long? resyncProcessedBytes = default(long?), long? resyncTotalTransferredBytes = default(long?), long? resyncLast15MinutesTransferredBytes = default(long?), System.DateTime? resyncLastDataTransferTimeUTC = default(System.DateTime?), System.DateTime? resyncStartTime = default(System.DateTime?), string progressHealth = default(string), string progressStatus = default(string), long? secondsToTakeSwitchProvider = default(long?)) + /// Initializes a new instance of the InMageAzureV2ProtectedDiskDetails class. + /// + + /// The disk id. + /// + + /// The disk name. + /// + + /// The protection stage. + /// + + /// The health error code for the disk. + /// + + /// The RPO in seconds. + /// + + /// A value indicating whether resync is required for this disk. + /// + + /// The resync progress percentage. + /// + + /// The resync duration in seconds. + /// + + /// The disk capacity in bytes. + /// + + /// The disk file system capacity in bytes. + /// + + /// The source data transit in MB. + /// + + /// The PS data transit in MB. + /// + + /// The target data transit in MB. + /// + + /// A value indicating whether disk is resized. + /// + + /// The last RPO calculated time. + /// + + /// The resync processed bytes. + /// + + /// The resync total transferred bytes. + /// + + /// The resync last 15 minutes transferred bytes. + /// + + /// The last data transfer time in UTC. + /// + + /// The resync start time. + /// + + /// The Progress Health. + /// + + /// The Progress Status. + /// + + /// The seconds to take for switch provider. + /// + public InMageAzureV2ProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string protectionStage = default(string), string healthErrorCode = default(string), long? rpoInSeconds = default(long?), string resyncRequired = default(string), int? resyncProgressPercentage = default(int?), long? resyncDurationInSeconds = default(long?), long? diskCapacityInBytes = default(long?), long? fileSystemCapacityInBytes = default(long?), double? sourceDataInMegaBytes = default(double?), double? psDataInMegaBytes = default(double?), double? targetDataInMegaBytes = default(double?), string diskResized = default(string), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), long? resyncProcessedBytes = default(long?), long? resyncTotalTransferredBytes = default(long?), long? resyncLast15MinutesTransferredBytes = default(long?), System.DateTime? resyncLastDataTransferTimeUtc = default(System.DateTime?), System.DateTime? resyncStartTime = default(System.DateTime?), string progressHealth = default(string), string progressStatus = default(string), long? secondsToTakeSwitchProvider = default(long?)) + { - DiskId = diskId; - DiskName = diskName; - ProtectionStage = protectionStage; - HealthErrorCode = healthErrorCode; - RpoInSeconds = rpoInSeconds; - ResyncRequired = resyncRequired; - ResyncProgressPercentage = resyncProgressPercentage; - ResyncDurationInSeconds = resyncDurationInSeconds; - DiskCapacityInBytes = diskCapacityInBytes; - FileSystemCapacityInBytes = fileSystemCapacityInBytes; - SourceDataInMegaBytes = sourceDataInMegaBytes; - PsDataInMegaBytes = psDataInMegaBytes; - TargetDataInMegaBytes = targetDataInMegaBytes; - DiskResized = diskResized; - LastRpoCalculatedTime = lastRpoCalculatedTime; - ResyncProcessedBytes = resyncProcessedBytes; - ResyncTotalTransferredBytes = resyncTotalTransferredBytes; - ResyncLast15MinutesTransferredBytes = resyncLast15MinutesTransferredBytes; - ResyncLastDataTransferTimeUTC = resyncLastDataTransferTimeUTC; - ResyncStartTime = resyncStartTime; - ProgressHealth = progressHealth; - ProgressStatus = progressStatus; - SecondsToTakeSwitchProvider = secondsToTakeSwitchProvider; + this.DiskId = diskId; + this.DiskName = diskName; + this.ProtectionStage = protectionStage; + this.HealthErrorCode = healthErrorCode; + this.RpoInSeconds = rpoInSeconds; + this.ResyncRequired = resyncRequired; + this.ResyncProgressPercentage = resyncProgressPercentage; + this.ResyncDurationInSeconds = resyncDurationInSeconds; + this.DiskCapacityInBytes = diskCapacityInBytes; + this.FileSystemCapacityInBytes = fileSystemCapacityInBytes; + this.SourceDataInMegaBytes = sourceDataInMegaBytes; + this.PsDataInMegaBytes = psDataInMegaBytes; + this.TargetDataInMegaBytes = targetDataInMegaBytes; + this.DiskResized = diskResized; + this.LastRpoCalculatedTime = lastRpoCalculatedTime; + this.ResyncProcessedBytes = resyncProcessedBytes; + this.ResyncTotalTransferredBytes = resyncTotalTransferredBytes; + this.ResyncLast15MinutesTransferredBytes = resyncLast15MinutesTransferredBytes; + this.ResyncLastDataTransferTimeUtc = resyncLastDataTransferTimeUtc; + this.ResyncStartTime = resyncStartTime; + this.ProgressHealth = progressHealth; + this.ProgressStatus = progressStatus; + this.SecondsToTakeSwitchProvider = secondsToTakeSwitchProvider; CustomInit(); } @@ -102,144 +126,143 @@ public InMageAzureV2ProtectedDiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the disk name. /// - [JsonProperty(PropertyName = "diskName")] - public string DiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskName")] + public string DiskName {get; set; } /// /// Gets or sets the protection stage. /// - [JsonProperty(PropertyName = "protectionStage")] - public string ProtectionStage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStage")] + public string ProtectionStage {get; set; } /// /// Gets or sets the health error code for the disk. /// - [JsonProperty(PropertyName = "healthErrorCode")] - public string HealthErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrorCode")] + public string HealthErrorCode {get; set; } /// /// Gets or sets the RPO in seconds. /// - [JsonProperty(PropertyName = "rpoInSeconds")] - public long? RpoInSeconds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds {get; set; } /// - /// Gets or sets a value indicating whether resync is required for this - /// disk. + /// Gets or sets a value indicating whether resync is required for this disk. /// - [JsonProperty(PropertyName = "resyncRequired")] - public string ResyncRequired { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncRequired")] + public string ResyncRequired {get; set; } /// /// Gets or sets the resync progress percentage. /// - [JsonProperty(PropertyName = "resyncProgressPercentage")] - public int? ResyncProgressPercentage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage {get; set; } /// /// Gets or sets the resync duration in seconds. /// - [JsonProperty(PropertyName = "resyncDurationInSeconds")] - public long? ResyncDurationInSeconds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncDurationInSeconds")] + public long? ResyncDurationInSeconds {get; set; } /// /// Gets or sets the disk capacity in bytes. /// - [JsonProperty(PropertyName = "diskCapacityInBytes")] - public long? DiskCapacityInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskCapacityInBytes")] + public long? DiskCapacityInBytes {get; set; } /// /// Gets or sets the disk file system capacity in bytes. /// - [JsonProperty(PropertyName = "fileSystemCapacityInBytes")] - public long? FileSystemCapacityInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fileSystemCapacityInBytes")] + public long? FileSystemCapacityInBytes {get; set; } /// /// Gets or sets the source data transit in MB. /// - [JsonProperty(PropertyName = "sourceDataInMegaBytes")] - public double? SourceDataInMegaBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceDataInMegaBytes")] + public double? SourceDataInMegaBytes {get; set; } /// /// Gets or sets the PS data transit in MB. /// - [JsonProperty(PropertyName = "psDataInMegaBytes")] - public double? PsDataInMegaBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "psDataInMegaBytes")] + public double? PsDataInMegaBytes {get; set; } /// /// Gets or sets the target data transit in MB. /// - [JsonProperty(PropertyName = "targetDataInMegaBytes")] - public double? TargetDataInMegaBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDataInMegaBytes")] + public double? TargetDataInMegaBytes {get; set; } /// /// Gets or sets a value indicating whether disk is resized. /// - [JsonProperty(PropertyName = "diskResized")] - public string DiskResized { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskResized")] + public string DiskResized {get; set; } /// /// Gets or sets the last RPO calculated time. /// - [JsonProperty(PropertyName = "lastRpoCalculatedTime")] - public System.DateTime? LastRpoCalculatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRpoCalculatedTime")] + public System.DateTime? LastRpoCalculatedTime {get; set; } /// /// Gets or sets the resync processed bytes. /// - [JsonProperty(PropertyName = "resyncProcessedBytes")] - public long? ResyncProcessedBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProcessedBytes")] + public long? ResyncProcessedBytes {get; set; } /// /// Gets or sets the resync total transferred bytes. /// - [JsonProperty(PropertyName = "resyncTotalTransferredBytes")] - public long? ResyncTotalTransferredBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncTotalTransferredBytes")] + public long? ResyncTotalTransferredBytes {get; set; } /// /// Gets or sets the resync last 15 minutes transferred bytes. /// - [JsonProperty(PropertyName = "resyncLast15MinutesTransferredBytes")] - public long? ResyncLast15MinutesTransferredBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncLast15MinutesTransferredBytes")] + public long? ResyncLast15MinutesTransferredBytes {get; set; } /// /// Gets or sets the last data transfer time in UTC. /// - [JsonProperty(PropertyName = "resyncLastDataTransferTimeUTC")] - public System.DateTime? ResyncLastDataTransferTimeUTC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncLastDataTransferTimeUTC")] + public System.DateTime? ResyncLastDataTransferTimeUtc {get; set; } /// /// Gets or sets the resync start time. /// - [JsonProperty(PropertyName = "resyncStartTime")] - public System.DateTime? ResyncStartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncStartTime")] + public System.DateTime? ResyncStartTime {get; set; } /// /// Gets or sets the Progress Health. /// - [JsonProperty(PropertyName = "progressHealth")] - public string ProgressHealth { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "progressHealth")] + public string ProgressHealth {get; set; } /// /// Gets or sets the Progress Status. /// - [JsonProperty(PropertyName = "progressStatus")] - public string ProgressStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "progressStatus")] + public string ProgressStatus {get; set; } /// /// Gets or sets the seconds to take for switch provider. /// - [JsonProperty(PropertyName = "secondsToTakeSwitchProvider")] - public long? SecondsToTakeSwitchProvider { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "secondsToTakeSwitchProvider")] + public long? SecondsToTakeSwitchProvider {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2RecoveryPointDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2RecoveryPointDetails.cs index def1f2bd7fe5..448ce94067bd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2RecoveryPointDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2RecoveryPointDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2RecoveryPointDetails : ProviderSpecificRecoveryPointDetails { /// - /// Initializes a new instance of the InMageAzureV2RecoveryPointDetails - /// class. + /// Initializes a new instance of the InMageAzureV2RecoveryPointDetails class. /// public InMageAzureV2RecoveryPointDetails() { @@ -29,14 +22,15 @@ public InMageAzureV2RecoveryPointDetails() } /// - /// Initializes a new instance of the InMageAzureV2RecoveryPointDetails - /// class. + /// Initializes a new instance of the InMageAzureV2RecoveryPointDetails class. /// - /// A value indicating whether the - /// recovery point is multi VM consistent. - public InMageAzureV2RecoveryPointDetails(string isMultiVmSyncPoint = default(string)) + + /// A value indicating whether the recovery point is multi VM consistent. + /// + public InMageAzureV2RecoveryPointDetails(string isMultiVMSyncPoint = default(string)) + { - IsMultiVmSyncPoint = isMultiVmSyncPoint; + this.IsMultiVMSyncPoint = isMultiVMSyncPoint; CustomInit(); } @@ -45,12 +39,12 @@ public InMageAzureV2RecoveryPointDetails() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether the recovery point is multi - /// VM consistent. + /// Gets or sets a value indicating whether the recovery point is multi VM + /// consistent. /// - [JsonProperty(PropertyName = "isMultiVmSyncPoint")] - public string IsMultiVmSyncPoint { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isMultiVmSyncPoint")] + public string IsMultiVMSyncPoint {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ReplicationDetails.cs index 405a696125ef..29455f8d80e0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ReplicationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2ReplicationDetails : ReplicationProviderSpecificSettings { /// - /// Initializes a new instance of the InMageAzureV2ReplicationDetails - /// class. + /// Initializes a new instance of the InMageAzureV2ReplicationDetails class. /// public InMageAzureV2ReplicationDetails() { @@ -31,196 +22,289 @@ public InMageAzureV2ReplicationDetails() } /// - /// Initializes a new instance of the InMageAzureV2ReplicationDetails - /// class. - /// - /// The infrastructure VM Id. - /// The vCenter infrastructure - /// Id. - /// The protection stage. - /// The virtual machine Id. - /// The protection state for the - /// vm. - /// The protection state - /// description for the vm. - /// The resync progress - /// percentage. - /// The RPO in seconds. - /// The compressed data change - /// rate in MB. - /// The uncompressed data change - /// rate in MB. - /// The source IP address. - /// The agent version. - /// Agent expiry date. - /// A value indicating whether - /// installed agent needs to be updated. - /// A value indicating - /// whether the source server requires a restart after update. - /// The last heartbeat received from the - /// source server. - /// The process server Id. - /// The process server name. - /// The multi vm group Id. - /// The multi vm group name. - /// A value indicating whether multi vm - /// sync is enabled or disabled. - /// The list of protected disks. - /// A value indicating whether any disk is - /// resized for this VM. - /// The master target Id. - /// The CPU count of the VM on the - /// primary side. - /// The RAM size of the VM on the - /// primary side. - /// The type of the OS on the VM. - /// The OS disk VHD name. - /// The id of the disk containing the - /// OS. - /// Azure VM Disk details. - /// Recovery Azure given - /// name. - /// The Recovery Azure VM - /// size. - /// The recovery Azure - /// storage account. - /// The ARM id of the - /// log storage account used for replication. This will be set to null - /// if no log storage account was provided during enable - /// protection. - /// The PE Network details. - /// The selected recovery - /// azure network Id. - /// The test failover virtual - /// network. - /// The selected source nic Id which - /// will be used as the primary nic during failover. - /// A value indicating the discovery type - /// of the machine. Value can be vCenter or physical. - /// The selected option to enable - /// RDP\SSH on target vm after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. - /// The datastores of the on-premise machine. - /// Value can be list of strings that contain datastore names. - /// The ARM Id of the target Azure VM. This - /// value will be null until the VM is failed over. Only after failure - /// it will be populated with the ARM Id of the Azure VM. - /// The target resource - /// group Id. - /// The recovery availability - /// set Id. - /// The target availability - /// zone. - /// The target proximity - /// placement group Id. - /// A value indicating whether managed - /// disks should be used during failover. - /// License Type of the VM to be - /// used. - /// The SQL Server license - /// type. - /// The validation errors of the - /// on-premise machine Value can be list of validation errors. - /// The last RPO calculated - /// time. - /// The last update time received - /// from on-prem components. - /// The replica id of the protected - /// item. - /// The OS Version of the protected - /// item. - /// The list of protected managed - /// disks. - /// The last recovery point - /// received time. - /// The firmware type of this protected - /// item. - /// The target generation for this - /// protected item. - /// A value indicating whether - /// additional IR stats are available or not. - /// The total transferred data in - /// bytes. - /// The progress health. - /// The target VM tags. - /// The tags for the seed managed - /// disks. - /// The tags for the target managed - /// disks. - /// The tags for the target NICs. - /// The switch - /// provider blocking error information. - /// The switch provider blocking - /// error information. - public InMageAzureV2ReplicationDetails(string infrastructureVmId = default(string), string vCenterInfrastructureId = default(string), string protectionStage = default(string), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), int? resyncProgressPercentage = default(int?), long? rpoInSeconds = default(long?), double? compressedDataRateInMB = default(double?), double? uncompressedDataRateInMB = default(double?), string ipAddress = default(string), string agentVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), string isAgentUpdateRequired = default(string), string isRebootAfterUpdateRequired = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string processServerId = default(string), string processServerName = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), string multiVmSyncStatus = default(string), IList protectedDisks = default(IList), string diskResized = default(string), string masterTargetId = default(string), int? sourceVmCpuCount = default(int?), int? sourceVmRamSizeInMB = default(int?), string osType = default(string), string vhdName = default(string), string osDiskId = default(string), IList azureVMDiskDetails = default(IList), string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureStorageAccount = default(string), string recoveryAzureLogStorageAccountId = default(string), IList vmNics = default(IList), string selectedRecoveryAzureNetworkId = default(string), string selectedTfoAzureNetworkId = default(string), string selectedSourceNicId = default(string), string discoveryType = default(string), string enableRdpOnTargetOption = default(string), IList datastores = default(IList), string targetVmId = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string useManagedDisks = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), IList validationErrors = default(IList), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), System.DateTime? lastUpdateReceivedTime = default(System.DateTime?), string replicaId = default(string), string osVersion = default(string), IList protectedManagedDisks = default(IList), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?), string firmwareType = default(string), string azureVmGeneration = default(string), bool? isAdditionalStatsAvailable = default(bool?), long? totalDataTransferred = default(long?), string totalProgressHealth = default(string), IDictionary targetVmTags = default(IDictionary), IDictionary seedManagedDiskTags = default(IDictionary), IDictionary targetManagedDiskTags = default(IDictionary), IDictionary targetNicTags = default(IDictionary), IList switchProviderBlockingErrorDetails = default(IList), InMageAzureV2SwitchProviderDetails switchProviderDetails = default(InMageAzureV2SwitchProviderDetails)) + /// Initializes a new instance of the InMageAzureV2ReplicationDetails class. + /// + + /// The infrastructure VM Id. + /// + + /// The vCenter infrastructure Id. + /// + + /// The protection stage. + /// + + /// The virtual machine Id. + /// + + /// The protection state for the vm. + /// + + /// The protection state description for the vm. + /// + + /// The resync progress percentage. + /// + + /// The RPO in seconds. + /// + + /// The compressed data change rate in MB. + /// + + /// The uncompressed data change rate in MB. + /// + + /// The source IP address. + /// + + /// The agent version. + /// + + /// Agent expiry date. + /// + + /// A value indicating whether installed agent needs to be updated. + /// + + /// A value indicating whether the source server requires a restart after + /// update. + /// + + /// The last heartbeat received from the source server. + /// + + /// The process server Id. + /// + + /// The process server name. + /// + + /// The multi vm group Id. + /// + + /// The multi vm group name. + /// + + /// A value indicating whether multi vm sync is enabled or disabled. + /// + + /// The list of protected disks. + /// + + /// A value indicating whether any disk is resized for this VM. + /// + + /// The master target Id. + /// + + /// The CPU count of the VM on the primary side. + /// + + /// The RAM size of the VM on the primary side. + /// + + /// The type of the OS on the VM. + /// + + /// The OS disk VHD name. + /// + + /// The id of the disk containing the OS. + /// + + /// Azure VM Disk details. + /// + + /// Recovery Azure given name. + /// + + /// The Recovery Azure VM size. + /// + + /// The recovery Azure storage account. + /// + + /// The ARM id of the log storage account used for replication. This will be + /// set to null if no log storage account was provided during enable + /// protection. + /// + + /// The PE Network details. + /// + + /// The selected recovery azure network Id. + /// + + /// The test failover virtual network. + /// + + /// The selected source nic Id which will be used as the primary nic during + /// failover. + /// + + /// A value indicating the discovery type of the machine. Value can be vCenter + /// or physical. + /// + + /// The selected option to enable RDP\SSH on target vm after failover. String + /// value of SrsDataContract.EnableRDPOnTargetOption enum. + /// + + /// The datastores of the on-premise machine. Value can be list of strings that + /// contain datastore names. + /// + + /// The ARM Id of the target Azure VM. This value will be null until the VM is + /// failed over. Only after failure it will be populated with the ARM Id of the + /// Azure VM. + /// + + /// The target resource group Id. + /// + + /// The recovery availability set Id. + /// + + /// The target availability zone. + /// + + /// The target proximity placement group Id. + /// + + /// A value indicating whether managed disks should be used during failover. + /// + + /// License Type of the VM to be used. + /// + + /// The SQL Server license type. + /// + + /// The validation errors of the on-premise machine Value can be list of + /// validation errors. + /// + + /// The last RPO calculated time. + /// + + /// The last update time received from on-prem components. + /// + + /// The replica id of the protected item. + /// + + /// The OS Version of the protected item. + /// + + /// The list of protected managed disks. + /// + + /// The last recovery point received time. + /// + + /// The firmware type of this protected item. + /// + + /// The target generation for this protected item. + /// + + /// A value indicating whether additional IR stats are available or not. + /// + + /// The total transferred data in bytes. + /// + + /// The progress health. + /// + + /// The target VM tags. + /// + + /// The tags for the seed managed disks. + /// + + /// The tags for the target managed disks. + /// + + /// The tags for the target NICs. + /// + + /// The switch provider blocking error information. + /// + + /// The switch provider blocking error information. + /// + public InMageAzureV2ReplicationDetails(string infrastructureVMId = default(string), string vCenterInfrastructureId = default(string), string protectionStage = default(string), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), int? resyncProgressPercentage = default(int?), long? rpoInSeconds = default(long?), double? compressedDataRateInMb = default(double?), double? uncompressedDataRateInMb = default(double?), string ipAddress = default(string), string agentVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), string isAgentUpdateRequired = default(string), string isRebootAfterUpdateRequired = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string processServerId = default(string), string processServerName = default(string), string multiVMGroupId = default(string), string multiVMGroupName = default(string), string multiVMSyncStatus = default(string), System.Collections.Generic.IList protectedDisks = default(System.Collections.Generic.IList), string diskResized = default(string), string masterTargetId = default(string), int? sourceVMCpuCount = default(int?), int? sourceVMRamSizeInMb = default(int?), string osType = default(string), string vhdName = default(string), string osDiskId = default(string), System.Collections.Generic.IList azureVMDiskDetails = default(System.Collections.Generic.IList), string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureStorageAccount = default(string), string recoveryAzureLogStorageAccountId = default(string), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), string selectedRecoveryAzureNetworkId = default(string), string selectedTfoAzureNetworkId = default(string), string selectedSourceNicId = default(string), string discoveryType = default(string), string enableRdpOnTargetOption = default(string), System.Collections.Generic.IList datastores = default(System.Collections.Generic.IList), string targetVMId = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string useManagedDisks = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), System.Collections.Generic.IList validationErrors = default(System.Collections.Generic.IList), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), System.DateTime? lastUpdateReceivedTime = default(System.DateTime?), string replicaId = default(string), string osVersion = default(string), System.Collections.Generic.IList protectedManagedDisks = default(System.Collections.Generic.IList), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?), string firmwareType = default(string), string azureVMGeneration = default(string), bool? isAdditionalStatsAvailable = default(bool?), long? totalDataTransferred = default(long?), string totalProgressHealth = default(string), System.Collections.Generic.IDictionary targetVMTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary seedManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetNicTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList switchProviderBlockingErrorDetails = default(System.Collections.Generic.IList), InMageAzureV2SwitchProviderDetails switchProviderDetails = default(InMageAzureV2SwitchProviderDetails)) + { - InfrastructureVmId = infrastructureVmId; - VCenterInfrastructureId = vCenterInfrastructureId; - ProtectionStage = protectionStage; - VmId = vmId; - VmProtectionState = vmProtectionState; - VmProtectionStateDescription = vmProtectionStateDescription; - ResyncProgressPercentage = resyncProgressPercentage; - RpoInSeconds = rpoInSeconds; - CompressedDataRateInMB = compressedDataRateInMB; - UncompressedDataRateInMB = uncompressedDataRateInMB; - IpAddress = ipAddress; - AgentVersion = agentVersion; - AgentExpiryDate = agentExpiryDate; - IsAgentUpdateRequired = isAgentUpdateRequired; - IsRebootAfterUpdateRequired = isRebootAfterUpdateRequired; - LastHeartbeat = lastHeartbeat; - ProcessServerId = processServerId; - ProcessServerName = processServerName; - MultiVmGroupId = multiVmGroupId; - MultiVmGroupName = multiVmGroupName; - MultiVmSyncStatus = multiVmSyncStatus; - ProtectedDisks = protectedDisks; - DiskResized = diskResized; - MasterTargetId = masterTargetId; - SourceVmCpuCount = sourceVmCpuCount; - SourceVmRamSizeInMB = sourceVmRamSizeInMB; - OsType = osType; - VhdName = vhdName; - OsDiskId = osDiskId; - AzureVMDiskDetails = azureVMDiskDetails; - RecoveryAzureVMName = recoveryAzureVMName; - RecoveryAzureVMSize = recoveryAzureVMSize; - RecoveryAzureStorageAccount = recoveryAzureStorageAccount; - RecoveryAzureLogStorageAccountId = recoveryAzureLogStorageAccountId; - VmNics = vmNics; - SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; - SelectedTfoAzureNetworkId = selectedTfoAzureNetworkId; - SelectedSourceNicId = selectedSourceNicId; - DiscoveryType = discoveryType; - EnableRdpOnTargetOption = enableRdpOnTargetOption; - Datastores = datastores; - TargetVmId = targetVmId; - RecoveryAzureResourceGroupId = recoveryAzureResourceGroupId; - RecoveryAvailabilitySetId = recoveryAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - UseManagedDisks = useManagedDisks; - LicenseType = licenseType; - SqlServerLicenseType = sqlServerLicenseType; - ValidationErrors = validationErrors; - LastRpoCalculatedTime = lastRpoCalculatedTime; - LastUpdateReceivedTime = lastUpdateReceivedTime; - ReplicaId = replicaId; - OsVersion = osVersion; - ProtectedManagedDisks = protectedManagedDisks; - LastRecoveryPointReceived = lastRecoveryPointReceived; - FirmwareType = firmwareType; - AzureVmGeneration = azureVmGeneration; - IsAdditionalStatsAvailable = isAdditionalStatsAvailable; - TotalDataTransferred = totalDataTransferred; - TotalProgressHealth = totalProgressHealth; - TargetVmTags = targetVmTags; - SeedManagedDiskTags = seedManagedDiskTags; - TargetManagedDiskTags = targetManagedDiskTags; - TargetNicTags = targetNicTags; - SwitchProviderBlockingErrorDetails = switchProviderBlockingErrorDetails; - SwitchProviderDetails = switchProviderDetails; + this.InfrastructureVMId = infrastructureVMId; + this.VCenterInfrastructureId = vCenterInfrastructureId; + this.ProtectionStage = protectionStage; + this.VMId = vmId; + this.VMProtectionState = vmProtectionState; + this.VMProtectionStateDescription = vmProtectionStateDescription; + this.ResyncProgressPercentage = resyncProgressPercentage; + this.RpoInSeconds = rpoInSeconds; + this.CompressedDataRateInMb = compressedDataRateInMb; + this.UncompressedDataRateInMb = uncompressedDataRateInMb; + this.IPAddress = ipAddress; + this.AgentVersion = agentVersion; + this.AgentExpiryDate = agentExpiryDate; + this.IsAgentUpdateRequired = isAgentUpdateRequired; + this.IsRebootAfterUpdateRequired = isRebootAfterUpdateRequired; + this.LastHeartbeat = lastHeartbeat; + this.ProcessServerId = processServerId; + this.ProcessServerName = processServerName; + this.MultiVMGroupId = multiVMGroupId; + this.MultiVMGroupName = multiVMGroupName; + this.MultiVMSyncStatus = multiVMSyncStatus; + this.ProtectedDisks = protectedDisks; + this.DiskResized = diskResized; + this.MasterTargetId = masterTargetId; + this.SourceVMCpuCount = sourceVMCpuCount; + this.SourceVMRamSizeInMb = sourceVMRamSizeInMb; + this.OSType = osType; + this.VhdName = vhdName; + this.OSDiskId = osDiskId; + this.AzureVMDiskDetails = azureVMDiskDetails; + this.RecoveryAzureVMName = recoveryAzureVMName; + this.RecoveryAzureVMSize = recoveryAzureVMSize; + this.RecoveryAzureStorageAccount = recoveryAzureStorageAccount; + this.RecoveryAzureLogStorageAccountId = recoveryAzureLogStorageAccountId; + this.VMNics = vmNics; + this.SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + this.SelectedTfoAzureNetworkId = selectedTfoAzureNetworkId; + this.SelectedSourceNicId = selectedSourceNicId; + this.DiscoveryType = discoveryType; + this.EnableRdpOnTargetOption = enableRdpOnTargetOption; + this.Datastores = datastores; + this.TargetVMId = targetVMId; + this.RecoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + this.RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.UseManagedDisks = useManagedDisks; + this.LicenseType = licenseType; + this.SqlServerLicenseType = sqlServerLicenseType; + this.ValidationErrors = validationErrors; + this.LastRpoCalculatedTime = lastRpoCalculatedTime; + this.LastUpdateReceivedTime = lastUpdateReceivedTime; + this.ReplicaId = replicaId; + this.OSVersion = osVersion; + this.ProtectedManagedDisks = protectedManagedDisks; + this.LastRecoveryPointReceived = lastRecoveryPointReceived; + this.FirmwareType = firmwareType; + this.AzureVMGeneration = azureVMGeneration; + this.IsAdditionalStatsAvailable = isAdditionalStatsAvailable; + this.TotalDataTransferred = totalDataTransferred; + this.TotalProgressHealth = totalProgressHealth; + this.TargetVMTags = targetVMTags; + this.SeedManagedDiskTags = seedManagedDiskTags; + this.TargetManagedDiskTags = targetManagedDiskTags; + this.TargetNicTags = targetNicTags; + this.SwitchProviderBlockingErrorDetails = switchProviderBlockingErrorDetails; + this.SwitchProviderDetails = switchProviderDetails; CustomInit(); } @@ -229,423 +313,421 @@ public InMageAzureV2ReplicationDetails() /// partial void CustomInit(); + /// /// Gets or sets the infrastructure VM Id. /// - [JsonProperty(PropertyName = "infrastructureVmId")] - public string InfrastructureVmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "infrastructureVmId")] + public string InfrastructureVMId {get; set; } /// /// Gets or sets the vCenter infrastructure Id. /// - [JsonProperty(PropertyName = "vCenterInfrastructureId")] - public string VCenterInfrastructureId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vCenterInfrastructureId")] + public string VCenterInfrastructureId {get; set; } /// /// Gets or sets the protection stage. /// - [JsonProperty(PropertyName = "protectionStage")] - public string ProtectionStage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStage")] + public string ProtectionStage {get; set; } /// /// Gets or sets the virtual machine Id. /// - [JsonProperty(PropertyName = "vmId")] - public string VmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmId")] + public string VMId {get; set; } /// /// Gets or sets the protection state for the vm. /// - [JsonProperty(PropertyName = "vmProtectionState")] - public string VmProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionState")] + public string VMProtectionState {get; set; } /// /// Gets or sets the protection state description for the vm. /// - [JsonProperty(PropertyName = "vmProtectionStateDescription")] - public string VmProtectionStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VMProtectionStateDescription {get; set; } /// /// Gets or sets the resync progress percentage. /// - [JsonProperty(PropertyName = "resyncProgressPercentage")] - public int? ResyncProgressPercentage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage {get; set; } /// /// Gets or sets the RPO in seconds. /// - [JsonProperty(PropertyName = "rpoInSeconds")] - public long? RpoInSeconds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds {get; set; } /// /// Gets or sets the compressed data change rate in MB. /// - [JsonProperty(PropertyName = "compressedDataRateInMB")] - public double? CompressedDataRateInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "compressedDataRateInMB")] + public double? CompressedDataRateInMb {get; set; } /// /// Gets or sets the uncompressed data change rate in MB. /// - [JsonProperty(PropertyName = "uncompressedDataRateInMB")] - public double? UncompressedDataRateInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "uncompressedDataRateInMB")] + public double? UncompressedDataRateInMb {get; set; } /// /// Gets or sets the source IP address. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the agent version. /// - [JsonProperty(PropertyName = "agentVersion")] - public string AgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion {get; set; } /// /// Gets or sets agent expiry date. /// - [JsonProperty(PropertyName = "agentExpiryDate")] - public System.DateTime? AgentExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentExpiryDate")] + public System.DateTime? AgentExpiryDate {get; set; } /// /// Gets or sets a value indicating whether installed agent needs to be /// updated. /// - [JsonProperty(PropertyName = "isAgentUpdateRequired")] - public string IsAgentUpdateRequired { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isAgentUpdateRequired")] + public string IsAgentUpdateRequired {get; set; } /// - /// Gets or sets a value indicating whether the source server requires - /// a restart after update. + /// Gets or sets a value indicating whether the source server requires a + /// restart after update. /// - [JsonProperty(PropertyName = "isRebootAfterUpdateRequired")] - public string IsRebootAfterUpdateRequired { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isRebootAfterUpdateRequired")] + public string IsRebootAfterUpdateRequired {get; set; } /// /// Gets or sets the last heartbeat received from the source server. /// - [JsonProperty(PropertyName = "lastHeartbeat")] - public System.DateTime? LastHeartbeat { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat {get; set; } /// /// Gets or sets the process server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the process server name. /// - [JsonProperty(PropertyName = "processServerName")] - public string ProcessServerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerName")] + public string ProcessServerName {get; set; } /// /// Gets or sets the multi vm group Id. /// - [JsonProperty(PropertyName = "multiVmGroupId")] - public string MultiVmGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVMGroupId {get; set; } /// /// Gets or sets the multi vm group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; set; } /// /// Gets or sets a value indicating whether multi vm sync is enabled or /// disabled. /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } /// /// Gets or sets the list of protected disks. /// - [JsonProperty(PropertyName = "protectedDisks")] - public IList ProtectedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedDisks")] + public System.Collections.Generic.IList ProtectedDisks {get; set; } /// - /// Gets or sets a value indicating whether any disk is resized for - /// this VM. + /// Gets or sets a value indicating whether any disk is resized for this VM. /// - [JsonProperty(PropertyName = "diskResized")] - public string DiskResized { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskResized")] + public string DiskResized {get; set; } /// /// Gets or sets the master target Id. /// - [JsonProperty(PropertyName = "masterTargetId")] - public string MasterTargetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId {get; set; } /// /// Gets or sets the CPU count of the VM on the primary side. /// - [JsonProperty(PropertyName = "sourceVmCpuCount")] - public int? SourceVmCpuCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceVmCpuCount")] + public int? SourceVMCpuCount {get; set; } /// /// Gets or sets the RAM size of the VM on the primary side. /// - [JsonProperty(PropertyName = "sourceVmRamSizeInMB")] - public int? SourceVmRamSizeInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceVmRamSizeInMB")] + public int? SourceVMRamSizeInMb {get; set; } /// /// Gets or sets the type of the OS on the VM. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the OS disk VHD name. /// - [JsonProperty(PropertyName = "vhdName")] - public string VhdName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vhdName")] + public string VhdName {get; set; } /// /// Gets or sets the id of the disk containing the OS. /// - [JsonProperty(PropertyName = "osDiskId")] - public string OsDiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osDiskId")] + public string OSDiskId {get; set; } /// /// Gets or sets azure VM Disk details. /// - [JsonProperty(PropertyName = "azureVMDiskDetails")] - public IList AzureVMDiskDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureVMDiskDetails")] + public System.Collections.Generic.IList AzureVMDiskDetails {get; set; } /// /// Gets or sets recovery Azure given name. /// - [JsonProperty(PropertyName = "recoveryAzureVMName")] - public string RecoveryAzureVMName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureVMName")] + public string RecoveryAzureVMName {get; set; } /// /// Gets or sets the Recovery Azure VM size. /// - [JsonProperty(PropertyName = "recoveryAzureVMSize")] - public string RecoveryAzureVMSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureVMSize")] + public string RecoveryAzureVMSize {get; set; } /// /// Gets or sets the recovery Azure storage account. /// - [JsonProperty(PropertyName = "recoveryAzureStorageAccount")] - public string RecoveryAzureStorageAccount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureStorageAccount")] + public string RecoveryAzureStorageAccount {get; set; } /// - /// Gets or sets the ARM id of the log storage account used for - /// replication. This will be set to null if no log storage account was - /// provided during enable protection. + /// Gets or sets the ARM id of the log storage account used for replication. + /// This will be set to null if no log storage account was provided during + /// enable protection. /// - [JsonProperty(PropertyName = "recoveryAzureLogStorageAccountId")] - public string RecoveryAzureLogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureLogStorageAccountId")] + public string RecoveryAzureLogStorageAccountId {get; set; } /// /// Gets or sets the PE Network details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets the selected recovery azure network Id. /// - [JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] - public string SelectedRecoveryAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] + public string SelectedRecoveryAzureNetworkId {get; set; } /// /// Gets or sets the test failover virtual network. /// - [JsonProperty(PropertyName = "selectedTfoAzureNetworkId")] - public string SelectedTfoAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedTfoAzureNetworkId")] + public string SelectedTfoAzureNetworkId {get; set; } /// - /// Gets or sets the selected source nic Id which will be used as the - /// primary nic during failover. + /// Gets or sets the selected source nic Id which will be used as the primary + /// nic during failover. /// - [JsonProperty(PropertyName = "selectedSourceNicId")] - public string SelectedSourceNicId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedSourceNicId")] + public string SelectedSourceNicId {get; set; } /// - /// Gets or sets a value indicating the discovery type of the machine. - /// Value can be vCenter or physical. + /// Gets or sets a value indicating the discovery type of the machine. Value + /// can be vCenter or physical. /// - [JsonProperty(PropertyName = "discoveryType")] - public string DiscoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "discoveryType")] + public string DiscoveryType {get; set; } /// - /// Gets or sets the selected option to enable RDP\SSH on target vm - /// after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. + /// Gets or sets the selected option to enable RDP\SSH on target vm after + /// failover. String value of SrsDataContract.EnableRDPOnTargetOption enum. /// - [JsonProperty(PropertyName = "enableRdpOnTargetOption")] - public string EnableRdpOnTargetOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableRdpOnTargetOption")] + public string EnableRdpOnTargetOption {get; set; } /// - /// Gets or sets the datastores of the on-premise machine. Value can be - /// list of strings that contain datastore names. + /// Gets or sets the datastores of the on-premise machine. Value can be list of + /// strings that contain datastore names. /// - [JsonProperty(PropertyName = "datastores")] - public IList Datastores { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datastores")] + public System.Collections.Generic.IList Datastores {get; set; } /// - /// Gets or sets the ARM Id of the target Azure VM. This value will be - /// null until the VM is failed over. Only after failure it will be - /// populated with the ARM Id of the Azure VM. + /// Gets or sets the ARM Id of the target Azure VM. This value will be null + /// until the VM is failed over. Only after failure it will be populated with + /// the ARM Id of the Azure VM. /// - [JsonProperty(PropertyName = "targetVmId")] - public string TargetVmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmId")] + public string TargetVMId {get; set; } /// /// Gets or sets the target resource group Id. /// - [JsonProperty(PropertyName = "recoveryAzureResourceGroupId")] - public string RecoveryAzureResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureResourceGroupId")] + public string RecoveryAzureResourceGroupId {get; set; } /// /// Gets or sets the recovery availability set Id. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] - public string RecoveryAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target proximity placement group Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// - /// Gets or sets a value indicating whether managed disks should be - /// used during failover. + /// Gets or sets a value indicating whether managed disks should be used during + /// failover. /// - [JsonProperty(PropertyName = "useManagedDisks")] - public string UseManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks {get; set; } /// /// Gets or sets license Type of the VM to be used. /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// /// Gets or sets the SQL Server license type. /// - [JsonProperty(PropertyName = "sqlServerLicenseType")] - public string SqlServerLicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerLicenseType")] + public string SqlServerLicenseType {get; set; } /// - /// Gets or sets the validation errors of the on-premise machine Value - /// can be list of validation errors. + /// Gets or sets the validation errors of the on-premise machine Value can be + /// list of validation errors. /// - [JsonProperty(PropertyName = "validationErrors")] - public IList ValidationErrors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "validationErrors")] + public System.Collections.Generic.IList ValidationErrors {get; set; } /// /// Gets or sets the last RPO calculated time. /// - [JsonProperty(PropertyName = "lastRpoCalculatedTime")] - public System.DateTime? LastRpoCalculatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRpoCalculatedTime")] + public System.DateTime? LastRpoCalculatedTime {get; set; } /// /// Gets or sets the last update time received from on-prem components. /// - [JsonProperty(PropertyName = "lastUpdateReceivedTime")] - public System.DateTime? LastUpdateReceivedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUpdateReceivedTime")] + public System.DateTime? LastUpdateReceivedTime {get; set; } /// /// Gets or sets the replica id of the protected item. /// - [JsonProperty(PropertyName = "replicaId")] - public string ReplicaId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaId")] + public string ReplicaId {get; set; } /// /// Gets or sets the OS Version of the protected item. /// - [JsonProperty(PropertyName = "osVersion")] - public string OsVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osVersion")] + public string OSVersion {get; set; } /// /// Gets or sets the list of protected managed disks. /// - [JsonProperty(PropertyName = "protectedManagedDisks")] - public IList ProtectedManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedManagedDisks")] + public System.Collections.Generic.IList ProtectedManagedDisks {get; set; } /// /// Gets the last recovery point received time. /// - [JsonProperty(PropertyName = "lastRecoveryPointReceived")] - public System.DateTime? LastRecoveryPointReceived { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRecoveryPointReceived")] + public System.DateTime? LastRecoveryPointReceived {get; private set; } /// /// Gets or sets the firmware type of this protected item. /// - [JsonProperty(PropertyName = "firmwareType")] - public string FirmwareType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "firmwareType")] + public string FirmwareType {get; set; } /// /// Gets or sets the target generation for this protected item. /// - [JsonProperty(PropertyName = "azureVmGeneration")] - public string AzureVmGeneration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureVmGeneration")] + public string AzureVMGeneration {get; set; } /// - /// Gets or sets a value indicating whether additional IR stats are - /// available or not. + /// Gets or sets a value indicating whether additional IR stats are available + /// or not. /// - [JsonProperty(PropertyName = "isAdditionalStatsAvailable")] - public bool? IsAdditionalStatsAvailable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isAdditionalStatsAvailable")] + public bool? IsAdditionalStatsAvailable {get; set; } /// /// Gets or sets the total transferred data in bytes. /// - [JsonProperty(PropertyName = "totalDataTransferred")] - public long? TotalDataTransferred { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "totalDataTransferred")] + public long? TotalDataTransferred {get; set; } /// /// Gets or sets the progress health. /// - [JsonProperty(PropertyName = "totalProgressHealth")] - public string TotalProgressHealth { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "totalProgressHealth")] + public string TotalProgressHealth {get; set; } /// /// Gets or sets the target VM tags. /// - [JsonProperty(PropertyName = "targetVmTags")] - public IDictionary TargetVmTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmTags")] + public System.Collections.Generic.IDictionary TargetVMTags {get; set; } /// /// Gets or sets the tags for the seed managed disks. /// - [JsonProperty(PropertyName = "seedManagedDiskTags")] - public IDictionary SeedManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedManagedDiskTags")] + public System.Collections.Generic.IDictionary SeedManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target managed disks. /// - [JsonProperty(PropertyName = "targetManagedDiskTags")] - public IDictionary TargetManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetManagedDiskTags")] + public System.Collections.Generic.IDictionary TargetManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target NICs. /// - [JsonProperty(PropertyName = "targetNicTags")] - public IDictionary TargetNicTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicTags")] + public System.Collections.Generic.IDictionary TargetNicTags {get; set; } /// /// Gets or sets the switch provider blocking error information. /// - [JsonProperty(PropertyName = "switchProviderBlockingErrorDetails")] - public IList SwitchProviderBlockingErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "switchProviderBlockingErrorDetails")] + public System.Collections.Generic.IList SwitchProviderBlockingErrorDetails {get; set; } /// /// Gets or sets the switch provider blocking error information. /// - [JsonProperty(PropertyName = "switchProviderDetails")] - public InMageAzureV2SwitchProviderDetails SwitchProviderDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "switchProviderDetails")] + public InMageAzureV2SwitchProviderDetails SwitchProviderDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ReprotectInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ReprotectInput.cs index c7d06d806e05..5355e42d5665 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ReprotectInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2ReprotectInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2ReprotectInput : ReverseReplicationProviderSpecificInput { /// - /// Initializes a new instance of the InMageAzureV2ReprotectInput - /// class. + /// Initializes a new instance of the InMageAzureV2ReprotectInput class. /// public InMageAzureV2ReprotectInput() { @@ -31,26 +22,39 @@ public InMageAzureV2ReprotectInput() } /// - /// Initializes a new instance of the InMageAzureV2ReprotectInput - /// class. + /// Initializes a new instance of the InMageAzureV2ReprotectInput class. /// - /// The Master target Id. - /// The Process Server Id. - /// The storage account id. - /// The CS account Id. - /// The Policy Id. - /// The storage account to be used - /// for logging during replication. - /// The disks to include list. - public InMageAzureV2ReprotectInput(string masterTargetId = default(string), string processServerId = default(string), string storageAccountId = default(string), string runAsAccountId = default(string), string policyId = default(string), string logStorageAccountId = default(string), IList disksToInclude = default(IList)) + + /// The Master target Id. + /// + + /// The Process Server Id. + /// + + /// The storage account id. + /// + + /// The CS account Id. + /// + + /// The Policy Id. + /// + + /// The storage account to be used for logging during replication. + /// + + /// The disks to include list. + /// + public InMageAzureV2ReprotectInput(string masterTargetId = default(string), string processServerId = default(string), string storageAccountId = default(string), string runAsAccountId = default(string), string policyId = default(string), string logStorageAccountId = default(string), System.Collections.Generic.IList disksToInclude = default(System.Collections.Generic.IList)) + { - MasterTargetId = masterTargetId; - ProcessServerId = processServerId; - StorageAccountId = storageAccountId; - RunAsAccountId = runAsAccountId; - PolicyId = policyId; - LogStorageAccountId = logStorageAccountId; - DisksToInclude = disksToInclude; + this.MasterTargetId = masterTargetId; + this.ProcessServerId = processServerId; + this.StorageAccountId = storageAccountId; + this.RunAsAccountId = runAsAccountId; + this.PolicyId = policyId; + this.LogStorageAccountId = logStorageAccountId; + this.DisksToInclude = disksToInclude; CustomInit(); } @@ -59,48 +63,47 @@ public InMageAzureV2ReprotectInput() /// partial void CustomInit(); + /// /// Gets or sets the Master target Id. /// - [JsonProperty(PropertyName = "masterTargetId")] - public string MasterTargetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId {get; set; } /// /// Gets or sets the Process Server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the storage account id. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; set; } /// /// Gets or sets the CS account Id. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } /// /// Gets or sets the Policy Id. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// - /// Gets or sets the storage account to be used for logging during - /// replication. + /// Gets or sets the storage account to be used for logging during replication. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } /// /// Gets or sets the disks to include list. /// - [JsonProperty(PropertyName = "disksToInclude")] - public IList DisksToInclude { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "disksToInclude")] + public System.Collections.Generic.IList DisksToInclude {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderBlockingErrorDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderBlockingErrorDetails.cs index 2a866da7f074..881a26f403df 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderBlockingErrorDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderBlockingErrorDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2SwitchProviderBlockingErrorDetails { /// - /// Initializes a new instance of the - /// InMageAzureV2SwitchProviderBlockingErrorDetails class. + /// Initializes a new instance of the InMageAzureV2SwitchProviderBlockingErrorDetails class. /// public InMageAzureV2SwitchProviderBlockingErrorDetails() { @@ -30,24 +21,35 @@ public InMageAzureV2SwitchProviderBlockingErrorDetails() } /// - /// Initializes a new instance of the - /// InMageAzureV2SwitchProviderBlockingErrorDetails class. + /// Initializes a new instance of the InMageAzureV2SwitchProviderBlockingErrorDetails class. /// - /// The error code. - /// The error message. - /// The possible causes. - /// The recommended action. - /// The error message - /// parameters. - /// The error tags. - public InMageAzureV2SwitchProviderBlockingErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), IDictionary errorMessageParameters = default(IDictionary), IDictionary errorTags = default(IDictionary)) + + /// The error code. + /// + + /// The error message. + /// + + /// The possible causes. + /// + + /// The recommended action. + /// + + /// The error message parameters. + /// + + /// The error tags. + /// + public InMageAzureV2SwitchProviderBlockingErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), System.Collections.Generic.IDictionary errorMessageParameters = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary errorTags = default(System.Collections.Generic.IDictionary)) + { - ErrorCode = errorCode; - ErrorMessage = errorMessage; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - ErrorMessageParameters = errorMessageParameters; - ErrorTags = errorTags; + this.ErrorCode = errorCode; + this.ErrorMessage = errorMessage; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.ErrorMessageParameters = errorMessageParameters; + this.ErrorTags = errorTags; CustomInit(); } @@ -56,41 +58,41 @@ public InMageAzureV2SwitchProviderBlockingErrorDetails() /// partial void CustomInit(); + /// /// Gets the error code. /// - [JsonProperty(PropertyName = "errorCode")] - public string ErrorCode { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public string ErrorCode {get; private set; } /// /// Gets the error message. /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; private set; } /// /// Gets the possible causes. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; private set; } /// /// Gets the recommended action. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; private set; } /// /// Gets the error message parameters. /// - [JsonProperty(PropertyName = "errorMessageParameters")] - public IDictionary ErrorMessageParameters { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessageParameters")] + public System.Collections.Generic.IDictionary ErrorMessageParameters {get; private set; } /// /// Gets the error tags. /// - [JsonProperty(PropertyName = "errorTags")] - public IDictionary ErrorTags { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "errorTags")] + public System.Collections.Generic.IDictionary ErrorTags {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderDetails.cs index 9008038f1a86..b4e1045c90ad 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2SwitchProviderDetails { /// - /// Initializes a new instance of the - /// InMageAzureV2SwitchProviderDetails class. + /// Initializes a new instance of the InMageAzureV2SwitchProviderDetails class. /// public InMageAzureV2SwitchProviderDetails() { @@ -28,19 +21,27 @@ public InMageAzureV2SwitchProviderDetails() } /// - /// Initializes a new instance of the - /// InMageAzureV2SwitchProviderDetails class. + /// Initializes a new instance of the InMageAzureV2SwitchProviderDetails class. /// - /// The target vault Id. - /// The target resource Id. - /// The target fabric Id. - /// The target appliance Id. + + /// The target vault Id. + /// + + /// The target resource Id. + /// + + /// The target fabric Id. + /// + + /// The target appliance Id. + /// public InMageAzureV2SwitchProviderDetails(string targetVaultId = default(string), string targetResourceId = default(string), string targetFabricId = default(string), string targetApplianceId = default(string)) + { - TargetVaultId = targetVaultId; - TargetResourceId = targetResourceId; - TargetFabricId = targetFabricId; - TargetApplianceId = targetApplianceId; + this.TargetVaultId = targetVaultId; + this.TargetResourceId = targetResourceId; + this.TargetFabricId = targetFabricId; + this.TargetApplianceId = targetApplianceId; CustomInit(); } @@ -49,29 +50,29 @@ public InMageAzureV2SwitchProviderDetails() /// partial void CustomInit(); + /// /// Gets the target vault Id. /// - [JsonProperty(PropertyName = "targetVaultId")] - public string TargetVaultId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVaultId")] + public string TargetVaultId {get; private set; } /// /// Gets the target resource Id. /// - [JsonProperty(PropertyName = "targetResourceId")] - public string TargetResourceId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceId")] + public string TargetResourceId {get; private set; } /// /// Gets the target fabric Id. /// - [JsonProperty(PropertyName = "targetFabricId")] - public string TargetFabricId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetFabricId")] + public string TargetFabricId {get; private set; } /// /// Gets the target appliance Id. /// - [JsonProperty(PropertyName = "targetApplianceId")] - public string TargetApplianceId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetApplianceId")] + public string TargetApplianceId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderInput.cs new file mode 100644 index 000000000000..eaf5f499bc75 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderInput.cs @@ -0,0 +1,93 @@ +// 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.SiteRecovery.Models +{ + using System.Linq; + + /// + /// Provider specific input for InMageAzureV2 switch provider. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2SwitchProviderInput : SwitchProviderSpecificInput + { + /// + /// Initializes a new instance of the InMageAzureV2SwitchProviderInput class. + /// + public InMageAzureV2SwitchProviderInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageAzureV2SwitchProviderInput class. + /// + + /// The target vault Id. + /// + + /// The target fabric Id. + /// + + /// The target appliance Id. + /// + public InMageAzureV2SwitchProviderInput(string targetVaultId, string targetFabricId, string targetApplianceId) + + { + this.TargetVaultId = targetVaultId; + this.TargetFabricId = targetFabricId; + this.TargetApplianceId = targetApplianceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the target vault Id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVaultID")] + public string TargetVaultId {get; set; } + + /// + /// Gets or sets the target fabric Id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetFabricID")] + public string TargetFabricId {get; set; } + + /// + /// Gets or sets the target appliance Id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetApplianceID")] + public string TargetApplianceId {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.TargetVaultId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetVaultId"); + } + if (this.TargetFabricId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetFabricId"); + } + if (this.TargetApplianceId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetApplianceId"); + } + + + + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderProviderInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderProviderInput.cs deleted file mode 100644 index 78bdc3c3718a..000000000000 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2SwitchProviderProviderInput.cs +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Provider specific input for InMageAzureV2 switch provider. - /// - [Newtonsoft.Json.JsonObject("InMageAzureV2")] - public partial class InMageAzureV2SwitchProviderProviderInput : SwitchProviderProviderSpecificInput - { - /// - /// Initializes a new instance of the - /// InMageAzureV2SwitchProviderProviderInput class. - /// - public InMageAzureV2SwitchProviderProviderInput() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// InMageAzureV2SwitchProviderProviderInput class. - /// - /// The target vault Id. - /// The target fabric Id. - /// The target appliance Id. - public InMageAzureV2SwitchProviderProviderInput(string targetVaultID, string targetFabricID, string targetApplianceID) - { - TargetVaultID = targetVaultID; - TargetFabricID = targetFabricID; - TargetApplianceID = targetApplianceID; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the target vault Id. - /// - [JsonProperty(PropertyName = "targetVaultID")] - public string TargetVaultID { get; set; } - - /// - /// Gets or sets the target fabric Id. - /// - [JsonProperty(PropertyName = "targetFabricID")] - public string TargetFabricID { get; set; } - - /// - /// Gets or sets the target appliance Id. - /// - [JsonProperty(PropertyName = "targetApplianceID")] - public string TargetApplianceID { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TargetVaultID == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetVaultID"); - } - if (TargetFabricID == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetFabricID"); - } - if (TargetApplianceID == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetApplianceID"); - } - } - } -} diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2TestFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2TestFailoverInput.cs index c7f4ce831560..907d6bf735a0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2TestFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2TestFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2TestFailoverInput : TestFailoverProviderSpecificInput { /// - /// Initializes a new instance of the InMageAzureV2TestFailoverInput - /// class. + /// Initializes a new instance of the InMageAzureV2TestFailoverInput class. /// public InMageAzureV2TestFailoverInput() { @@ -29,15 +22,16 @@ public InMageAzureV2TestFailoverInput() } /// - /// Initializes a new instance of the InMageAzureV2TestFailoverInput - /// class. + /// Initializes a new instance of the InMageAzureV2TestFailoverInput class. /// - /// The recovery point id to be passed to - /// test failover to a particular recovery point. In case of latest - /// recovery point, null should be passed. + + /// The recovery point id to be passed to test failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. + /// public InMageAzureV2TestFailoverInput(string recoveryPointId = default(string)) + { - RecoveryPointId = recoveryPointId; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -46,13 +40,13 @@ public InMageAzureV2TestFailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point id to be passed to test failover to - /// a particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to test failover to a + /// particular recovery point. In case of latest recovery point, null should be + /// passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2UnplannedFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2UnplannedFailoverInput.cs index c2924ec7279b..e7f2537f2a97 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2UnplannedFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2UnplannedFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2UnplannedFailoverInput : UnplannedFailoverProviderSpecificInput { /// - /// Initializes a new instance of the - /// InMageAzureV2UnplannedFailoverInput class. + /// Initializes a new instance of the InMageAzureV2UnplannedFailoverInput class. /// public InMageAzureV2UnplannedFailoverInput() { @@ -29,15 +22,16 @@ public InMageAzureV2UnplannedFailoverInput() } /// - /// Initializes a new instance of the - /// InMageAzureV2UnplannedFailoverInput class. + /// Initializes a new instance of the InMageAzureV2UnplannedFailoverInput class. /// - /// The recovery point id to be passed to - /// failover to a particular recovery point. In case of latest recovery - /// point, null should be passed. + + /// The recovery point id to be passed to failover to a particular recovery + /// point. In case of latest recovery point, null should be passed. + /// public InMageAzureV2UnplannedFailoverInput(string recoveryPointId = default(string)) + { - RecoveryPointId = recoveryPointId; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -46,13 +40,12 @@ public InMageAzureV2UnplannedFailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point id to be passed to failover to a - /// particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2UpdateReplicationProtectedItemInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2UpdateReplicationProtectedItemInput.cs index 7eeb937877e7..164105119653 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2UpdateReplicationProtectedItemInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageAzureV2UpdateReplicationProtectedItemInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageAzureV2UpdateReplicationProtectedItemInput : UpdateReplicationProtectedItemProviderInput { /// - /// Initializes a new instance of the - /// InMageAzureV2UpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the InMageAzureV2UpdateReplicationProtectedItemInput class. /// public InMageAzureV2UpdateReplicationProtectedItemInput() { @@ -31,39 +22,51 @@ public InMageAzureV2UpdateReplicationProtectedItemInput() } /// - /// Initializes a new instance of the - /// InMageAzureV2UpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the InMageAzureV2UpdateReplicationProtectedItemInput class. /// - /// The recovery Azure - /// resource group Id for classic deployment. - /// The recovery Azure - /// resource group Id for resource manager deployment. - /// A value indicating whether managed - /// disks should be used during failover. - /// The target proximity - /// placement group Id. - /// The target availability - /// zone. - /// The target VM tags. - /// The tags for the target managed - /// disks. - /// The tags for the target NICs. + + /// The recovery Azure resource group Id for classic deployment. + /// + + /// The recovery Azure resource group Id for resource manager deployment. + /// + + /// A value indicating whether managed disks should be used during failover. + /// + + /// The target proximity placement group Id. + /// + + /// The target availability zone. + /// + + /// The target VM tags. + /// + + /// The tags for the target managed disks. + /// + + /// The tags for the target NICs. + /// + /// The SQL Server license type. - /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', - /// 'AHUB' - /// The list of disk update properties. - public InMageAzureV2UpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string), string targetProximityPlacementGroupId = default(string), string targetAvailabilityZone = default(string), IDictionary targetVmTags = default(IDictionary), IDictionary targetManagedDiskTags = default(IDictionary), IDictionary targetNicTags = default(IDictionary), string sqlServerLicenseType = default(string), IList vmDisks = default(IList)) + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + + /// The list of disk update properties. + /// + public InMageAzureV2UpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string), string targetProximityPlacementGroupId = default(string), string targetAvailabilityZone = default(string), System.Collections.Generic.IDictionary targetVMTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetManagedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetNicTags = default(System.Collections.Generic.IDictionary), string sqlServerLicenseType = default(string), System.Collections.Generic.IList vmDisks = default(System.Collections.Generic.IList)) + { - RecoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId; - RecoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId; - UseManagedDisks = useManagedDisks; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetVmTags = targetVmTags; - TargetManagedDiskTags = targetManagedDiskTags; - TargetNicTags = targetNicTags; - SqlServerLicenseType = sqlServerLicenseType; - VmDisks = vmDisks; + this.RecoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId; + this.RecoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId; + this.UseManagedDisks = useManagedDisks; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetVMTags = targetVMTags; + this.TargetManagedDiskTags = targetManagedDiskTags; + this.TargetNicTags = targetNicTags; + this.SqlServerLicenseType = sqlServerLicenseType; + this.VMDisks = vmDisks; CustomInit(); } @@ -72,69 +75,67 @@ public InMageAzureV2UpdateReplicationProtectedItemInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery Azure resource group Id for classic - /// deployment. + /// Gets or sets the recovery Azure resource group Id for classic deployment. /// - [JsonProperty(PropertyName = "recoveryAzureV1ResourceGroupId")] - public string RecoveryAzureV1ResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureV1ResourceGroupId")] + public string RecoveryAzureV1ResourceGroupId {get; set; } /// - /// Gets or sets the recovery Azure resource group Id for resource - /// manager deployment. + /// Gets or sets the recovery Azure resource group Id for resource manager + /// deployment. /// - [JsonProperty(PropertyName = "recoveryAzureV2ResourceGroupId")] - public string RecoveryAzureV2ResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureV2ResourceGroupId")] + public string RecoveryAzureV2ResourceGroupId {get; set; } /// - /// Gets or sets a value indicating whether managed disks should be - /// used during failover. + /// Gets or sets a value indicating whether managed disks should be used during + /// failover. /// - [JsonProperty(PropertyName = "useManagedDisks")] - public string UseManagedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks {get; set; } /// /// Gets or sets the target proximity placement group Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target VM tags. /// - [JsonProperty(PropertyName = "targetVmTags")] - public IDictionary TargetVmTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmTags")] + public System.Collections.Generic.IDictionary TargetVMTags {get; set; } /// /// Gets or sets the tags for the target managed disks. /// - [JsonProperty(PropertyName = "targetManagedDiskTags")] - public IDictionary TargetManagedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetManagedDiskTags")] + public System.Collections.Generic.IDictionary TargetManagedDiskTags {get; set; } /// /// Gets or sets the tags for the target NICs. /// - [JsonProperty(PropertyName = "targetNicTags")] - public IDictionary TargetNicTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicTags")] + public System.Collections.Generic.IDictionary TargetNicTags {get; set; } /// - /// Gets or sets the SQL Server license type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + /// Gets or sets the SQL Server license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' /// - [JsonProperty(PropertyName = "sqlServerLicenseType")] - public string SqlServerLicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerLicenseType")] + public string SqlServerLicenseType {get; set; } /// /// Gets or sets the list of disk update properties. /// - [JsonProperty(PropertyName = "vmDisks")] - public IList VmDisks { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisks")] + public System.Collections.Generic.IList VMDisks {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageBasePolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageBasePolicyDetails.cs index b6822ce19364..a7f562ac880d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageBasePolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageBasePolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,20 +24,25 @@ public InMageBasePolicyDetails() /// /// Initializes a new instance of the InMageBasePolicyDetails class. /// - /// The recovery point - /// threshold in minutes. - /// The duration in minutes until - /// which the recovery points need to be stored. - /// The app consistent - /// snapshot frequency in minutes. - /// A value indicating whether multi-VM - /// sync has to be enabled. - public InMageBasePolicyDetails(int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVmSyncStatus = default(string)) + + /// The recovery point threshold in minutes. + /// + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The app consistent snapshot frequency in minutes. + /// + + /// A value indicating whether multi-VM sync has to be enabled. + /// + public InMageBasePolicyDetails(int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVMSyncStatus = default(string)) + { - RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; - RecoveryPointHistory = recoveryPointHistory; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - MultiVmSyncStatus = multiVmSyncStatus; + this.RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + this.RecoveryPointHistory = recoveryPointHistory; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.MultiVMSyncStatus = multiVMSyncStatus; CustomInit(); } @@ -52,31 +51,30 @@ public InMageBasePolicyDetails() /// partial void CustomInit(); + /// /// Gets or sets the recovery point threshold in minutes. /// - [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] - public int? RecoveryPointThresholdInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes {get; set; } /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistory")] - public int? RecoveryPointHistory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory {get; set; } /// /// Gets or sets the app consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDisableProtectionProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDisableProtectionProviderSpecificInput.cs index 425b694e1f31..dec422286664 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDisableProtectionProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDisableProtectionProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageDisableProtectionProviderSpecificInput : DisableProtectionProviderSpecificInput { /// - /// Initializes a new instance of the - /// InMageDisableProtectionProviderSpecificInput class. + /// Initializes a new instance of the InMageDisableProtectionProviderSpecificInput class. /// public InMageDisableProtectionProviderSpecificInput() { @@ -29,15 +22,16 @@ public InMageDisableProtectionProviderSpecificInput() } /// - /// Initializes a new instance of the - /// InMageDisableProtectionProviderSpecificInput class. + /// Initializes a new instance of the InMageDisableProtectionProviderSpecificInput class. /// - /// A value indicating whether - /// the replica VM should be destroyed or retained. Values from Delete - /// and Retain. - public InMageDisableProtectionProviderSpecificInput(string replicaVmDeletionStatus = default(string)) + + /// A value indicating whether the replica VM should be destroyed or retained. + /// Values from Delete and Retain. + /// + public InMageDisableProtectionProviderSpecificInput(string replicaVMDeletionStatus = default(string)) + { - ReplicaVmDeletionStatus = replicaVmDeletionStatus; + this.ReplicaVMDeletionStatus = replicaVMDeletionStatus; CustomInit(); } @@ -46,12 +40,12 @@ public InMageDisableProtectionProviderSpecificInput() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether the replica VM should be - /// destroyed or retained. Values from Delete and Retain. + /// Gets or sets a value indicating whether the replica VM should be destroyed + /// or retained. Values from Delete and Retain. /// - [JsonProperty(PropertyName = "replicaVmDeletionStatus")] - public string ReplicaVmDeletionStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaVmDeletionStatus")] + public string ReplicaVMDeletionStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskDetails.cs index d0f82b56a451..fc467a63361a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,22 +23,33 @@ public InMageDiskDetails() /// /// Initializes a new instance of the InMageDiskDetails class. /// - /// The disk Id. - /// The disk name. - /// The disk size in MB. - /// Whether disk is system disk or data - /// disk. - /// Whether disk is dynamic disk or - /// basic disk. - /// Volumes of the disk. - public InMageDiskDetails(string diskId = default(string), string diskName = default(string), string diskSizeInMB = default(string), string diskType = default(string), string diskConfiguration = default(string), IList volumeList = default(IList)) + + /// The disk Id. + /// + + /// The disk name. + /// + + /// The disk size in MB. + /// + + /// Whether disk is system disk or data disk. + /// + + /// Whether disk is dynamic disk or basic disk. + /// + + /// Volumes of the disk. + /// + public InMageDiskDetails(string diskId = default(string), string diskName = default(string), string diskSizeInMb = default(string), string diskType = default(string), string diskConfiguration = default(string), System.Collections.Generic.IList volumeList = default(System.Collections.Generic.IList)) + { - DiskId = diskId; - DiskName = diskName; - DiskSizeInMB = diskSizeInMB; - DiskType = diskType; - DiskConfiguration = diskConfiguration; - VolumeList = volumeList; + this.DiskId = diskId; + this.DiskName = diskName; + this.DiskSizeInMb = diskSizeInMb; + this.DiskType = diskType; + this.DiskConfiguration = diskConfiguration; + this.VolumeList = volumeList; CustomInit(); } @@ -55,41 +58,41 @@ public InMageDiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the disk name. /// - [JsonProperty(PropertyName = "diskName")] - public string DiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskName")] + public string DiskName {get; set; } /// /// Gets or sets the disk size in MB. /// - [JsonProperty(PropertyName = "diskSizeInMB")] - public string DiskSizeInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskSizeInMB")] + public string DiskSizeInMb {get; set; } /// /// Gets or sets whether disk is system disk or data disk. /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// /// Gets or sets whether disk is dynamic disk or basic disk. /// - [JsonProperty(PropertyName = "diskConfiguration")] - public string DiskConfiguration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskConfiguration")] + public string DiskConfiguration {get; set; } /// /// Gets or sets volumes of the disk. /// - [JsonProperty(PropertyName = "volumeList")] - public IList VolumeList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "volumeList")] + public System.Collections.Generic.IList VolumeList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskExclusionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskExclusionInput.cs index ff559dec8af0..17571537c601 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskExclusionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskExclusionInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,14 +24,17 @@ public InMageDiskExclusionInput() /// /// Initializes a new instance of the InMageDiskExclusionInput class. /// - /// The volume label based option for disk - /// exclusion. - /// The guest disk signature based - /// option for disk exclusion. - public InMageDiskExclusionInput(IList volumeOptions = default(IList), IList diskSignatureOptions = default(IList)) + + /// The volume label based option for disk exclusion. + /// + + /// The guest disk signature based option for disk exclusion. + /// + public InMageDiskExclusionInput(System.Collections.Generic.IList volumeOptions = default(System.Collections.Generic.IList), System.Collections.Generic.IList diskSignatureOptions = default(System.Collections.Generic.IList)) + { - VolumeOptions = volumeOptions; - DiskSignatureOptions = diskSignatureOptions; + this.VolumeOptions = volumeOptions; + this.DiskSignatureOptions = diskSignatureOptions; CustomInit(); } @@ -48,18 +43,17 @@ public InMageDiskExclusionInput() /// partial void CustomInit(); + /// /// Gets or sets the volume label based option for disk exclusion. /// - [JsonProperty(PropertyName = "volumeOptions")] - public IList VolumeOptions { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "volumeOptions")] + public System.Collections.Generic.IList VolumeOptions {get; set; } /// - /// Gets or sets the guest disk signature based option for disk - /// exclusion. + /// Gets or sets the guest disk signature based option for disk exclusion. /// - [JsonProperty(PropertyName = "diskSignatureOptions")] - public IList DiskSignatureOptions { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskSignatureOptions")] + public System.Collections.Generic.IList DiskSignatureOptions {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskSignatureExclusionOptions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskSignatureExclusionOptions.cs index 5535fc98fd22..fafae4720cf6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskSignatureExclusionOptions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageDiskSignatureExclusionOptions.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageDiskSignatureExclusionOptions { /// - /// Initializes a new instance of the - /// InMageDiskSignatureExclusionOptions class. + /// Initializes a new instance of the InMageDiskSignatureExclusionOptions class. /// public InMageDiskSignatureExclusionOptions() { @@ -29,14 +22,15 @@ public InMageDiskSignatureExclusionOptions() } /// - /// Initializes a new instance of the - /// InMageDiskSignatureExclusionOptions class. + /// Initializes a new instance of the InMageDiskSignatureExclusionOptions class. /// - /// The guest signature of disk to be - /// excluded from replication. + + /// The guest signature of disk to be excluded from replication. + /// public InMageDiskSignatureExclusionOptions(string diskSignature = default(string)) + { - DiskSignature = diskSignature; + this.DiskSignature = diskSignature; CustomInit(); } @@ -45,12 +39,11 @@ public InMageDiskSignatureExclusionOptions() /// partial void CustomInit(); + /// - /// Gets or sets the guest signature of disk to be excluded from - /// replication. + /// Gets or sets the guest signature of disk to be excluded from replication. /// - [JsonProperty(PropertyName = "diskSignature")] - public string DiskSignature { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskSignature")] + public string DiskSignature {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageEnableProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageEnableProtectionInput.cs index a7251e02d469..add9c0d38326 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageEnableProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageEnableProtectionInput.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageEnableProtectionInput : EnableProtectionProviderSpecificInput { /// - /// Initializes a new instance of the InMageEnableProtectionInput - /// class. + /// Initializes a new instance of the InMageEnableProtectionInput class. /// public InMageEnableProtectionInput() { @@ -32,33 +22,51 @@ public InMageEnableProtectionInput() } /// - /// Initializes a new instance of the InMageEnableProtectionInput - /// class. + /// Initializes a new instance of the InMageEnableProtectionInput class. /// - /// The Master Target Id. - /// The Process Server Id. - /// The retention drive to use on the - /// MT. - /// The multi VM group Id. - /// The multi VM group name. - /// The VM Name. - /// The CS account Id. - /// The target datastore name. - /// The enable disk exclusion - /// input. - /// The disks to include list. - public InMageEnableProtectionInput(string masterTargetId, string processServerId, string retentionDrive, string multiVmGroupId, string multiVmGroupName, string vmFriendlyName = default(string), string runAsAccountId = default(string), string datastoreName = default(string), InMageDiskExclusionInput diskExclusionInput = default(InMageDiskExclusionInput), IList disksToInclude = default(IList)) + + /// The VM Name. + /// + + /// The Master Target Id. + /// + + /// The Process Server Id. + /// + + /// The retention drive to use on the MT. + /// + + /// The CS account Id. + /// + + /// The multi VM group Id. + /// + + /// The multi VM group name. + /// + + /// The target datastore name. + /// + + /// The enable disk exclusion input. + /// + + /// The disks to include list. + /// + public InMageEnableProtectionInput(string masterTargetId, string processServerId, string retentionDrive, string multiVMGroupId, string multiVMGroupName, string vmFriendlyName = default(string), string runAsAccountId = default(string), string datastoreName = default(string), InMageDiskExclusionInput diskExclusionInput = default(InMageDiskExclusionInput), System.Collections.Generic.IList disksToInclude = default(System.Collections.Generic.IList)) + { - VmFriendlyName = vmFriendlyName; - MasterTargetId = masterTargetId; - ProcessServerId = processServerId; - RetentionDrive = retentionDrive; - RunAsAccountId = runAsAccountId; - MultiVmGroupId = multiVmGroupId; - MultiVmGroupName = multiVmGroupName; - DatastoreName = datastoreName; - DiskExclusionInput = diskExclusionInput; - DisksToInclude = disksToInclude; + this.VMFriendlyName = vmFriendlyName; + this.MasterTargetId = masterTargetId; + this.ProcessServerId = processServerId; + this.RetentionDrive = retentionDrive; + this.RunAsAccountId = runAsAccountId; + this.MultiVMGroupId = multiVMGroupId; + this.MultiVMGroupName = multiVMGroupName; + this.DatastoreName = datastoreName; + this.DiskExclusionInput = diskExclusionInput; + this.DisksToInclude = disksToInclude; CustomInit(); } @@ -67,94 +75,104 @@ public InMageEnableProtectionInput() /// partial void CustomInit(); + /// /// Gets or sets the VM Name. /// - [JsonProperty(PropertyName = "vmFriendlyName")] - public string VmFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmFriendlyName")] + public string VMFriendlyName {get; set; } /// /// Gets or sets the Master Target Id. /// - [JsonProperty(PropertyName = "masterTargetId")] - public string MasterTargetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId {get; set; } /// /// Gets or sets the Process Server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the retention drive to use on the MT. /// - [JsonProperty(PropertyName = "retentionDrive")] - public string RetentionDrive { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionDrive")] + public string RetentionDrive {get; set; } /// /// Gets or sets the CS account Id. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } /// /// Gets or sets the multi VM group Id. /// - [JsonProperty(PropertyName = "multiVmGroupId")] - public string MultiVmGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVMGroupId {get; set; } /// /// Gets or sets the multi VM group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; set; } /// /// Gets or sets the target datastore name. /// - [JsonProperty(PropertyName = "datastoreName")] - public string DatastoreName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datastoreName")] + public string DatastoreName {get; set; } /// /// Gets or sets the enable disk exclusion input. /// - [JsonProperty(PropertyName = "diskExclusionInput")] - public InMageDiskExclusionInput DiskExclusionInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskExclusionInput")] + public InMageDiskExclusionInput DiskExclusionInput {get; set; } /// /// Gets or sets the disks to include list. /// - [JsonProperty(PropertyName = "disksToInclude")] - public IList DisksToInclude { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "disksToInclude")] + public System.Collections.Generic.IList DisksToInclude {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (MasterTargetId == null) + if (this.MasterTargetId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MasterTargetId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MasterTargetId"); } - if (ProcessServerId == null) + if (this.ProcessServerId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProcessServerId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProcessServerId"); } - if (RetentionDrive == null) + if (this.RetentionDrive == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RetentionDrive"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RetentionDrive"); } - if (MultiVmGroupId == null) + if (this.MultiVMGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MultiVmGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MultiVMGroupId"); } - if (MultiVmGroupName == null) + if (this.MultiVMGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MultiVmGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MultiVMGroupName"); } + + + + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageFabricSwitchProviderBlockingErrorDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageFabricSwitchProviderBlockingErrorDetails.cs index ceb6a9030887..befcabac88b1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageFabricSwitchProviderBlockingErrorDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageFabricSwitchProviderBlockingErrorDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageFabricSwitchProviderBlockingErrorDetails { /// - /// Initializes a new instance of the - /// InMageFabricSwitchProviderBlockingErrorDetails class. + /// Initializes a new instance of the InMageFabricSwitchProviderBlockingErrorDetails class. /// public InMageFabricSwitchProviderBlockingErrorDetails() { @@ -30,24 +21,35 @@ public InMageFabricSwitchProviderBlockingErrorDetails() } /// - /// Initializes a new instance of the - /// InMageFabricSwitchProviderBlockingErrorDetails class. + /// Initializes a new instance of the InMageFabricSwitchProviderBlockingErrorDetails class. /// - /// The error code. - /// The error message. - /// The possible causes. - /// The recommended action. - /// The error message - /// parameters. - /// The error tags. - public InMageFabricSwitchProviderBlockingErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), IDictionary errorMessageParameters = default(IDictionary), IDictionary errorTags = default(IDictionary)) + + /// The error code. + /// + + /// The error message. + /// + + /// The possible causes. + /// + + /// The recommended action. + /// + + /// The error message parameters. + /// + + /// The error tags. + /// + public InMageFabricSwitchProviderBlockingErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), System.Collections.Generic.IDictionary errorMessageParameters = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary errorTags = default(System.Collections.Generic.IDictionary)) + { - ErrorCode = errorCode; - ErrorMessage = errorMessage; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - ErrorMessageParameters = errorMessageParameters; - ErrorTags = errorTags; + this.ErrorCode = errorCode; + this.ErrorMessage = errorMessage; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.ErrorMessageParameters = errorMessageParameters; + this.ErrorTags = errorTags; CustomInit(); } @@ -56,41 +58,41 @@ public InMageFabricSwitchProviderBlockingErrorDetails() /// partial void CustomInit(); + /// /// Gets the error code. /// - [JsonProperty(PropertyName = "errorCode")] - public string ErrorCode { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public string ErrorCode {get; private set; } /// /// Gets the error message. /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; private set; } /// /// Gets the possible causes. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; private set; } /// /// Gets the recommended action. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; private set; } /// /// Gets the error message parameters. /// - [JsonProperty(PropertyName = "errorMessageParameters")] - public IDictionary ErrorMessageParameters { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessageParameters")] + public System.Collections.Generic.IDictionary ErrorMessageParameters {get; private set; } /// /// Gets the error tags. /// - [JsonProperty(PropertyName = "errorTags")] - public IDictionary ErrorTags { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "errorTags")] + public System.Collections.Generic.IDictionary ErrorTags {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMagePolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMagePolicyDetails.cs index 579f421ffe9d..6bcb41002d12 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMagePolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMagePolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,20 +24,25 @@ public InMagePolicyDetails() /// /// Initializes a new instance of the InMagePolicyDetails class. /// - /// The recovery point - /// threshold in minutes. - /// The duration in minutes until - /// which the recovery points need to be stored. - /// The app consistent - /// snapshot frequency in minutes. - /// A value indicating whether multi-VM - /// sync has to be enabled. - public InMagePolicyDetails(int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVmSyncStatus = default(string)) + + /// The recovery point threshold in minutes. + /// + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The app consistent snapshot frequency in minutes. + /// + + /// A value indicating whether multi-VM sync has to be enabled. + /// + public InMagePolicyDetails(int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVMSyncStatus = default(string)) + { - RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; - RecoveryPointHistory = recoveryPointHistory; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - MultiVmSyncStatus = multiVmSyncStatus; + this.RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + this.RecoveryPointHistory = recoveryPointHistory; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.MultiVMSyncStatus = multiVMSyncStatus; CustomInit(); } @@ -52,31 +51,30 @@ public InMagePolicyDetails() /// partial void CustomInit(); + /// /// Gets or sets the recovery point threshold in minutes. /// - [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] - public int? RecoveryPointThresholdInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes {get; set; } /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistory")] - public int? RecoveryPointHistory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory {get; set; } /// /// Gets or sets the app consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMagePolicyInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMagePolicyInput.cs index e5e34eefb373..d0137db9a077 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMagePolicyInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMagePolicyInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -31,21 +24,26 @@ public InMagePolicyInput() /// /// Initializes a new instance of the InMagePolicyInput class. /// - /// A value indicating whether multi-VM - /// sync has to be enabled. Value should be 'Enabled' or 'Disabled'. + + /// The recovery point threshold in minutes. + /// + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The app consistent snapshot frequency (in minutes). + /// + + /// A value indicating whether multi-VM sync has to be enabled. Value should be + /// 'Enabled' or 'Disabled'. /// Possible values include: 'Enable', 'Disable' - /// The recovery point - /// threshold in minutes. - /// The duration in minutes until - /// which the recovery points need to be stored. - /// The app consistent - /// snapshot frequency (in minutes). - public InMagePolicyInput(string multiVmSyncStatus, int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + public InMagePolicyInput(string multiVMSyncStatus, int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + { - RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; - RecoveryPointHistory = recoveryPointHistory; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - MultiVmSyncStatus = multiVmSyncStatus; + this.RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + this.RecoveryPointHistory = recoveryPointHistory; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.MultiVMSyncStatus = multiVMSyncStatus; CustomInit(); } @@ -54,45 +52,45 @@ public InMagePolicyInput() /// partial void CustomInit(); + /// /// Gets or sets the recovery point threshold in minutes. /// - [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] - public int? RecoveryPointThresholdInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes {get; set; } /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistory")] - public int? RecoveryPointHistory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory {get; set; } /// /// Gets or sets the app consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. Value should be 'Enabled' or 'Disabled'. Possible values - /// include: 'Enable', 'Disable' + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (MultiVmSyncStatus == null) + if (this.MultiVMSyncStatus == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MultiVmSyncStatus"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MultiVMSyncStatus"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageProtectedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageProtectedDiskDetails.cs index 75c9e56b4136..ffec0febd23d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageProtectedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageProtectedDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,64 +23,97 @@ public InMageProtectedDiskDetails() /// /// Initializes a new instance of the InMageProtectedDiskDetails class. /// - /// The disk id. - /// The disk name. - /// The protection stage. - /// The health error code for the - /// disk. - /// The RPO in seconds. - /// A value indicating whether resync is - /// required for this disk. - /// The resync progress - /// percentage. - /// The resync duration in - /// seconds. - /// The disk capacity in - /// bytes. - /// The file system capacity in - /// bytes. - /// The source data transit in MB. - /// The PS data transit in MB. - /// The target data transit in MB. - /// A value indicating whether disk is - /// resized. - /// The last RPO calculated - /// time. - /// The resync processed - /// bytes. - /// The resync total - /// transferred bytes. - /// The resync last - /// 15 minutes transferred bytes. - /// The last data transfer - /// time in UTC. - /// The resync start time. - /// The Progress Health. - /// The Progress Status. - public InMageProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string protectionStage = default(string), string healthErrorCode = default(string), long? rpoInSeconds = default(long?), string resyncRequired = default(string), int? resyncProgressPercentage = default(int?), long? resyncDurationInSeconds = default(long?), long? diskCapacityInBytes = default(long?), long? fileSystemCapacityInBytes = default(long?), double? sourceDataInMB = default(double?), double? psDataInMB = default(double?), double? targetDataInMB = default(double?), string diskResized = default(string), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), long? resyncProcessedBytes = default(long?), long? resyncTotalTransferredBytes = default(long?), long? resyncLast15MinutesTransferredBytes = default(long?), System.DateTime? resyncLastDataTransferTimeUTC = default(System.DateTime?), System.DateTime? resyncStartTime = default(System.DateTime?), string progressHealth = default(string), string progressStatus = default(string)) + + /// The disk id. + /// + + /// The disk name. + /// + + /// The protection stage. + /// + + /// The health error code for the disk. + /// + + /// The RPO in seconds. + /// + + /// A value indicating whether resync is required for this disk. + /// + + /// The resync progress percentage. + /// + + /// The resync duration in seconds. + /// + + /// The disk capacity in bytes. + /// + + /// The file system capacity in bytes. + /// + + /// The source data transit in MB. + /// + + /// The PS data transit in MB. + /// + + /// The target data transit in MB. + /// + + /// A value indicating whether disk is resized. + /// + + /// The last RPO calculated time. + /// + + /// The resync processed bytes. + /// + + /// The resync total transferred bytes. + /// + + /// The resync last 15 minutes transferred bytes. + /// + + /// The last data transfer time in UTC. + /// + + /// The resync start time. + /// + + /// The Progress Health. + /// + + /// The Progress Status. + /// + public InMageProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string protectionStage = default(string), string healthErrorCode = default(string), long? rpoInSeconds = default(long?), string resyncRequired = default(string), int? resyncProgressPercentage = default(int?), long? resyncDurationInSeconds = default(long?), long? diskCapacityInBytes = default(long?), long? fileSystemCapacityInBytes = default(long?), double? sourceDataInMb = default(double?), double? psDataInMb = default(double?), double? targetDataInMb = default(double?), string diskResized = default(string), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), long? resyncProcessedBytes = default(long?), long? resyncTotalTransferredBytes = default(long?), long? resyncLast15MinutesTransferredBytes = default(long?), System.DateTime? resyncLastDataTransferTimeUtc = default(System.DateTime?), System.DateTime? resyncStartTime = default(System.DateTime?), string progressHealth = default(string), string progressStatus = default(string)) + { - DiskId = diskId; - DiskName = diskName; - ProtectionStage = protectionStage; - HealthErrorCode = healthErrorCode; - RpoInSeconds = rpoInSeconds; - ResyncRequired = resyncRequired; - ResyncProgressPercentage = resyncProgressPercentage; - ResyncDurationInSeconds = resyncDurationInSeconds; - DiskCapacityInBytes = diskCapacityInBytes; - FileSystemCapacityInBytes = fileSystemCapacityInBytes; - SourceDataInMB = sourceDataInMB; - PsDataInMB = psDataInMB; - TargetDataInMB = targetDataInMB; - DiskResized = diskResized; - LastRpoCalculatedTime = lastRpoCalculatedTime; - ResyncProcessedBytes = resyncProcessedBytes; - ResyncTotalTransferredBytes = resyncTotalTransferredBytes; - ResyncLast15MinutesTransferredBytes = resyncLast15MinutesTransferredBytes; - ResyncLastDataTransferTimeUTC = resyncLastDataTransferTimeUTC; - ResyncStartTime = resyncStartTime; - ProgressHealth = progressHealth; - ProgressStatus = progressStatus; + this.DiskId = diskId; + this.DiskName = diskName; + this.ProtectionStage = protectionStage; + this.HealthErrorCode = healthErrorCode; + this.RpoInSeconds = rpoInSeconds; + this.ResyncRequired = resyncRequired; + this.ResyncProgressPercentage = resyncProgressPercentage; + this.ResyncDurationInSeconds = resyncDurationInSeconds; + this.DiskCapacityInBytes = diskCapacityInBytes; + this.FileSystemCapacityInBytes = fileSystemCapacityInBytes; + this.SourceDataInMb = sourceDataInMb; + this.PsDataInMb = psDataInMb; + this.TargetDataInMb = targetDataInMb; + this.DiskResized = diskResized; + this.LastRpoCalculatedTime = lastRpoCalculatedTime; + this.ResyncProcessedBytes = resyncProcessedBytes; + this.ResyncTotalTransferredBytes = resyncTotalTransferredBytes; + this.ResyncLast15MinutesTransferredBytes = resyncLast15MinutesTransferredBytes; + this.ResyncLastDataTransferTimeUtc = resyncLastDataTransferTimeUtc; + this.ResyncStartTime = resyncStartTime; + this.ProgressHealth = progressHealth; + this.ProgressStatus = progressStatus; CustomInit(); } @@ -95,138 +122,137 @@ public InMageProtectedDiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the disk id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the disk name. /// - [JsonProperty(PropertyName = "diskName")] - public string DiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskName")] + public string DiskName {get; set; } /// /// Gets or sets the protection stage. /// - [JsonProperty(PropertyName = "protectionStage")] - public string ProtectionStage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStage")] + public string ProtectionStage {get; set; } /// /// Gets or sets the health error code for the disk. /// - [JsonProperty(PropertyName = "healthErrorCode")] - public string HealthErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrorCode")] + public string HealthErrorCode {get; set; } /// /// Gets or sets the RPO in seconds. /// - [JsonProperty(PropertyName = "rpoInSeconds")] - public long? RpoInSeconds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds {get; set; } /// - /// Gets or sets a value indicating whether resync is required for this - /// disk. + /// Gets or sets a value indicating whether resync is required for this disk. /// - [JsonProperty(PropertyName = "resyncRequired")] - public string ResyncRequired { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncRequired")] + public string ResyncRequired {get; set; } /// /// Gets or sets the resync progress percentage. /// - [JsonProperty(PropertyName = "resyncProgressPercentage")] - public int? ResyncProgressPercentage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage {get; set; } /// /// Gets or sets the resync duration in seconds. /// - [JsonProperty(PropertyName = "resyncDurationInSeconds")] - public long? ResyncDurationInSeconds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncDurationInSeconds")] + public long? ResyncDurationInSeconds {get; set; } /// /// Gets or sets the disk capacity in bytes. /// - [JsonProperty(PropertyName = "diskCapacityInBytes")] - public long? DiskCapacityInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskCapacityInBytes")] + public long? DiskCapacityInBytes {get; set; } /// /// Gets or sets the file system capacity in bytes. /// - [JsonProperty(PropertyName = "fileSystemCapacityInBytes")] - public long? FileSystemCapacityInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fileSystemCapacityInBytes")] + public long? FileSystemCapacityInBytes {get; set; } /// /// Gets or sets the source data transit in MB. /// - [JsonProperty(PropertyName = "sourceDataInMB")] - public double? SourceDataInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceDataInMB")] + public double? SourceDataInMb {get; set; } /// /// Gets or sets the PS data transit in MB. /// - [JsonProperty(PropertyName = "psDataInMB")] - public double? PsDataInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "psDataInMB")] + public double? PsDataInMb {get; set; } /// /// Gets or sets the target data transit in MB. /// - [JsonProperty(PropertyName = "targetDataInMB")] - public double? TargetDataInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDataInMB")] + public double? TargetDataInMb {get; set; } /// /// Gets or sets a value indicating whether disk is resized. /// - [JsonProperty(PropertyName = "diskResized")] - public string DiskResized { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskResized")] + public string DiskResized {get; set; } /// /// Gets or sets the last RPO calculated time. /// - [JsonProperty(PropertyName = "lastRpoCalculatedTime")] - public System.DateTime? LastRpoCalculatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRpoCalculatedTime")] + public System.DateTime? LastRpoCalculatedTime {get; set; } /// /// Gets or sets the resync processed bytes. /// - [JsonProperty(PropertyName = "resyncProcessedBytes")] - public long? ResyncProcessedBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProcessedBytes")] + public long? ResyncProcessedBytes {get; set; } /// /// Gets or sets the resync total transferred bytes. /// - [JsonProperty(PropertyName = "resyncTotalTransferredBytes")] - public long? ResyncTotalTransferredBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncTotalTransferredBytes")] + public long? ResyncTotalTransferredBytes {get; set; } /// /// Gets or sets the resync last 15 minutes transferred bytes. /// - [JsonProperty(PropertyName = "resyncLast15MinutesTransferredBytes")] - public long? ResyncLast15MinutesTransferredBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncLast15MinutesTransferredBytes")] + public long? ResyncLast15MinutesTransferredBytes {get; set; } /// /// Gets or sets the last data transfer time in UTC. /// - [JsonProperty(PropertyName = "resyncLastDataTransferTimeUTC")] - public System.DateTime? ResyncLastDataTransferTimeUTC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncLastDataTransferTimeUTC")] + public System.DateTime? ResyncLastDataTransferTimeUtc {get; set; } /// /// Gets or sets the resync start time. /// - [JsonProperty(PropertyName = "resyncStartTime")] - public System.DateTime? ResyncStartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncStartTime")] + public System.DateTime? ResyncStartTime {get; set; } /// /// Gets or sets the Progress Health. /// - [JsonProperty(PropertyName = "progressHealth")] - public string ProgressHealth { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "progressHealth")] + public string ProgressHealth {get; set; } /// /// Gets or sets the Progress Status. /// - [JsonProperty(PropertyName = "progressStatus")] - public string ProgressStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "progressStatus")] + public string ProgressStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmAgentUpgradeBlockingErrorDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmAgentUpgradeBlockingErrorDetails.cs index 4b9b1e640257..245e3eb34970 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmAgentUpgradeBlockingErrorDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmAgentUpgradeBlockingErrorDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmAgentUpgradeBlockingErrorDetails { /// - /// Initializes a new instance of the - /// InMageRcmAgentUpgradeBlockingErrorDetails class. + /// Initializes a new instance of the InMageRcmAgentUpgradeBlockingErrorDetails class. /// public InMageRcmAgentUpgradeBlockingErrorDetails() { @@ -30,24 +21,35 @@ public InMageRcmAgentUpgradeBlockingErrorDetails() } /// - /// Initializes a new instance of the - /// InMageRcmAgentUpgradeBlockingErrorDetails class. + /// Initializes a new instance of the InMageRcmAgentUpgradeBlockingErrorDetails class. /// - /// The error code. - /// The error message. - /// The possible causes. - /// The recommended action. - /// The error message - /// parameters. - /// The error tags. - public InMageRcmAgentUpgradeBlockingErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), IDictionary errorMessageParameters = default(IDictionary), IDictionary errorTags = default(IDictionary)) + + /// The error code. + /// + + /// The error message. + /// + + /// The possible causes. + /// + + /// The recommended action. + /// + + /// The error message parameters. + /// + + /// The error tags. + /// + public InMageRcmAgentUpgradeBlockingErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), System.Collections.Generic.IDictionary errorMessageParameters = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary errorTags = default(System.Collections.Generic.IDictionary)) + { - ErrorCode = errorCode; - ErrorMessage = errorMessage; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - ErrorMessageParameters = errorMessageParameters; - ErrorTags = errorTags; + this.ErrorCode = errorCode; + this.ErrorMessage = errorMessage; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.ErrorMessageParameters = errorMessageParameters; + this.ErrorTags = errorTags; CustomInit(); } @@ -56,41 +58,41 @@ public InMageRcmAgentUpgradeBlockingErrorDetails() /// partial void CustomInit(); + /// /// Gets the error code. /// - [JsonProperty(PropertyName = "errorCode")] - public string ErrorCode { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public string ErrorCode {get; private set; } /// /// Gets the error message. /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; private set; } /// /// Gets the possible causes. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; private set; } /// /// Gets the recommended action. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; private set; } /// /// Gets the error message parameters. /// - [JsonProperty(PropertyName = "errorMessageParameters")] - public IDictionary ErrorMessageParameters { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessageParameters")] + public System.Collections.Generic.IDictionary ErrorMessageParameters {get; private set; } /// /// Gets the error tags. /// - [JsonProperty(PropertyName = "errorTags")] - public IDictionary ErrorTags { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "errorTags")] + public System.Collections.Generic.IDictionary ErrorTags {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplianceDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplianceDetails.cs index 9444ad7de6ad..7186797f7192 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplianceDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplianceDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,31 +23,53 @@ public InMageRcmApplianceDetails() /// /// Initializes a new instance of the InMageRcmApplianceDetails class. /// - /// The appliance Id. - /// The appliance name. - /// The fabric ARM Id. - /// The process server. - /// The of RCM proxy. - /// The push installer. - /// The replication agent. - /// The reprotect agent. - /// The Mars agent. - /// The DRA. - /// The switch - /// provider blocking error information. - public InMageRcmApplianceDetails(string id = default(string), string name = default(string), string fabricArmId = default(string), ProcessServerDetails processServer = default(ProcessServerDetails), RcmProxyDetails rcmProxy = default(RcmProxyDetails), PushInstallerDetails pushInstaller = default(PushInstallerDetails), ReplicationAgentDetails replicationAgent = default(ReplicationAgentDetails), ReprotectAgentDetails reprotectAgent = default(ReprotectAgentDetails), MarsAgentDetails marsAgent = default(MarsAgentDetails), DraDetails dra = default(DraDetails), IList switchProviderBlockingErrorDetails = default(IList)) + + /// The appliance Id. + /// + + /// The appliance name. + /// + + /// The fabric ARM Id. + /// + + /// The process server. + /// + + /// The of RCM proxy. + /// + + /// The push installer. + /// + + /// The replication agent. + /// + + /// The reprotect agent. + /// + + /// The Mars agent. + /// + + /// The DRA. + /// + + /// The switch provider blocking error information. + /// + public InMageRcmApplianceDetails(string id = default(string), string name = default(string), string fabricArmId = default(string), ProcessServerDetails processServer = default(ProcessServerDetails), RcmProxyDetails rcmProxy = default(RcmProxyDetails), PushInstallerDetails pushInstaller = default(PushInstallerDetails), ReplicationAgentDetails replicationAgent = default(ReplicationAgentDetails), ReprotectAgentDetails reprotectAgent = default(ReprotectAgentDetails), MarsAgentDetails marsAgent = default(MarsAgentDetails), DraDetails dra = default(DraDetails), System.Collections.Generic.IList switchProviderBlockingErrorDetails = default(System.Collections.Generic.IList)) + { - Id = id; - Name = name; - FabricArmId = fabricArmId; - ProcessServer = processServer; - RcmProxy = rcmProxy; - PushInstaller = pushInstaller; - ReplicationAgent = replicationAgent; - ReprotectAgent = reprotectAgent; - MarsAgent = marsAgent; - Dra = dra; - SwitchProviderBlockingErrorDetails = switchProviderBlockingErrorDetails; + this.Id = id; + this.Name = name; + this.FabricArmId = fabricArmId; + this.ProcessServer = processServer; + this.RcmProxy = rcmProxy; + this.PushInstaller = pushInstaller; + this.ReplicationAgent = replicationAgent; + this.ReprotectAgent = reprotectAgent; + this.MarsAgent = marsAgent; + this.Dra = dra; + this.SwitchProviderBlockingErrorDetails = switchProviderBlockingErrorDetails; CustomInit(); } @@ -64,71 +78,71 @@ public InMageRcmApplianceDetails() /// partial void CustomInit(); + /// /// Gets the appliance Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the appliance name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the fabric ARM Id. /// - [JsonProperty(PropertyName = "fabricArmId")] - public string FabricArmId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricArmId")] + public string FabricArmId {get; private set; } /// /// Gets the process server. /// - [JsonProperty(PropertyName = "processServer")] - public ProcessServerDetails ProcessServer { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServer")] + public ProcessServerDetails ProcessServer {get; private set; } /// /// Gets the of RCM proxy. /// - [JsonProperty(PropertyName = "rcmProxy")] - public RcmProxyDetails RcmProxy { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rcmProxy")] + public RcmProxyDetails RcmProxy {get; private set; } /// /// Gets the push installer. /// - [JsonProperty(PropertyName = "pushInstaller")] - public PushInstallerDetails PushInstaller { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "pushInstaller")] + public PushInstallerDetails PushInstaller {get; private set; } /// /// Gets the replication agent. /// - [JsonProperty(PropertyName = "replicationAgent")] - public ReplicationAgentDetails ReplicationAgent { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationAgent")] + public ReplicationAgentDetails ReplicationAgent {get; private set; } /// /// Gets the reprotect agent. /// - [JsonProperty(PropertyName = "reprotectAgent")] - public ReprotectAgentDetails ReprotectAgent { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reprotectAgent")] + public ReprotectAgentDetails ReprotectAgent {get; private set; } /// /// Gets the Mars agent. /// - [JsonProperty(PropertyName = "marsAgent")] - public MarsAgentDetails MarsAgent { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "marsAgent")] + public MarsAgentDetails MarsAgent {get; private set; } /// /// Gets the DRA. /// - [JsonProperty(PropertyName = "dra")] - public DraDetails Dra { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dra")] + public DraDetails Dra {get; private set; } /// /// Gets the switch provider blocking error information. /// - [JsonProperty(PropertyName = "switchProviderBlockingErrorDetails")] - public IList SwitchProviderBlockingErrorDetails { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "switchProviderBlockingErrorDetails")] + public System.Collections.Generic.IList SwitchProviderBlockingErrorDetails {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplianceSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplianceSpecificDetails.cs index 88973e1b5405..48c98c342b53 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplianceSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplianceSpecificDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmApplianceSpecificDetails : ApplianceSpecificDetails { /// - /// Initializes a new instance of the InMageRcmApplianceSpecificDetails - /// class. + /// Initializes a new instance of the InMageRcmApplianceSpecificDetails class. /// public InMageRcmApplianceSpecificDetails() { @@ -31,13 +22,15 @@ public InMageRcmApplianceSpecificDetails() } /// - /// Initializes a new instance of the InMageRcmApplianceSpecificDetails - /// class. + /// Initializes a new instance of the InMageRcmApplianceSpecificDetails class. /// - /// The list of appliances. - public InMageRcmApplianceSpecificDetails(IList appliances = default(IList)) + + /// The list of appliances. + /// + public InMageRcmApplianceSpecificDetails(System.Collections.Generic.IList appliances = default(System.Collections.Generic.IList)) + { - Appliances = appliances; + this.Appliances = appliances; CustomInit(); } @@ -46,11 +39,11 @@ public InMageRcmApplianceSpecificDetails() /// partial void CustomInit(); + /// /// Gets the list of appliances. /// - [JsonProperty(PropertyName = "appliances")] - public IList Appliances { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "appliances")] + public System.Collections.Generic.IList Appliances {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplyRecoveryPointInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplyRecoveryPointInput.cs index 770812983675..9dfe9e1e22d1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplyRecoveryPointInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmApplyRecoveryPointInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmApplyRecoveryPointInput : ApplyRecoveryPointProviderSpecificInput { /// - /// Initializes a new instance of the InMageRcmApplyRecoveryPointInput - /// class. + /// Initializes a new instance of the InMageRcmApplyRecoveryPointInput class. /// public InMageRcmApplyRecoveryPointInput() { @@ -30,13 +22,15 @@ public InMageRcmApplyRecoveryPointInput() } /// - /// Initializes a new instance of the InMageRcmApplyRecoveryPointInput - /// class. + /// Initializes a new instance of the InMageRcmApplyRecoveryPointInput class. /// - /// The recovery point Id. + + /// The recovery point Id. + /// public InMageRcmApplyRecoveryPointInput(string recoveryPointId) + { - RecoveryPointId = recoveryPointId; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -45,24 +39,25 @@ public InMageRcmApplyRecoveryPointInput(string recoveryPointId) /// partial void CustomInit(); + /// /// Gets or sets the recovery point Id. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryPointId == null) + if (this.RecoveryPointId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryPointId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryPointId"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDiscoveredProtectedVmDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDiscoveredProtectedVmDetails.cs index 218bf7cbf6eb..1be1b9863315 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDiscoveredProtectedVmDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDiscoveredProtectedVmDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmDiscoveredProtectedVmDetails { /// - /// Initializes a new instance of the - /// InMageRcmDiscoveredProtectedVmDetails class. + /// Initializes a new instance of the InMageRcmDiscoveredProtectedVmDetails class. /// public InMageRcmDiscoveredProtectedVmDetails() { @@ -30,37 +21,59 @@ public InMageRcmDiscoveredProtectedVmDetails() } /// - /// Initializes a new instance of the - /// InMageRcmDiscoveredProtectedVmDetails class. + /// Initializes a new instance of the InMageRcmDiscoveredProtectedVmDetails class. /// - /// The VCenter Id. - /// The VCenter fqdn. - /// The list of datastores. - /// The list of IP addresses. - /// The VMware tools status. - /// The VM power status. - /// The VM fqdn. - /// The VM's OS name. - /// The SDS created timestamp. - /// The SDS updated timestamp. - /// A value indicating whether the VM is - /// deleted. - /// The last time when SDS - /// information discovered in SRS. - public InMageRcmDiscoveredProtectedVmDetails(string vCenterId = default(string), string vCenterFqdn = default(string), IList datastores = default(IList), IList ipAddresses = default(IList), string vmwareToolsStatus = default(string), string powerStatus = default(string), string vmFqdn = default(string), string osName = default(string), System.DateTime? createdTimestamp = default(System.DateTime?), System.DateTime? updatedTimestamp = default(System.DateTime?), bool? isDeleted = default(bool?), System.DateTime? lastDiscoveryTimeInUtc = default(System.DateTime?)) + + /// The VCenter Id. + /// + + /// The VCenter fqdn. + /// + + /// The list of datastores. + /// + + /// The list of IP addresses. + /// + + /// The VMware tools status. + /// + + /// The VM power status. + /// + + /// The VM fqdn. + /// + + /// The VM's OS name. + /// + + /// The SDS created timestamp. + /// + + /// The SDS updated timestamp. + /// + + /// A value indicating whether the VM is deleted. + /// + + /// The last time when SDS information discovered in SRS. + /// + public InMageRcmDiscoveredProtectedVmDetails(string vCenterId = default(string), string vCenterFqdn = default(string), System.Collections.Generic.IList datastores = default(System.Collections.Generic.IList), System.Collections.Generic.IList ipAddresses = default(System.Collections.Generic.IList), string vmwareToolsStatus = default(string), string powerStatus = default(string), string vmFqdn = default(string), string osName = default(string), System.DateTime? createdTimestamp = default(System.DateTime?), System.DateTime? updatedTimestamp = default(System.DateTime?), bool? isDeleted = default(bool?), System.DateTime? lastDiscoveryTimeInUtc = default(System.DateTime?)) + { - VCenterId = vCenterId; - VCenterFqdn = vCenterFqdn; - Datastores = datastores; - IpAddresses = ipAddresses; - VmwareToolsStatus = vmwareToolsStatus; - PowerStatus = powerStatus; - VmFqdn = vmFqdn; - OsName = osName; - CreatedTimestamp = createdTimestamp; - UpdatedTimestamp = updatedTimestamp; - IsDeleted = isDeleted; - LastDiscoveryTimeInUtc = lastDiscoveryTimeInUtc; + this.VCenterId = vCenterId; + this.VCenterFqdn = vCenterFqdn; + this.Datastores = datastores; + this.IPAddresses = ipAddresses; + this.VmwareToolsStatus = vmwareToolsStatus; + this.PowerStatus = powerStatus; + this.VMFqdn = vmFqdn; + this.OSName = osName; + this.CreatedTimestamp = createdTimestamp; + this.UpdatedTimestamp = updatedTimestamp; + this.IsDeleted = isDeleted; + this.LastDiscoveryTimeInUtc = lastDiscoveryTimeInUtc; CustomInit(); } @@ -69,77 +82,77 @@ public InMageRcmDiscoveredProtectedVmDetails() /// partial void CustomInit(); + /// /// Gets the VCenter Id. /// - [JsonProperty(PropertyName = "vCenterId")] - public string VCenterId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vCenterId")] + public string VCenterId {get; private set; } /// /// Gets the VCenter fqdn. /// - [JsonProperty(PropertyName = "vCenterFqdn")] - public string VCenterFqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vCenterFqdn")] + public string VCenterFqdn {get; private set; } /// /// Gets the list of datastores. /// - [JsonProperty(PropertyName = "datastores")] - public IList Datastores { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datastores")] + public System.Collections.Generic.IList Datastores {get; private set; } /// /// Gets the list of IP addresses. /// - [JsonProperty(PropertyName = "ipAddresses")] - public IList IpAddresses { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddresses")] + public System.Collections.Generic.IList IPAddresses {get; private set; } /// /// Gets the VMware tools status. /// - [JsonProperty(PropertyName = "vmwareToolsStatus")] - public string VmwareToolsStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareToolsStatus")] + public string VmwareToolsStatus {get; private set; } /// /// Gets the VM power status. /// - [JsonProperty(PropertyName = "powerStatus")] - public string PowerStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "powerStatus")] + public string PowerStatus {get; private set; } /// /// Gets the VM fqdn. /// - [JsonProperty(PropertyName = "vmFqdn")] - public string VmFqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmFqdn")] + public string VMFqdn {get; private set; } /// - /// Gets the VM's OS name. + /// Gets the VM's OS name. /// - [JsonProperty(PropertyName = "osName")] - public string OsName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osName")] + public string OSName {get; private set; } /// /// Gets the SDS created timestamp. /// - [JsonProperty(PropertyName = "createdTimestamp")] - public System.DateTime? CreatedTimestamp { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTimestamp")] + public System.DateTime? CreatedTimestamp {get; private set; } /// /// Gets the SDS updated timestamp. /// - [JsonProperty(PropertyName = "updatedTimestamp")] - public System.DateTime? UpdatedTimestamp { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "updatedTimestamp")] + public System.DateTime? UpdatedTimestamp {get; private set; } /// /// Gets a value indicating whether the VM is deleted. /// - [JsonProperty(PropertyName = "isDeleted")] - public bool? IsDeleted { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isDeleted")] + public bool? IsDeleted {get; private set; } /// /// Gets the last time when SDS information discovered in SRS. /// - [JsonProperty(PropertyName = "lastDiscoveryTimeInUtc")] - public System.DateTime? LastDiscoveryTimeInUtc { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lastDiscoveryTimeInUtc")] + public System.DateTime? LastDiscoveryTimeInUtc {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDiskInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDiskInput.cs index 7bf3c16d574b..d256ec5c59c9 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDiskInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDiskInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,19 +23,25 @@ public InMageRcmDiskInput() /// /// Initializes a new instance of the InMageRcmDiskInput class. /// - /// The disk Id. - /// The log storage account ARM - /// Id. - /// The disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - /// The DiskEncryptionSet ARM - /// Id. + + /// The disk Id. + /// + + /// The log storage account ARM Id. + /// + + /// The disk type. + /// Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + + /// The DiskEncryptionSet ARM Id. + /// public InMageRcmDiskInput(string diskId, string logStorageAccountId, string diskType, string diskEncryptionSetId = default(string)) + { - DiskId = diskId; - LogStorageAccountId = logStorageAccountId; - DiskType = diskType; - DiskEncryptionSetId = diskEncryptionSetId; + this.DiskId = diskId; + this.LogStorageAccountId = logStorageAccountId; + this.DiskType = diskType; + this.DiskEncryptionSetId = diskEncryptionSetId; CustomInit(); } @@ -51,51 +50,54 @@ public InMageRcmDiskInput() /// partial void CustomInit(); + /// /// Gets or sets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the log storage account ARM Id. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } /// - /// Gets or sets the disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + /// Gets or sets the disk type. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// /// Gets or sets the DiskEncryptionSet ARM Id. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (DiskId == null) + if (this.DiskId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskId"); } - if (LogStorageAccountId == null) + if (this.LogStorageAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "LogStorageAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "LogStorageAccountId"); } - if (DiskType == null) + if (this.DiskType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskType"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDisksDefaultInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDisksDefaultInput.cs index 19682c54ddda..3f59830e81e3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDisksDefaultInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmDisksDefaultInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,17 +23,21 @@ public InMageRcmDisksDefaultInput() /// /// Initializes a new instance of the InMageRcmDisksDefaultInput class. /// - /// The log storage account ARM - /// Id. - /// The disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - /// The DiskEncryptionSet ARM - /// Id. + + /// The log storage account ARM Id. + /// + + /// The disk type. + /// Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + + /// The DiskEncryptionSet ARM Id. + /// public InMageRcmDisksDefaultInput(string logStorageAccountId, string diskType, string diskEncryptionSetId = default(string)) + { - LogStorageAccountId = logStorageAccountId; - DiskType = diskType; - DiskEncryptionSetId = diskEncryptionSetId; + this.LogStorageAccountId = logStorageAccountId; + this.DiskType = diskType; + this.DiskEncryptionSetId = diskEncryptionSetId; CustomInit(); } @@ -49,41 +46,43 @@ public InMageRcmDisksDefaultInput() /// partial void CustomInit(); + /// /// Gets or sets the log storage account ARM Id. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } /// - /// Gets or sets the disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + /// Gets or sets the disk type. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// /// Gets or sets the DiskEncryptionSet ARM Id. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (LogStorageAccountId == null) + if (this.LogStorageAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "LogStorageAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "LogStorageAccountId"); } - if (DiskType == null) + if (this.DiskType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskType"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmEnableProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmEnableProtectionInput.cs index 81207e8184ce..7cf713580568 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmEnableProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmEnableProtectionInput.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmEnableProtectionInput : EnableProtectionProviderSpecificInput { /// - /// Initializes a new instance of the InMageRcmEnableProtectionInput - /// class. + /// Initializes a new instance of the InMageRcmEnableProtectionInput class. /// public InMageRcmEnableProtectionInput() { @@ -32,57 +22,83 @@ public InMageRcmEnableProtectionInput() } /// - /// Initializes a new instance of the InMageRcmEnableProtectionInput - /// class. - /// - /// The ARM Id of discovered - /// machine. - /// The target resource group ARM - /// Id. - /// The process server Id. - /// The disks to include list. - /// The default disk input. - /// The selected target network ARM - /// Id. - /// The selected test network ARM - /// Id. - /// The selected target subnet - /// name. - /// The selected test subnet name. - /// The target VM name. - /// The target VM size. - /// The license type. Possible values - /// include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' - /// The target availability set - /// ARM Id. - /// The target availability - /// zone. - /// The target proximity - /// placement group Id. - /// The target boot - /// diagnostics storage account ARM Id. - /// The run-as account Id. - /// The multi VM group name. - public InMageRcmEnableProtectionInput(string fabricDiscoveryMachineId, string targetResourceGroupId, string processServerId, IList disksToInclude = default(IList), InMageRcmDisksDefaultInput disksDefault = default(InMageRcmDisksDefaultInput), string targetNetworkId = default(string), string testNetworkId = default(string), string targetSubnetName = default(string), string testSubnetName = default(string), string targetVmName = default(string), string targetVmSize = default(string), string licenseType = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string runAsAccountId = default(string), string multiVmGroupName = default(string)) + /// Initializes a new instance of the InMageRcmEnableProtectionInput class. + /// + + /// The ARM Id of discovered machine. + /// + + /// The disks to include list. + /// + + /// The default disk input. + /// + + /// The target resource group ARM Id. + /// + + /// The selected target network ARM Id. + /// + + /// The selected test network ARM Id. + /// + + /// The selected target subnet name. + /// + + /// The selected test subnet name. + /// + + /// The target VM name. + /// + + /// The target VM size. + /// + + /// The license type. + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' + + /// The target availability set ARM Id. + /// + + /// The target availability zone. + /// + + /// The target proximity placement group Id. + /// + + /// The target boot diagnostics storage account ARM Id. + /// + + /// The run-as account Id. + /// + + /// The process server Id. + /// + + /// The multi VM group name. + /// + public InMageRcmEnableProtectionInput(string fabricDiscoveryMachineId, string targetResourceGroupId, string processServerId, System.Collections.Generic.IList disksToInclude = default(System.Collections.Generic.IList), InMageRcmDisksDefaultInput disksDefault = default(InMageRcmDisksDefaultInput), string targetNetworkId = default(string), string testNetworkId = default(string), string targetSubnetName = default(string), string testSubnetName = default(string), string targetVMName = default(string), string targetVMSize = default(string), string licenseType = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string runAsAccountId = default(string), string multiVMGroupName = default(string)) + { - FabricDiscoveryMachineId = fabricDiscoveryMachineId; - DisksToInclude = disksToInclude; - DisksDefault = disksDefault; - TargetResourceGroupId = targetResourceGroupId; - TargetNetworkId = targetNetworkId; - TestNetworkId = testNetworkId; - TargetSubnetName = targetSubnetName; - TestSubnetName = testSubnetName; - TargetVmName = targetVmName; - TargetVmSize = targetVmSize; - LicenseType = licenseType; - TargetAvailabilitySetId = targetAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - RunAsAccountId = runAsAccountId; - ProcessServerId = processServerId; - MultiVmGroupName = multiVmGroupName; + this.FabricDiscoveryMachineId = fabricDiscoveryMachineId; + this.DisksToInclude = disksToInclude; + this.DisksDefault = disksDefault; + this.TargetResourceGroupId = targetResourceGroupId; + this.TargetNetworkId = targetNetworkId; + this.TestNetworkId = testNetworkId; + this.TargetSubnetName = targetSubnetName; + this.TestSubnetName = testSubnetName; + this.TargetVMName = targetVMName; + this.TargetVMSize = targetVMSize; + this.LicenseType = licenseType; + this.TargetAvailabilitySetId = targetAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; + this.RunAsAccountId = runAsAccountId; + this.ProcessServerId = processServerId; + this.MultiVMGroupName = multiVMGroupName; CustomInit(); } @@ -91,138 +107,138 @@ public InMageRcmEnableProtectionInput() /// partial void CustomInit(); + /// /// Gets or sets the ARM Id of discovered machine. /// - [JsonProperty(PropertyName = "fabricDiscoveryMachineId")] - public string FabricDiscoveryMachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricDiscoveryMachineId")] + public string FabricDiscoveryMachineId {get; set; } /// /// Gets or sets the disks to include list. /// - [JsonProperty(PropertyName = "disksToInclude")] - public IList DisksToInclude { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "disksToInclude")] + public System.Collections.Generic.IList DisksToInclude {get; set; } /// /// Gets or sets the default disk input. /// - [JsonProperty(PropertyName = "disksDefault")] - public InMageRcmDisksDefaultInput DisksDefault { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "disksDefault")] + public InMageRcmDisksDefaultInput DisksDefault {get; set; } /// /// Gets or sets the target resource group ARM Id. /// - [JsonProperty(PropertyName = "targetResourceGroupId")] - public string TargetResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroupId")] + public string TargetResourceGroupId {get; set; } /// /// Gets or sets the selected target network ARM Id. /// - [JsonProperty(PropertyName = "targetNetworkId")] - public string TargetNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNetworkId")] + public string TargetNetworkId {get; set; } /// /// Gets or sets the selected test network ARM Id. /// - [JsonProperty(PropertyName = "testNetworkId")] - public string TestNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testNetworkId")] + public string TestNetworkId {get; set; } /// /// Gets or sets the selected target subnet name. /// - [JsonProperty(PropertyName = "targetSubnetName")] - public string TargetSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetSubnetName")] + public string TargetSubnetName {get; set; } /// /// Gets or sets the selected test subnet name. /// - [JsonProperty(PropertyName = "testSubnetName")] - public string TestSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testSubnetName")] + public string TestSubnetName {get; set; } /// /// Gets or sets the target VM name. /// - [JsonProperty(PropertyName = "targetVmName")] - public string TargetVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmName")] + public string TargetVMName {get; set; } /// /// Gets or sets the target VM size. /// - [JsonProperty(PropertyName = "targetVmSize")] - public string TargetVmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSize")] + public string TargetVMSize {get; set; } /// - /// Gets or sets the license type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'WindowsServer' + /// Gets or sets the license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// /// Gets or sets the target availability set ARM Id. /// - [JsonProperty(PropertyName = "targetAvailabilitySetId")] - public string TargetAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilitySetId")] + public string TargetAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target proximity placement group Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// /// Gets or sets the target boot diagnostics storage account ARM Id. /// - [JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] - public string TargetBootDiagnosticsStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] + public string TargetBootDiagnosticsStorageAccountId {get; set; } /// /// Gets or sets the run-as account Id. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } /// /// Gets or sets the process server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the multi VM group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (FabricDiscoveryMachineId == null) + if (this.FabricDiscoveryMachineId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FabricDiscoveryMachineId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FabricDiscoveryMachineId"); } - if (TargetResourceGroupId == null) + if (this.TargetResourceGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetResourceGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetResourceGroupId"); } - if (ProcessServerId == null) + if (this.ProcessServerId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProcessServerId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProcessServerId"); } - if (DisksToInclude != null) + + if (this.DisksToInclude != null) { - foreach (var element in DisksToInclude) + foreach (var element in this.DisksToInclude) { if (element != null) { @@ -230,10 +246,25 @@ public virtual void Validate() } } } - if (DisksDefault != null) + if (this.DisksDefault != null) { - DisksDefault.Validate(); + this.DisksDefault.Validate(); } + + + + + + + + + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmEventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmEventDetails.cs index ac83cb83f888..955dba5dc293 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmEventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmEventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,25 +24,41 @@ public InMageRcmEventDetails() /// /// Initializes a new instance of the InMageRcmEventDetails class. /// - /// The protected item name. - /// The protected item name. - /// The latest agent version. - /// The job Id. - /// The fabric name. - /// The appliance name. - /// The server type. - /// The component display - /// name. + + /// The protected item name. + /// + + /// The protected item name. + /// + + /// The latest agent version. + /// + + /// The job Id. + /// + + /// The fabric name. + /// + + /// The appliance name. + /// + + /// The server type. + /// + + /// The component display name. + /// public InMageRcmEventDetails(string protectedItemName = default(string), string vmName = default(string), string latestAgentVersion = default(string), string jobId = default(string), string fabricName = default(string), string applianceName = default(string), string serverType = default(string), string componentDisplayName = default(string)) + { - ProtectedItemName = protectedItemName; - VmName = vmName; - LatestAgentVersion = latestAgentVersion; - JobId = jobId; - FabricName = fabricName; - ApplianceName = applianceName; - ServerType = serverType; - ComponentDisplayName = componentDisplayName; + this.ProtectedItemName = protectedItemName; + this.VMName = vmName; + this.LatestAgentVersion = latestAgentVersion; + this.JobId = jobId; + this.FabricName = fabricName; + this.ApplianceName = applianceName; + this.ServerType = serverType; + this.ComponentDisplayName = componentDisplayName; CustomInit(); } @@ -57,53 +67,53 @@ public InMageRcmEventDetails() /// partial void CustomInit(); + /// /// Gets the protected item name. /// - [JsonProperty(PropertyName = "protectedItemName")] - public string ProtectedItemName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemName")] + public string ProtectedItemName {get; private set; } /// /// Gets the protected item name. /// - [JsonProperty(PropertyName = "vmName")] - public string VmName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmName")] + public string VMName {get; private set; } /// /// Gets the latest agent version. /// - [JsonProperty(PropertyName = "latestAgentVersion")] - public string LatestAgentVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "latestAgentVersion")] + public string LatestAgentVersion {get; private set; } /// /// Gets the job Id. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; private set; } /// /// Gets the fabric name. /// - [JsonProperty(PropertyName = "fabricName")] - public string FabricName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricName")] + public string FabricName {get; private set; } /// /// Gets the appliance name. /// - [JsonProperty(PropertyName = "applianceName")] - public string ApplianceName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applianceName")] + public string ApplianceName {get; private set; } /// /// Gets the server type. /// - [JsonProperty(PropertyName = "serverType")] - public string ServerType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serverType")] + public string ServerType {get; private set; } /// /// Gets the component display name. /// - [JsonProperty(PropertyName = "componentDisplayName")] - public string ComponentDisplayName { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "componentDisplayName")] + public string ComponentDisplayName {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricCreationInput.cs index 8ee5e4f8b7d8..c4b11aac1a2a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricCreationInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFabricCreationInput : FabricSpecificCreationInput { /// - /// Initializes a new instance of the InMageRcmFabricCreationInput - /// class. + /// Initializes a new instance of the InMageRcmFabricCreationInput class. /// public InMageRcmFabricCreationInput() { @@ -30,19 +22,23 @@ public InMageRcmFabricCreationInput() } /// - /// Initializes a new instance of the InMageRcmFabricCreationInput - /// class. + /// Initializes a new instance of the InMageRcmFabricCreationInput class. /// - /// The ARM Id of the VMware site. - /// The ARM Id of the physical - /// site. - /// The identity provider input for - /// source agent authentication. + + /// The ARM Id of the VMware site. + /// + + /// The ARM Id of the physical site. + /// + + /// The identity provider input for source agent authentication. + /// public InMageRcmFabricCreationInput(string vmwareSiteId, string physicalSiteId, IdentityProviderInput sourceAgentIdentity) + { - VmwareSiteId = vmwareSiteId; - PhysicalSiteId = physicalSiteId; - SourceAgentIdentity = sourceAgentIdentity; + this.VmwareSiteId = vmwareSiteId; + this.PhysicalSiteId = physicalSiteId; + this.SourceAgentIdentity = sourceAgentIdentity; CustomInit(); } @@ -51,49 +47,50 @@ public InMageRcmFabricCreationInput(string vmwareSiteId, string physicalSiteId, /// partial void CustomInit(); + /// /// Gets or sets the ARM Id of the VMware site. /// - [JsonProperty(PropertyName = "vmwareSiteId")] - public string VmwareSiteId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareSiteId")] + public string VmwareSiteId {get; set; } /// /// Gets or sets the ARM Id of the physical site. /// - [JsonProperty(PropertyName = "physicalSiteId")] - public string PhysicalSiteId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "physicalSiteId")] + public string PhysicalSiteId {get; set; } /// - /// Gets or sets the identity provider input for source agent - /// authentication. + /// Gets or sets the identity provider input for source agent authentication. /// - [JsonProperty(PropertyName = "sourceAgentIdentity")] - public IdentityProviderInput SourceAgentIdentity { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceAgentIdentity")] + public IdentityProviderInput SourceAgentIdentity {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (VmwareSiteId == null) + if (this.VmwareSiteId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "VmwareSiteId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "VmwareSiteId"); } - if (PhysicalSiteId == null) + if (this.PhysicalSiteId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PhysicalSiteId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PhysicalSiteId"); } - if (SourceAgentIdentity == null) + if (this.SourceAgentIdentity == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "SourceAgentIdentity"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SourceAgentIdentity"); } - if (SourceAgentIdentity != null) + + + if (this.SourceAgentIdentity != null) { - SourceAgentIdentity.Validate(); + this.SourceAgentIdentity.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricSpecificDetails.cs index 22e1b9e924a6..5237c66a5b77 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricSpecificDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFabricSpecificDetails : FabricSpecificDetails { /// - /// Initializes a new instance of the InMageRcmFabricSpecificDetails - /// class. + /// Initializes a new instance of the InMageRcmFabricSpecificDetails class. /// public InMageRcmFabricSpecificDetails() { @@ -31,46 +22,75 @@ public InMageRcmFabricSpecificDetails() } /// - /// Initializes a new instance of the InMageRcmFabricSpecificDetails - /// class. - /// - /// The ARM Id of the VMware site. - /// The ARM Id of the physical - /// site. - /// The service endpoint. - /// The service resource Id. - /// The service container Id. - /// The data plane Uri. - /// The control plane Uri. - /// The source agent identity - /// details. - /// The list of process servers. - /// The list of RCM proxies. - /// The list of push installers. - /// The list of replication - /// agents. - /// The list of reprotect agents. - /// The list of Mars agents. - /// The list of DRAs. - /// The list of agent details. - public InMageRcmFabricSpecificDetails(string vmwareSiteId = default(string), string physicalSiteId = default(string), string serviceEndpoint = default(string), string serviceResourceId = default(string), string serviceContainerId = default(string), string dataPlaneUri = default(string), string controlPlaneUri = default(string), IdentityProviderDetails sourceAgentIdentityDetails = default(IdentityProviderDetails), IList processServers = default(IList), IList rcmProxies = default(IList), IList pushInstallers = default(IList), IList replicationAgents = default(IList), IList reprotectAgents = default(IList), IList marsAgents = default(IList), IList dras = default(IList), IList agentDetails = default(IList)) + /// Initializes a new instance of the InMageRcmFabricSpecificDetails class. + /// + + /// The ARM Id of the VMware site. + /// + + /// The ARM Id of the physical site. + /// + + /// The service endpoint. + /// + + /// The service resource Id. + /// + + /// The service container Id. + /// + + /// The data plane Uri. + /// + + /// The control plane Uri. + /// + + /// The source agent identity details. + /// + + /// The list of process servers. + /// + + /// The list of RCM proxies. + /// + + /// The list of push installers. + /// + + /// The list of replication agents. + /// + + /// The list of reprotect agents. + /// + + /// The list of Mars agents. + /// + + /// The list of DRAs. + /// + + /// The list of agent details. + /// + public InMageRcmFabricSpecificDetails(string vmwareSiteId = default(string), string physicalSiteId = default(string), string serviceEndpoint = default(string), string serviceResourceId = default(string), string serviceContainerId = default(string), string dataPlaneUri = default(string), string controlPlaneUri = default(string), IdentityProviderDetails sourceAgentIdentityDetails = default(IdentityProviderDetails), System.Collections.Generic.IList processServers = default(System.Collections.Generic.IList), System.Collections.Generic.IList rcmProxies = default(System.Collections.Generic.IList), System.Collections.Generic.IList pushInstallers = default(System.Collections.Generic.IList), System.Collections.Generic.IList replicationAgents = default(System.Collections.Generic.IList), System.Collections.Generic.IList reprotectAgents = default(System.Collections.Generic.IList), System.Collections.Generic.IList marsAgents = default(System.Collections.Generic.IList), System.Collections.Generic.IList dras = default(System.Collections.Generic.IList), System.Collections.Generic.IList agentDetails = default(System.Collections.Generic.IList)) + { - VmwareSiteId = vmwareSiteId; - PhysicalSiteId = physicalSiteId; - ServiceEndpoint = serviceEndpoint; - ServiceResourceId = serviceResourceId; - ServiceContainerId = serviceContainerId; - DataPlaneUri = dataPlaneUri; - ControlPlaneUri = controlPlaneUri; - SourceAgentIdentityDetails = sourceAgentIdentityDetails; - ProcessServers = processServers; - RcmProxies = rcmProxies; - PushInstallers = pushInstallers; - ReplicationAgents = replicationAgents; - ReprotectAgents = reprotectAgents; - MarsAgents = marsAgents; - Dras = dras; - AgentDetails = agentDetails; + this.VmwareSiteId = vmwareSiteId; + this.PhysicalSiteId = physicalSiteId; + this.ServiceEndpoint = serviceEndpoint; + this.ServiceResourceId = serviceResourceId; + this.ServiceContainerId = serviceContainerId; + this.DataPlaneUri = dataPlaneUri; + this.ControlPlaneUri = controlPlaneUri; + this.SourceAgentIdentityDetails = sourceAgentIdentityDetails; + this.ProcessServers = processServers; + this.RcmProxies = rcmProxies; + this.PushInstallers = pushInstallers; + this.ReplicationAgents = replicationAgents; + this.ReprotectAgents = reprotectAgents; + this.MarsAgents = marsAgents; + this.Dras = dras; + this.AgentDetails = agentDetails; CustomInit(); } @@ -79,101 +99,101 @@ public InMageRcmFabricSpecificDetails() /// partial void CustomInit(); + /// /// Gets the ARM Id of the VMware site. /// - [JsonProperty(PropertyName = "vmwareSiteId")] - public string VmwareSiteId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareSiteId")] + public string VmwareSiteId {get; private set; } /// /// Gets the ARM Id of the physical site. /// - [JsonProperty(PropertyName = "physicalSiteId")] - public string PhysicalSiteId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "physicalSiteId")] + public string PhysicalSiteId {get; private set; } /// /// Gets the service endpoint. /// - [JsonProperty(PropertyName = "serviceEndpoint")] - public string ServiceEndpoint { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceEndpoint")] + public string ServiceEndpoint {get; private set; } /// /// Gets the service resource Id. /// - [JsonProperty(PropertyName = "serviceResourceId")] - public string ServiceResourceId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceResourceId")] + public string ServiceResourceId {get; private set; } /// /// Gets the service container Id. /// - [JsonProperty(PropertyName = "serviceContainerId")] - public string ServiceContainerId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceContainerId")] + public string ServiceContainerId {get; private set; } /// /// Gets the data plane Uri. /// - [JsonProperty(PropertyName = "dataPlaneUri")] - public string DataPlaneUri { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPlaneUri")] + public string DataPlaneUri {get; private set; } /// /// Gets the control plane Uri. /// - [JsonProperty(PropertyName = "controlPlaneUri")] - public string ControlPlaneUri { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "controlPlaneUri")] + public string ControlPlaneUri {get; private set; } /// /// Gets or sets the source agent identity details. /// - [JsonProperty(PropertyName = "sourceAgentIdentityDetails")] - public IdentityProviderDetails SourceAgentIdentityDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceAgentIdentityDetails")] + public IdentityProviderDetails SourceAgentIdentityDetails {get; set; } /// /// Gets the list of process servers. /// - [JsonProperty(PropertyName = "processServers")] - public IList ProcessServers { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServers")] + public System.Collections.Generic.IList ProcessServers {get; private set; } /// /// Gets the list of RCM proxies. /// - [JsonProperty(PropertyName = "rcmProxies")] - public IList RcmProxies { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rcmProxies")] + public System.Collections.Generic.IList RcmProxies {get; private set; } /// /// Gets the list of push installers. /// - [JsonProperty(PropertyName = "pushInstallers")] - public IList PushInstallers { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "pushInstallers")] + public System.Collections.Generic.IList PushInstallers {get; private set; } /// /// Gets the list of replication agents. /// - [JsonProperty(PropertyName = "replicationAgents")] - public IList ReplicationAgents { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationAgents")] + public System.Collections.Generic.IList ReplicationAgents {get; private set; } /// /// Gets the list of reprotect agents. /// - [JsonProperty(PropertyName = "reprotectAgents")] - public IList ReprotectAgents { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reprotectAgents")] + public System.Collections.Generic.IList ReprotectAgents {get; private set; } /// /// Gets the list of Mars agents. /// - [JsonProperty(PropertyName = "marsAgents")] - public IList MarsAgents { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "marsAgents")] + public System.Collections.Generic.IList MarsAgents {get; private set; } /// /// Gets the list of DRAs. /// - [JsonProperty(PropertyName = "dras")] - public IList Dras { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dras")] + public System.Collections.Generic.IList Dras {get; private set; } /// /// Gets the list of agent details. /// - [JsonProperty(PropertyName = "agentDetails")] - public IList AgentDetails { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "agentDetails")] + public System.Collections.Generic.IList AgentDetails {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricSwitchProviderBlockingErrorDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricSwitchProviderBlockingErrorDetails.cs index d20021ae2ca2..ba2c246fa85c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricSwitchProviderBlockingErrorDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFabricSwitchProviderBlockingErrorDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFabricSwitchProviderBlockingErrorDetails { /// - /// Initializes a new instance of the - /// InMageRcmFabricSwitchProviderBlockingErrorDetails class. + /// Initializes a new instance of the InMageRcmFabricSwitchProviderBlockingErrorDetails class. /// public InMageRcmFabricSwitchProviderBlockingErrorDetails() { @@ -30,24 +21,35 @@ public InMageRcmFabricSwitchProviderBlockingErrorDetails() } /// - /// Initializes a new instance of the - /// InMageRcmFabricSwitchProviderBlockingErrorDetails class. + /// Initializes a new instance of the InMageRcmFabricSwitchProviderBlockingErrorDetails class. /// - /// The error code. - /// The error message. - /// The possible causes. - /// The recommended action. - /// The error message - /// parameters. - /// The error tags. - public InMageRcmFabricSwitchProviderBlockingErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), IDictionary errorMessageParameters = default(IDictionary), IDictionary errorTags = default(IDictionary)) + + /// The error code. + /// + + /// The error message. + /// + + /// The possible causes. + /// + + /// The recommended action. + /// + + /// The error message parameters. + /// + + /// The error tags. + /// + public InMageRcmFabricSwitchProviderBlockingErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), System.Collections.Generic.IDictionary errorMessageParameters = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary errorTags = default(System.Collections.Generic.IDictionary)) + { - ErrorCode = errorCode; - ErrorMessage = errorMessage; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - ErrorMessageParameters = errorMessageParameters; - ErrorTags = errorTags; + this.ErrorCode = errorCode; + this.ErrorMessage = errorMessage; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.ErrorMessageParameters = errorMessageParameters; + this.ErrorTags = errorTags; CustomInit(); } @@ -56,41 +58,41 @@ public InMageRcmFabricSwitchProviderBlockingErrorDetails() /// partial void CustomInit(); + /// /// Gets the error code. /// - [JsonProperty(PropertyName = "errorCode")] - public string ErrorCode { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public string ErrorCode {get; private set; } /// /// Gets the error message. /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; private set; } /// /// Gets the possible causes. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; private set; } /// /// Gets the recommended action. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; private set; } /// /// Gets the error message parameters. /// - [JsonProperty(PropertyName = "errorMessageParameters")] - public IDictionary ErrorMessageParameters { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessageParameters")] + public System.Collections.Generic.IDictionary ErrorMessageParameters {get; private set; } /// /// Gets the error tags. /// - [JsonProperty(PropertyName = "errorTags")] - public IDictionary ErrorTags { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "errorTags")] + public System.Collections.Generic.IDictionary ErrorTags {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackDiscoveredProtectedVmDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackDiscoveredProtectedVmDetails.cs index fad3977729ca..5794cfb01e27 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackDiscoveredProtectedVmDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackDiscoveredProtectedVmDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackDiscoveredProtectedVmDetails { /// - /// Initializes a new instance of the - /// InMageRcmFailbackDiscoveredProtectedVmDetails class. + /// Initializes a new instance of the InMageRcmFailbackDiscoveredProtectedVmDetails class. /// public InMageRcmFailbackDiscoveredProtectedVmDetails() { @@ -30,37 +21,59 @@ public InMageRcmFailbackDiscoveredProtectedVmDetails() } /// - /// Initializes a new instance of the - /// InMageRcmFailbackDiscoveredProtectedVmDetails class. + /// Initializes a new instance of the InMageRcmFailbackDiscoveredProtectedVmDetails class. /// - /// The VCenter Id. - /// The VCenter fqdn. - /// The list of datastores. - /// The list of IP addresses. - /// The VMware tools status. - /// The VM power status. - /// The VM fqdn. - /// The VM's OS name. - /// The SDS created timestamp. - /// The SDS updated timestamp. - /// A value indicating whether the VM is - /// deleted. - /// The last time when SDS - /// information discovered in SRS. - public InMageRcmFailbackDiscoveredProtectedVmDetails(string vCenterId = default(string), string vCenterFqdn = default(string), IList datastores = default(IList), IList ipAddresses = default(IList), string vmwareToolsStatus = default(string), string powerStatus = default(string), string vmFqdn = default(string), string osName = default(string), System.DateTime? createdTimestamp = default(System.DateTime?), System.DateTime? updatedTimestamp = default(System.DateTime?), bool? isDeleted = default(bool?), System.DateTime? lastDiscoveryTimeInUtc = default(System.DateTime?)) + + /// The VCenter Id. + /// + + /// The VCenter fqdn. + /// + + /// The list of datastores. + /// + + /// The list of IP addresses. + /// + + /// The VMware tools status. + /// + + /// The VM power status. + /// + + /// The VM fqdn. + /// + + /// The VM's OS name. + /// + + /// The SDS created timestamp. + /// + + /// The SDS updated timestamp. + /// + + /// A value indicating whether the VM is deleted. + /// + + /// The last time when SDS information discovered in SRS. + /// + public InMageRcmFailbackDiscoveredProtectedVmDetails(string vCenterId = default(string), string vCenterFqdn = default(string), System.Collections.Generic.IList datastores = default(System.Collections.Generic.IList), System.Collections.Generic.IList ipAddresses = default(System.Collections.Generic.IList), string vmwareToolsStatus = default(string), string powerStatus = default(string), string vmFqdn = default(string), string osName = default(string), System.DateTime? createdTimestamp = default(System.DateTime?), System.DateTime? updatedTimestamp = default(System.DateTime?), bool? isDeleted = default(bool?), System.DateTime? lastDiscoveryTimeInUtc = default(System.DateTime?)) + { - VCenterId = vCenterId; - VCenterFqdn = vCenterFqdn; - Datastores = datastores; - IpAddresses = ipAddresses; - VmwareToolsStatus = vmwareToolsStatus; - PowerStatus = powerStatus; - VmFqdn = vmFqdn; - OsName = osName; - CreatedTimestamp = createdTimestamp; - UpdatedTimestamp = updatedTimestamp; - IsDeleted = isDeleted; - LastDiscoveryTimeInUtc = lastDiscoveryTimeInUtc; + this.VCenterId = vCenterId; + this.VCenterFqdn = vCenterFqdn; + this.Datastores = datastores; + this.IPAddresses = ipAddresses; + this.VmwareToolsStatus = vmwareToolsStatus; + this.PowerStatus = powerStatus; + this.VMFqdn = vmFqdn; + this.OSName = osName; + this.CreatedTimestamp = createdTimestamp; + this.UpdatedTimestamp = updatedTimestamp; + this.IsDeleted = isDeleted; + this.LastDiscoveryTimeInUtc = lastDiscoveryTimeInUtc; CustomInit(); } @@ -69,77 +82,77 @@ public InMageRcmFailbackDiscoveredProtectedVmDetails() /// partial void CustomInit(); + /// /// Gets the VCenter Id. /// - [JsonProperty(PropertyName = "vCenterId")] - public string VCenterId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vCenterId")] + public string VCenterId {get; private set; } /// /// Gets the VCenter fqdn. /// - [JsonProperty(PropertyName = "vCenterFqdn")] - public string VCenterFqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vCenterFqdn")] + public string VCenterFqdn {get; private set; } /// /// Gets the list of datastores. /// - [JsonProperty(PropertyName = "datastores")] - public IList Datastores { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datastores")] + public System.Collections.Generic.IList Datastores {get; private set; } /// /// Gets the list of IP addresses. /// - [JsonProperty(PropertyName = "ipAddresses")] - public IList IpAddresses { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddresses")] + public System.Collections.Generic.IList IPAddresses {get; private set; } /// /// Gets the VMware tools status. /// - [JsonProperty(PropertyName = "vmwareToolsStatus")] - public string VmwareToolsStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareToolsStatus")] + public string VmwareToolsStatus {get; private set; } /// /// Gets the VM power status. /// - [JsonProperty(PropertyName = "powerStatus")] - public string PowerStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "powerStatus")] + public string PowerStatus {get; private set; } /// /// Gets the VM fqdn. /// - [JsonProperty(PropertyName = "vmFqdn")] - public string VmFqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmFqdn")] + public string VMFqdn {get; private set; } /// - /// Gets the VM's OS name. + /// Gets the VM's OS name. /// - [JsonProperty(PropertyName = "osName")] - public string OsName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osName")] + public string OSName {get; private set; } /// /// Gets the SDS created timestamp. /// - [JsonProperty(PropertyName = "createdTimestamp")] - public System.DateTime? CreatedTimestamp { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTimestamp")] + public System.DateTime? CreatedTimestamp {get; private set; } /// /// Gets the SDS updated timestamp. /// - [JsonProperty(PropertyName = "updatedTimestamp")] - public System.DateTime? UpdatedTimestamp { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "updatedTimestamp")] + public System.DateTime? UpdatedTimestamp {get; private set; } /// /// Gets a value indicating whether the VM is deleted. /// - [JsonProperty(PropertyName = "isDeleted")] - public bool? IsDeleted { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isDeleted")] + public bool? IsDeleted {get; private set; } /// /// Gets the last time when SDS information discovered in SRS. /// - [JsonProperty(PropertyName = "lastDiscoveryTimeInUtc")] - public System.DateTime? LastDiscoveryTimeInUtc { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lastDiscoveryTimeInUtc")] + public System.DateTime? LastDiscoveryTimeInUtc {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackEventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackEventDetails.cs index ff5ba0ba19c8..71fd716d76c0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackEventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackEventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackEventDetails : EventProviderSpecificDetails { /// - /// Initializes a new instance of the InMageRcmFailbackEventDetails - /// class. + /// Initializes a new instance of the InMageRcmFailbackEventDetails class. /// public InMageRcmFailbackEventDetails() { @@ -29,22 +22,31 @@ public InMageRcmFailbackEventDetails() } /// - /// Initializes a new instance of the InMageRcmFailbackEventDetails - /// class. + /// Initializes a new instance of the InMageRcmFailbackEventDetails class. /// - /// The protected item name. - /// The protected item name. - /// The appliance name. - /// The server type. - /// The component display - /// name. + + /// The protected item name. + /// + + /// The protected item name. + /// + + /// The appliance name. + /// + + /// The server type. + /// + + /// The component display name. + /// public InMageRcmFailbackEventDetails(string protectedItemName = default(string), string vmName = default(string), string applianceName = default(string), string serverType = default(string), string componentDisplayName = default(string)) + { - ProtectedItemName = protectedItemName; - VmName = vmName; - ApplianceName = applianceName; - ServerType = serverType; - ComponentDisplayName = componentDisplayName; + this.ProtectedItemName = protectedItemName; + this.VMName = vmName; + this.ApplianceName = applianceName; + this.ServerType = serverType; + this.ComponentDisplayName = componentDisplayName; CustomInit(); } @@ -53,35 +55,35 @@ public InMageRcmFailbackEventDetails() /// partial void CustomInit(); + /// /// Gets the protected item name. /// - [JsonProperty(PropertyName = "protectedItemName")] - public string ProtectedItemName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemName")] + public string ProtectedItemName {get; private set; } /// /// Gets the protected item name. /// - [JsonProperty(PropertyName = "vmName")] - public string VmName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmName")] + public string VMName {get; private set; } /// /// Gets the appliance name. /// - [JsonProperty(PropertyName = "applianceName")] - public string ApplianceName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "applianceName")] + public string ApplianceName {get; private set; } /// /// Gets the server type. /// - [JsonProperty(PropertyName = "serverType")] - public string ServerType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serverType")] + public string ServerType {get; private set; } /// /// Gets the component display name. /// - [JsonProperty(PropertyName = "componentDisplayName")] - public string ComponentDisplayName { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "componentDisplayName")] + public string ComponentDisplayName {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackMobilityAgentDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackMobilityAgentDetails.cs index fa8159b43583..37a25dc5fc1f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackMobilityAgentDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackMobilityAgentDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackMobilityAgentDetails { /// - /// Initializes a new instance of the - /// InMageRcmFailbackMobilityAgentDetails class. + /// Initializes a new instance of the InMageRcmFailbackMobilityAgentDetails class. /// public InMageRcmFailbackMobilityAgentDetails() { @@ -30,36 +21,47 @@ public InMageRcmFailbackMobilityAgentDetails() } /// - /// Initializes a new instance of the - /// InMageRcmFailbackMobilityAgentDetails class. + /// Initializes a new instance of the InMageRcmFailbackMobilityAgentDetails class. /// - /// The agent version. - /// The latest agent version - /// available. - /// The driver version. - /// The latest - /// upgradeable version available without reboot. - /// The agent version expiry - /// date. - /// The driver version expiry - /// date. - /// The time of the last heartbeat - /// received from the agent. - /// The whether update is possible - /// or not. - /// A value indicating whether agent is - /// upgradeable or not. - public InMageRcmFailbackMobilityAgentDetails(string version = default(string), string latestVersion = default(string), string driverVersion = default(string), string latestUpgradableVersionWithoutReboot = default(string), System.DateTime? agentVersionExpiryDate = default(System.DateTime?), System.DateTime? driverVersionExpiryDate = default(System.DateTime?), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), IList reasonsBlockingUpgrade = default(IList), string isUpgradeable = default(string)) + + /// The agent version. + /// + + /// The latest agent version available. + /// + + /// The driver version. + /// + + /// The latest upgradeable version available without reboot. + /// + + /// The agent version expiry date. + /// + + /// The driver version expiry date. + /// + + /// The time of the last heartbeat received from the agent. + /// + + /// The whether update is possible or not. + /// + + /// A value indicating whether agent is upgradeable or not. + /// + public InMageRcmFailbackMobilityAgentDetails(string version = default(string), string latestVersion = default(string), string driverVersion = default(string), string latestUpgradableVersionWithoutReboot = default(string), System.DateTime? agentVersionExpiryDate = default(System.DateTime?), System.DateTime? driverVersionExpiryDate = default(System.DateTime?), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), System.Collections.Generic.IList reasonsBlockingUpgrade = default(System.Collections.Generic.IList), string isUpgradeable = default(string)) + { - Version = version; - LatestVersion = latestVersion; - DriverVersion = driverVersion; - LatestUpgradableVersionWithoutReboot = latestUpgradableVersionWithoutReboot; - AgentVersionExpiryDate = agentVersionExpiryDate; - DriverVersionExpiryDate = driverVersionExpiryDate; - LastHeartbeatUtc = lastHeartbeatUtc; - ReasonsBlockingUpgrade = reasonsBlockingUpgrade; - IsUpgradeable = isUpgradeable; + this.Version = version; + this.LatestVersion = latestVersion; + this.DriverVersion = driverVersion; + this.LatestUpgradableVersionWithoutReboot = latestUpgradableVersionWithoutReboot; + this.AgentVersionExpiryDate = agentVersionExpiryDate; + this.DriverVersionExpiryDate = driverVersionExpiryDate; + this.LastHeartbeatUtc = lastHeartbeatUtc; + this.ReasonsBlockingUpgrade = reasonsBlockingUpgrade; + this.IsUpgradeable = isUpgradeable; CustomInit(); } @@ -68,59 +70,59 @@ public InMageRcmFailbackMobilityAgentDetails() /// partial void CustomInit(); + /// /// Gets the agent version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } /// /// Gets the latest agent version available. /// - [JsonProperty(PropertyName = "latestVersion")] - public string LatestVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "latestVersion")] + public string LatestVersion {get; private set; } /// /// Gets the driver version. /// - [JsonProperty(PropertyName = "driverVersion")] - public string DriverVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "driverVersion")] + public string DriverVersion {get; private set; } /// /// Gets the latest upgradeable version available without reboot. /// - [JsonProperty(PropertyName = "latestUpgradableVersionWithoutReboot")] - public string LatestUpgradableVersionWithoutReboot { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "latestUpgradableVersionWithoutReboot")] + public string LatestUpgradableVersionWithoutReboot {get; private set; } /// /// Gets the agent version expiry date. /// - [JsonProperty(PropertyName = "agentVersionExpiryDate")] - public System.DateTime? AgentVersionExpiryDate { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersionExpiryDate")] + public System.DateTime? AgentVersionExpiryDate {get; private set; } /// /// Gets the driver version expiry date. /// - [JsonProperty(PropertyName = "driverVersionExpiryDate")] - public System.DateTime? DriverVersionExpiryDate { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "driverVersionExpiryDate")] + public System.DateTime? DriverVersionExpiryDate {get; private set; } /// /// Gets the time of the last heartbeat received from the agent. /// - [JsonProperty(PropertyName = "lastHeartbeatUtc")] - public System.DateTime? LastHeartbeatUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeatUtc")] + public System.DateTime? LastHeartbeatUtc {get; private set; } /// /// Gets the whether update is possible or not. /// - [JsonProperty(PropertyName = "reasonsBlockingUpgrade")] - public IList ReasonsBlockingUpgrade { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reasonsBlockingUpgrade")] + public System.Collections.Generic.IList ReasonsBlockingUpgrade {get; private set; } /// /// Gets a value indicating whether agent is upgradeable or not. /// - [JsonProperty(PropertyName = "isUpgradeable")] - public string IsUpgradeable { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isUpgradeable")] + public string IsUpgradeable {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackNicDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackNicDetails.cs index 5bdb3f2a66d9..2f03833785e4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackNicDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackNicDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackNicDetails { /// - /// Initializes a new instance of the InMageRcmFailbackNicDetails - /// class. + /// Initializes a new instance of the InMageRcmFailbackNicDetails class. /// public InMageRcmFailbackNicDetails() { @@ -28,19 +21,27 @@ public InMageRcmFailbackNicDetails() } /// - /// Initializes a new instance of the InMageRcmFailbackNicDetails - /// class. + /// Initializes a new instance of the InMageRcmFailbackNicDetails class. /// - /// The mac address. - /// The network name. - /// The adapter type. - /// The IP address. - public InMageRcmFailbackNicDetails(string macAddress = default(string), string networkName = default(string), string adapterType = default(string), string sourceIpAddress = default(string)) + + /// The mac address. + /// + + /// The network name. + /// + + /// The adapter type. + /// + + /// The IP address. + /// + public InMageRcmFailbackNicDetails(string macAddress = default(string), string networkName = default(string), string adapterType = default(string), string sourceIPAddress = default(string)) + { - MacAddress = macAddress; - NetworkName = networkName; - AdapterType = adapterType; - SourceIpAddress = sourceIpAddress; + this.MacAddress = macAddress; + this.NetworkName = networkName; + this.AdapterType = adapterType; + this.SourceIPAddress = sourceIPAddress; CustomInit(); } @@ -49,29 +50,29 @@ public InMageRcmFailbackNicDetails() /// partial void CustomInit(); + /// /// Gets the mac address. /// - [JsonProperty(PropertyName = "macAddress")] - public string MacAddress { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "macAddress")] + public string MacAddress {get; private set; } /// /// Gets the network name. /// - [JsonProperty(PropertyName = "networkName")] - public string NetworkName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkName")] + public string NetworkName {get; private set; } /// /// Gets the adapter type. /// - [JsonProperty(PropertyName = "adapterType")] - public string AdapterType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "adapterType")] + public string AdapterType {get; private set; } /// /// Gets the IP address. /// - [JsonProperty(PropertyName = "sourceIpAddress")] - public string SourceIpAddress { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceIpAddress")] + public string SourceIPAddress {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPlannedFailoverProviderInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPlannedFailoverProviderInput.cs index d8e36ed86be9..239546c88e37 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPlannedFailoverProviderInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPlannedFailoverProviderInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackPlannedFailoverProviderInput : PlannedFailoverProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// InMageRcmFailbackPlannedFailoverProviderInput class. + /// Initializes a new instance of the InMageRcmFailbackPlannedFailoverProviderInput class. /// public InMageRcmFailbackPlannedFailoverProviderInput() { @@ -30,14 +22,15 @@ public InMageRcmFailbackPlannedFailoverProviderInput() } /// - /// Initializes a new instance of the - /// InMageRcmFailbackPlannedFailoverProviderInput class. + /// Initializes a new instance of the InMageRcmFailbackPlannedFailoverProviderInput class. /// - /// The recovery point type. Possible - /// values include: 'ApplicationConsistent', 'CrashConsistent' + + /// The recovery point type. + /// Possible values include: 'ApplicationConsistent', 'CrashConsistent' public InMageRcmFailbackPlannedFailoverProviderInput(string recoveryPointType) + { - RecoveryPointType = recoveryPointType; + this.RecoveryPointType = recoveryPointType; CustomInit(); } @@ -46,25 +39,25 @@ public InMageRcmFailbackPlannedFailoverProviderInput(string recoveryPointType) /// partial void CustomInit(); + /// - /// Gets or sets the recovery point type. Possible values include: - /// 'ApplicationConsistent', 'CrashConsistent' + /// Gets or sets the recovery point type. Possible values include: 'ApplicationConsistent', 'CrashConsistent' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryPointType == null) + if (this.RecoveryPointType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryPointType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryPointType"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPolicyCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPolicyCreationInput.cs index cd6f31d3cde9..e23810c99d9c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPolicyCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPolicyCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackPolicyCreationInput : PolicyProviderSpecificInput { /// - /// Initializes a new instance of the - /// InMageRcmFailbackPolicyCreationInput class. + /// Initializes a new instance of the InMageRcmFailbackPolicyCreationInput class. /// public InMageRcmFailbackPolicyCreationInput() { @@ -29,17 +22,19 @@ public InMageRcmFailbackPolicyCreationInput() } /// - /// Initializes a new instance of the - /// InMageRcmFailbackPolicyCreationInput class. + /// Initializes a new instance of the InMageRcmFailbackPolicyCreationInput class. /// - /// The crash - /// consistent snapshot frequency (in minutes). - /// The app consistent - /// snapshot frequency (in minutes). + + /// The crash consistent snapshot frequency (in minutes). + /// + + /// The app consistent snapshot frequency (in minutes). + /// public InMageRcmFailbackPolicyCreationInput(int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + { - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; CustomInit(); } @@ -48,17 +43,17 @@ public InMageRcmFailbackPolicyCreationInput() /// partial void CustomInit(); + /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the app consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPolicyDetails.cs index c6c55d10a981..3936ac8d6931 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackPolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackPolicyDetails : PolicyProviderSpecificDetails { /// - /// Initializes a new instance of the InMageRcmFailbackPolicyDetails - /// class. + /// Initializes a new instance of the InMageRcmFailbackPolicyDetails class. /// public InMageRcmFailbackPolicyDetails() { @@ -29,17 +22,19 @@ public InMageRcmFailbackPolicyDetails() } /// - /// Initializes a new instance of the InMageRcmFailbackPolicyDetails - /// class. + /// Initializes a new instance of the InMageRcmFailbackPolicyDetails class. /// - /// The app consistent - /// snapshot frequency in minutes. - /// The crash - /// consistent snapshot frequency in minutes. + + /// The app consistent snapshot frequency in minutes. + /// + + /// The crash consistent snapshot frequency in minutes. + /// public InMageRcmFailbackPolicyDetails(int? appConsistentFrequencyInMinutes = default(int?), int? crashConsistentFrequencyInMinutes = default(int?)) + { - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; CustomInit(); } @@ -48,17 +43,17 @@ public InMageRcmFailbackPolicyDetails() /// partial void CustomInit(); + /// /// Gets or sets the app consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the crash consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackProtectedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackProtectedDiskDetails.cs index 1c996c2fc2ee..440eaac0d620 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackProtectedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackProtectedDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackProtectedDiskDetails { /// - /// Initializes a new instance of the - /// InMageRcmFailbackProtectedDiskDetails class. + /// Initializes a new instance of the InMageRcmFailbackProtectedDiskDetails class. /// public InMageRcmFailbackProtectedDiskDetails() { @@ -28,38 +21,55 @@ public InMageRcmFailbackProtectedDiskDetails() } /// - /// Initializes a new instance of the - /// InMageRcmFailbackProtectedDiskDetails class. + /// Initializes a new instance of the InMageRcmFailbackProtectedDiskDetails class. /// - /// The disk Id (reported by source - /// agent). - /// The disk name. - /// A value indicating whether the disk is the - /// OS disk. - /// The disk capacity in bytes. - /// The disk Uuid (reported by vCenter). - /// The data pending in log - /// data store in MB. - /// The data pending at - /// source agent in MB. - /// A value indicating - /// whether initial replication is complete or not. - /// The initial replication details. - /// The resync details. - /// The last sync time. - public InMageRcmFailbackProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string isOSDisk = default(string), long? capacityInBytes = default(long?), string diskUuid = default(string), double? dataPendingInLogDataStoreInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?), string isInitialReplicationComplete = default(string), InMageRcmFailbackSyncDetails irDetails = default(InMageRcmFailbackSyncDetails), InMageRcmFailbackSyncDetails resyncDetails = default(InMageRcmFailbackSyncDetails), System.DateTime? lastSyncTime = default(System.DateTime?)) + + /// The disk Id (reported by source agent). + /// + + /// The disk name. + /// + + /// A value indicating whether the disk is the OS disk. + /// + + /// The disk capacity in bytes. + /// + + /// The disk Uuid (reported by vCenter). + /// + + /// The data pending in log data store in MB. + /// + + /// The data pending at source agent in MB. + /// + + /// A value indicating whether initial replication is complete or not. + /// + + /// The initial replication details. + /// + + /// The resync details. + /// + + /// The last sync time. + /// + public InMageRcmFailbackProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string isOSDisk = default(string), long? capacityInBytes = default(long?), string diskUuid = default(string), double? dataPendingInLogDataStoreInMb = default(double?), double? dataPendingAtSourceAgentInMb = default(double?), string isInitialReplicationComplete = default(string), InMageRcmFailbackSyncDetails irDetails = default(InMageRcmFailbackSyncDetails), InMageRcmFailbackSyncDetails resyncDetails = default(InMageRcmFailbackSyncDetails), System.DateTime? lastSyncTime = default(System.DateTime?)) + { - DiskId = diskId; - DiskName = diskName; - IsOSDisk = isOSDisk; - CapacityInBytes = capacityInBytes; - DiskUuid = diskUuid; - DataPendingInLogDataStoreInMB = dataPendingInLogDataStoreInMB; - DataPendingAtSourceAgentInMB = dataPendingAtSourceAgentInMB; - IsInitialReplicationComplete = isInitialReplicationComplete; - IrDetails = irDetails; - ResyncDetails = resyncDetails; - LastSyncTime = lastSyncTime; + this.DiskId = diskId; + this.DiskName = diskName; + this.IsOSDisk = isOSDisk; + this.CapacityInBytes = capacityInBytes; + this.DiskUuid = diskUuid; + this.DataPendingInLogDataStoreInMb = dataPendingInLogDataStoreInMb; + this.DataPendingAtSourceAgentInMb = dataPendingAtSourceAgentInMb; + this.IsInitialReplicationComplete = isInitialReplicationComplete; + this.IrDetails = irDetails; + this.ResyncDetails = resyncDetails; + this.LastSyncTime = lastSyncTime; CustomInit(); } @@ -68,72 +78,71 @@ public InMageRcmFailbackProtectedDiskDetails() /// partial void CustomInit(); + /// /// Gets the disk Id (reported by source agent). /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; private set; } /// /// Gets the disk name. /// - [JsonProperty(PropertyName = "diskName")] - public string DiskName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskName")] + public string DiskName {get; private set; } /// /// Gets a value indicating whether the disk is the OS disk. /// - [JsonProperty(PropertyName = "isOSDisk")] - public string IsOSDisk { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isOSDisk")] + public string IsOSDisk {get; private set; } /// /// Gets the disk capacity in bytes. /// - [JsonProperty(PropertyName = "capacityInBytes")] - public long? CapacityInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "capacityInBytes")] + public long? CapacityInBytes {get; private set; } /// /// Gets the disk Uuid (reported by vCenter). /// - [JsonProperty(PropertyName = "diskUuid")] - public string DiskUuid { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskUuid")] + public string DiskUuid {get; private set; } /// /// Gets the data pending in log data store in MB. /// - [JsonProperty(PropertyName = "dataPendingInLogDataStoreInMB")] - public double? DataPendingInLogDataStoreInMB { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPendingInLogDataStoreInMB")] + public double? DataPendingInLogDataStoreInMb {get; private set; } /// /// Gets the data pending at source agent in MB. /// - [JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] - public double? DataPendingAtSourceAgentInMB { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] + public double? DataPendingAtSourceAgentInMb {get; private set; } /// - /// Gets a value indicating whether initial replication is complete or - /// not. + /// Gets a value indicating whether initial replication is complete or not. /// - [JsonProperty(PropertyName = "isInitialReplicationComplete")] - public string IsInitialReplicationComplete { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isInitialReplicationComplete")] + public string IsInitialReplicationComplete {get; private set; } /// /// Gets or sets the initial replication details. /// - [JsonProperty(PropertyName = "irDetails")] - public InMageRcmFailbackSyncDetails IrDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "irDetails")] + public InMageRcmFailbackSyncDetails IrDetails {get; set; } /// /// Gets or sets the resync details. /// - [JsonProperty(PropertyName = "resyncDetails")] - public InMageRcmFailbackSyncDetails ResyncDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncDetails")] + public InMageRcmFailbackSyncDetails ResyncDetails {get; set; } /// /// Gets the last sync time. /// - [JsonProperty(PropertyName = "lastSyncTime")] - public System.DateTime? LastSyncTime { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lastSyncTime")] + public System.DateTime? LastSyncTime {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackRecoveryPointType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackRecoveryPointType.cs index ea82a305b682..2640b5e62df2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackRecoveryPointType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackRecoveryPointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for InMageRcmFailbackRecoveryPointType. /// + + public static class InMageRcmFailbackRecoveryPointType { public const string ApplicationConsistent = "ApplicationConsistent"; public const string CrashConsistent = "CrashConsistent"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackReplicationDetails.cs index 39b9e580b599..08071f18fd64 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackReplicationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackReplicationDetails : ReplicationProviderSpecificSettings { /// - /// Initializes a new instance of the - /// InMageRcmFailbackReplicationDetails class. + /// Initializes a new instance of the InMageRcmFailbackReplicationDetails class. /// public InMageRcmFailbackReplicationDetails() { @@ -31,100 +22,133 @@ public InMageRcmFailbackReplicationDetails() } /// - /// Initializes a new instance of the - /// InMageRcmFailbackReplicationDetails class. - /// - /// The virtual machine internal - /// identifier. - /// The ARM Id of the azure - /// VM. - /// The multi VM group name. - /// The reprotect agent Id. - /// The reprotect agent name. - /// The type of the OS on the VM. - /// The log storage account ARM - /// Id. - /// The target vCenter Id. - /// The target datastore - /// name. - /// The target VM name. - /// The initial - /// replication progress percentage. - /// The initial - /// replication processed bytes. This includes sum of total bytes - /// transferred and matched bytes on all selected disks in source - /// VM. - /// The initial - /// replication transferred bytes from source VM to target for all - /// selected disks on source VM. - /// The initial - /// replication progress health. Possible values include: 'None', - /// 'InProgress', 'SlowProgress', 'NoProgress' - /// The resync progress - /// percentage. - /// The resync processed bytes. This - /// includes sum of total bytes transferred and matched bytes on all - /// selected disks in source VM. - /// The resync transferred bytes - /// from source VM to target for all selected disks on source - /// VM. + /// Initializes a new instance of the InMageRcmFailbackReplicationDetails class. + /// + + /// The virtual machine internal identifier. + /// + + /// The ARM Id of the azure VM. + /// + + /// The multi VM group name. + /// + + /// The reprotect agent Id. + /// + + /// The reprotect agent name. + /// + + /// The type of the OS on the VM. + /// + + /// The log storage account ARM Id. + /// + + /// The target vCenter Id. + /// + + /// The target datastore name. + /// + + /// The target VM name. + /// + + /// The initial replication progress percentage. + /// + + /// The initial replication processed bytes. This includes sum of total bytes + /// transferred and matched bytes on all selected disks in source VM. + /// + + /// The initial replication transferred bytes from source VM to target for all + /// selected disks on source VM. + /// + + /// The initial replication progress health. + /// Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' + + /// The resync progress percentage. + /// + + /// The resync processed bytes. This includes sum of total bytes transferred + /// and matched bytes on all selected disks in source VM. + /// + + /// The resync transferred bytes from source VM to target for all selected + /// disks on source VM. + /// + /// The resync progress health. - /// Possible values include: 'None', 'InProgress', 'SlowProgress', - /// 'NoProgress' - /// A value indicating whether resync is - /// required. - /// The resync state. Possible values - /// include: 'None', 'PreparedForResynchronization', + /// Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' + + /// A value indicating whether resync is required. + /// + + /// The resync state. + /// Possible values include: 'None', 'PreparedForResynchronization', /// 'StartedResynchronization' - /// The list of protected disks. - /// The mobility agent - /// information. - /// The network details. - /// The last planned - /// failover start time. - /// The last planned failover - /// status. Possible values include: 'Succeeded', 'Failed', - /// 'Cancelled', 'Unknown' - /// The discovered VM - /// information. - /// The policy Id used by the forward - /// replication. - /// The policy friendly name - /// used by the forward replication. - /// A value - /// indicating whether agent registration was successful after - /// failover. - public InMageRcmFailbackReplicationDetails(string internalIdentifier = default(string), string azureVirtualMachineId = default(string), string multiVmGroupName = default(string), string reprotectAgentId = default(string), string reprotectAgentName = default(string), string osType = default(string), string logStorageAccountId = default(string), string targetvCenterId = default(string), string targetDataStoreName = default(string), string targetVmName = default(string), int? initialReplicationProgressPercentage = default(int?), long? initialReplicationProcessedBytes = default(long?), long? initialReplicationTransferredBytes = default(long?), string initialReplicationProgressHealth = default(string), int? resyncProgressPercentage = default(int?), long? resyncProcessedBytes = default(long?), long? resyncTransferredBytes = default(long?), string resyncProgressHealth = default(string), string resyncRequired = default(string), string resyncState = default(string), IList protectedDisks = default(IList), InMageRcmFailbackMobilityAgentDetails mobilityAgentDetails = default(InMageRcmFailbackMobilityAgentDetails), IList vmNics = default(IList), System.DateTime? lastPlannedFailoverStartTime = default(System.DateTime?), string lastPlannedFailoverStatus = default(string), InMageRcmFailbackDiscoveredProtectedVmDetails discoveredVmDetails = default(InMageRcmFailbackDiscoveredProtectedVmDetails), string lastUsedPolicyId = default(string), string lastUsedPolicyFriendlyName = default(string), bool? isAgentRegistrationSuccessfulAfterFailover = default(bool?)) + + /// The list of protected disks. + /// + + /// The mobility agent information. + /// + + /// The network details. + /// + + /// The last planned failover start time. + /// + + /// The last planned failover status. + /// Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Unknown' + + /// The discovered VM information. + /// + + /// The policy Id used by the forward replication. + /// + + /// The policy friendly name used by the forward replication. + /// + + /// A value indicating whether agent registration was successful after + /// failover. + /// + public InMageRcmFailbackReplicationDetails(string internalIdentifier = default(string), string azureVirtualMachineId = default(string), string multiVMGroupName = default(string), string reprotectAgentId = default(string), string reprotectAgentName = default(string), string osType = default(string), string logStorageAccountId = default(string), string targetvCenterId = default(string), string targetDataStoreName = default(string), string targetVMName = default(string), int? initialReplicationProgressPercentage = default(int?), long? initialReplicationProcessedBytes = default(long?), long? initialReplicationTransferredBytes = default(long?), string initialReplicationProgressHealth = default(string), int? resyncProgressPercentage = default(int?), long? resyncProcessedBytes = default(long?), long? resyncTransferredBytes = default(long?), string resyncProgressHealth = default(string), string resyncRequired = default(string), string resyncState = default(string), System.Collections.Generic.IList protectedDisks = default(System.Collections.Generic.IList), InMageRcmFailbackMobilityAgentDetails mobilityAgentDetails = default(InMageRcmFailbackMobilityAgentDetails), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), System.DateTime? lastPlannedFailoverStartTime = default(System.DateTime?), string lastPlannedFailoverStatus = default(string), InMageRcmFailbackDiscoveredProtectedVmDetails discoveredVMDetails = default(InMageRcmFailbackDiscoveredProtectedVmDetails), string lastUsedPolicyId = default(string), string lastUsedPolicyFriendlyName = default(string), bool? isAgentRegistrationSuccessfulAfterFailover = default(bool?)) + { - InternalIdentifier = internalIdentifier; - AzureVirtualMachineId = azureVirtualMachineId; - MultiVmGroupName = multiVmGroupName; - ReprotectAgentId = reprotectAgentId; - ReprotectAgentName = reprotectAgentName; - OsType = osType; - LogStorageAccountId = logStorageAccountId; - TargetvCenterId = targetvCenterId; - TargetDataStoreName = targetDataStoreName; - TargetVmName = targetVmName; - InitialReplicationProgressPercentage = initialReplicationProgressPercentage; - InitialReplicationProcessedBytes = initialReplicationProcessedBytes; - InitialReplicationTransferredBytes = initialReplicationTransferredBytes; - InitialReplicationProgressHealth = initialReplicationProgressHealth; - ResyncProgressPercentage = resyncProgressPercentage; - ResyncProcessedBytes = resyncProcessedBytes; - ResyncTransferredBytes = resyncTransferredBytes; - ResyncProgressHealth = resyncProgressHealth; - ResyncRequired = resyncRequired; - ResyncState = resyncState; - ProtectedDisks = protectedDisks; - MobilityAgentDetails = mobilityAgentDetails; - VmNics = vmNics; - LastPlannedFailoverStartTime = lastPlannedFailoverStartTime; - LastPlannedFailoverStatus = lastPlannedFailoverStatus; - DiscoveredVmDetails = discoveredVmDetails; - LastUsedPolicyId = lastUsedPolicyId; - LastUsedPolicyFriendlyName = lastUsedPolicyFriendlyName; - IsAgentRegistrationSuccessfulAfterFailover = isAgentRegistrationSuccessfulAfterFailover; + this.InternalIdentifier = internalIdentifier; + this.AzureVirtualMachineId = azureVirtualMachineId; + this.MultiVMGroupName = multiVMGroupName; + this.ReprotectAgentId = reprotectAgentId; + this.ReprotectAgentName = reprotectAgentName; + this.OSType = osType; + this.LogStorageAccountId = logStorageAccountId; + this.TargetvCenterId = targetvCenterId; + this.TargetDataStoreName = targetDataStoreName; + this.TargetVMName = targetVMName; + this.InitialReplicationProgressPercentage = initialReplicationProgressPercentage; + this.InitialReplicationProcessedBytes = initialReplicationProcessedBytes; + this.InitialReplicationTransferredBytes = initialReplicationTransferredBytes; + this.InitialReplicationProgressHealth = initialReplicationProgressHealth; + this.ResyncProgressPercentage = resyncProgressPercentage; + this.ResyncProcessedBytes = resyncProcessedBytes; + this.ResyncTransferredBytes = resyncTransferredBytes; + this.ResyncProgressHealth = resyncProgressHealth; + this.ResyncRequired = resyncRequired; + this.ResyncState = resyncState; + this.ProtectedDisks = protectedDisks; + this.MobilityAgentDetails = mobilityAgentDetails; + this.VMNics = vmNics; + this.LastPlannedFailoverStartTime = lastPlannedFailoverStartTime; + this.LastPlannedFailoverStatus = lastPlannedFailoverStatus; + this.DiscoveredVMDetails = discoveredVMDetails; + this.LastUsedPolicyId = lastUsedPolicyId; + this.LastUsedPolicyFriendlyName = lastUsedPolicyFriendlyName; + this.IsAgentRegistrationSuccessfulAfterFailover = isAgentRegistrationSuccessfulAfterFailover; CustomInit(); } @@ -133,189 +157,184 @@ public InMageRcmFailbackReplicationDetails() /// partial void CustomInit(); + /// /// Gets the virtual machine internal identifier. /// - [JsonProperty(PropertyName = "internalIdentifier")] - public string InternalIdentifier { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "internalIdentifier")] + public string InternalIdentifier {get; private set; } /// /// Gets the ARM Id of the azure VM. /// - [JsonProperty(PropertyName = "azureVirtualMachineId")] - public string AzureVirtualMachineId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureVirtualMachineId")] + public string AzureVirtualMachineId {get; private set; } /// /// Gets the multi VM group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; private set; } /// /// Gets the reprotect agent Id. /// - [JsonProperty(PropertyName = "reprotectAgentId")] - public string ReprotectAgentId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reprotectAgentId")] + public string ReprotectAgentId {get; private set; } /// /// Gets the reprotect agent name. /// - [JsonProperty(PropertyName = "reprotectAgentName")] - public string ReprotectAgentName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reprotectAgentName")] + public string ReprotectAgentName {get; private set; } /// /// Gets the type of the OS on the VM. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; private set; } /// /// Gets the log storage account ARM Id. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; private set; } /// /// Gets the target vCenter Id. /// - [JsonProperty(PropertyName = "targetvCenterId")] - public string TargetvCenterId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetvCenterId")] + public string TargetvCenterId {get; private set; } /// /// Gets the target datastore name. /// - [JsonProperty(PropertyName = "targetDataStoreName")] - public string TargetDataStoreName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDataStoreName")] + public string TargetDataStoreName {get; private set; } /// /// Gets the target VM name. /// - [JsonProperty(PropertyName = "targetVmName")] - public string TargetVmName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmName")] + public string TargetVMName {get; private set; } /// /// Gets the initial replication progress percentage. /// - [JsonProperty(PropertyName = "initialReplicationProgressPercentage")] - public int? InitialReplicationProgressPercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationProgressPercentage")] + public int? InitialReplicationProgressPercentage {get; private set; } /// - /// Gets the initial replication processed bytes. This includes sum of - /// total bytes transferred and matched bytes on all selected disks in - /// source VM. + /// Gets the initial replication processed bytes. This includes sum of total + /// bytes transferred and matched bytes on all selected disks in source VM. /// - [JsonProperty(PropertyName = "initialReplicationProcessedBytes")] - public long? InitialReplicationProcessedBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationProcessedBytes")] + public long? InitialReplicationProcessedBytes {get; private set; } /// - /// Gets the initial replication transferred bytes from source VM to - /// target for all selected disks on source VM. + /// Gets the initial replication transferred bytes from source VM to target for + /// all selected disks on source VM. /// - [JsonProperty(PropertyName = "initialReplicationTransferredBytes")] - public long? InitialReplicationTransferredBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationTransferredBytes")] + public long? InitialReplicationTransferredBytes {get; private set; } /// - /// Gets the initial replication progress health. Possible values - /// include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' + /// Gets the initial replication progress health. Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' /// - [JsonProperty(PropertyName = "initialReplicationProgressHealth")] - public string InitialReplicationProgressHealth { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationProgressHealth")] + public string InitialReplicationProgressHealth {get; private set; } /// /// Gets the resync progress percentage. /// - [JsonProperty(PropertyName = "resyncProgressPercentage")] - public int? ResyncProgressPercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage {get; private set; } /// /// Gets the resync processed bytes. This includes sum of total bytes /// transferred and matched bytes on all selected disks in source VM. /// - [JsonProperty(PropertyName = "resyncProcessedBytes")] - public long? ResyncProcessedBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProcessedBytes")] + public long? ResyncProcessedBytes {get; private set; } /// - /// Gets the resync transferred bytes from source VM to target for all - /// selected disks on source VM. + /// Gets the resync transferred bytes from source VM to target for all selected + /// disks on source VM. /// - [JsonProperty(PropertyName = "resyncTransferredBytes")] - public long? ResyncTransferredBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncTransferredBytes")] + public long? ResyncTransferredBytes {get; private set; } /// - /// Gets the resync progress health. Possible values include: 'None', - /// 'InProgress', 'SlowProgress', 'NoProgress' + /// Gets the resync progress health. Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' /// - [JsonProperty(PropertyName = "resyncProgressHealth")] - public string ResyncProgressHealth { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProgressHealth")] + public string ResyncProgressHealth {get; private set; } /// /// Gets a value indicating whether resync is required. /// - [JsonProperty(PropertyName = "resyncRequired")] - public string ResyncRequired { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncRequired")] + public string ResyncRequired {get; private set; } /// - /// Gets the resync state. Possible values include: 'None', - /// 'PreparedForResynchronization', 'StartedResynchronization' + /// Gets the resync state. Possible values include: 'None', 'PreparedForResynchronization', 'StartedResynchronization' /// - [JsonProperty(PropertyName = "resyncState")] - public string ResyncState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncState")] + public string ResyncState {get; private set; } /// /// Gets or sets the list of protected disks. /// - [JsonProperty(PropertyName = "protectedDisks")] - public IList ProtectedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedDisks")] + public System.Collections.Generic.IList ProtectedDisks {get; set; } /// /// Gets or sets the mobility agent information. /// - [JsonProperty(PropertyName = "mobilityAgentDetails")] - public InMageRcmFailbackMobilityAgentDetails MobilityAgentDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mobilityAgentDetails")] + public InMageRcmFailbackMobilityAgentDetails MobilityAgentDetails {get; set; } /// /// Gets or sets the network details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets the last planned failover start time. /// - [JsonProperty(PropertyName = "lastPlannedFailoverStartTime")] - public System.DateTime? LastPlannedFailoverStartTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastPlannedFailoverStartTime")] + public System.DateTime? LastPlannedFailoverStartTime {get; private set; } /// - /// Gets the last planned failover status. Possible values include: - /// 'Succeeded', 'Failed', 'Cancelled', 'Unknown' + /// Gets the last planned failover status. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Unknown' /// - [JsonProperty(PropertyName = "lastPlannedFailoverStatus")] - public string LastPlannedFailoverStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastPlannedFailoverStatus")] + public string LastPlannedFailoverStatus {get; private set; } /// /// Gets or sets the discovered VM information. /// - [JsonProperty(PropertyName = "discoveredVmDetails")] - public InMageRcmFailbackDiscoveredProtectedVmDetails DiscoveredVmDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "discoveredVmDetails")] + public InMageRcmFailbackDiscoveredProtectedVmDetails DiscoveredVMDetails {get; set; } /// /// Gets the policy Id used by the forward replication. /// - [JsonProperty(PropertyName = "lastUsedPolicyId")] - public string LastUsedPolicyId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUsedPolicyId")] + public string LastUsedPolicyId {get; private set; } /// /// Gets the policy friendly name used by the forward replication. /// - [JsonProperty(PropertyName = "lastUsedPolicyFriendlyName")] - public string LastUsedPolicyFriendlyName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUsedPolicyFriendlyName")] + public string LastUsedPolicyFriendlyName {get; private set; } /// - /// Gets a value indicating whether agent registration was successful - /// after failover. + /// Gets a value indicating whether agent registration was successful after + /// failover. /// - [JsonProperty(PropertyName = "isAgentRegistrationSuccessfulAfterFailover")] - public bool? IsAgentRegistrationSuccessfulAfterFailover { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isAgentRegistrationSuccessfulAfterFailover")] + public bool? IsAgentRegistrationSuccessfulAfterFailover {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackReprotectInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackReprotectInput.cs index 68025d4cd328..70027c31b826 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackReprotectInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackReprotectInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackReprotectInput : ReverseReplicationProviderSpecificInput { /// - /// Initializes a new instance of the InMageRcmFailbackReprotectInput - /// class. + /// Initializes a new instance of the InMageRcmFailbackReprotectInput class. /// public InMageRcmFailbackReprotectInput() { @@ -30,17 +22,23 @@ public InMageRcmFailbackReprotectInput() } /// - /// Initializes a new instance of the InMageRcmFailbackReprotectInput - /// class. + /// Initializes a new instance of the InMageRcmFailbackReprotectInput class. /// - /// The process server Id. - /// The Policy Id. - /// The run as account Id. + + /// The process server Id. + /// + + /// The run as account Id. + /// + + /// The Policy Id. + /// public InMageRcmFailbackReprotectInput(string processServerId, string policyId, string runAsAccountId = default(string)) + { - ProcessServerId = processServerId; - RunAsAccountId = runAsAccountId; - PolicyId = policyId; + this.ProcessServerId = processServerId; + this.RunAsAccountId = runAsAccountId; + this.PolicyId = policyId; CustomInit(); } @@ -49,40 +47,43 @@ public InMageRcmFailbackReprotectInput() /// partial void CustomInit(); + /// /// Gets or sets the process server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the run as account Id. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } /// /// Gets or sets the Policy Id. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ProcessServerId == null) + if (this.ProcessServerId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProcessServerId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProcessServerId"); } - if (PolicyId == null) + if (this.PolicyId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PolicyId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PolicyId"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackSyncDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackSyncDetails.cs index 93d54bb1cfd2..31a60c6b7e17 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackSyncDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmFailbackSyncDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmFailbackSyncDetails { /// - /// Initializes a new instance of the InMageRcmFailbackSyncDetails - /// class. + /// Initializes a new instance of the InMageRcmFailbackSyncDetails class. /// public InMageRcmFailbackSyncDetails() { @@ -28,35 +21,46 @@ public InMageRcmFailbackSyncDetails() } /// - /// Initializes a new instance of the InMageRcmFailbackSyncDetails - /// class. + /// Initializes a new instance of the InMageRcmFailbackSyncDetails class. /// - /// The progress health. Possible values - /// include: 'None', 'InProgress', 'SlowProgress', 'NoProgress', - /// 'Queued' - /// The transferred bytes from source VM - /// to azure for the disk. - /// The bytes transferred - /// in last 15 minutes from source VM to target. - /// The time of the last data - /// transfer from source VM to target. - /// The total processed bytes. This - /// includes bytes that are transferred from source VM to target and - /// matched bytes. - /// The start time. - /// The last refresh time. - /// Progress in percentage. Progress - /// percentage is calculated based on processed bytes. + + /// The progress health. + /// Possible values include: 'None', 'InProgress', 'SlowProgress', + /// 'NoProgress', 'Queued' + + /// The transferred bytes from source VM to azure for the disk. + /// + + /// The bytes transferred in last 15 minutes from source VM to target. + /// + + /// The time of the last data transfer from source VM to target. + /// + + /// The total processed bytes. This includes bytes that are transferred from + /// source VM to target and matched bytes. + /// + + /// The start time. + /// + + /// The last refresh time. + /// + + /// Progress in percentage. Progress percentage is calculated based on + /// processed bytes. + /// public InMageRcmFailbackSyncDetails(string progressHealth = default(string), long? transferredBytes = default(long?), long? last15MinutesTransferredBytes = default(long?), string lastDataTransferTimeUtc = default(string), long? processedBytes = default(long?), string startTime = default(string), string lastRefreshTime = default(string), int? progressPercentage = default(int?)) + { - ProgressHealth = progressHealth; - TransferredBytes = transferredBytes; - Last15MinutesTransferredBytes = last15MinutesTransferredBytes; - LastDataTransferTimeUtc = lastDataTransferTimeUtc; - ProcessedBytes = processedBytes; - StartTime = startTime; - LastRefreshTime = lastRefreshTime; - ProgressPercentage = progressPercentage; + this.ProgressHealth = progressHealth; + this.TransferredBytes = transferredBytes; + this.Last15MinutesTransferredBytes = last15MinutesTransferredBytes; + this.LastDataTransferTimeUtc = lastDataTransferTimeUtc; + this.ProcessedBytes = processedBytes; + this.StartTime = startTime; + this.LastRefreshTime = lastRefreshTime; + this.ProgressPercentage = progressPercentage; CustomInit(); } @@ -65,57 +69,55 @@ public InMageRcmFailbackSyncDetails() /// partial void CustomInit(); + /// - /// Gets the progress health. Possible values include: 'None', - /// 'InProgress', 'SlowProgress', 'NoProgress', 'Queued' + /// Gets the progress health. Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress', 'Queued' /// - [JsonProperty(PropertyName = "progressHealth")] - public string ProgressHealth { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "progressHealth")] + public string ProgressHealth {get; private set; } /// /// Gets the transferred bytes from source VM to azure for the disk. /// - [JsonProperty(PropertyName = "transferredBytes")] - public long? TransferredBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "transferredBytes")] + public long? TransferredBytes {get; private set; } /// - /// Gets the bytes transferred in last 15 minutes from source VM to - /// target. + /// Gets the bytes transferred in last 15 minutes from source VM to target. /// - [JsonProperty(PropertyName = "last15MinutesTransferredBytes")] - public long? Last15MinutesTransferredBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "last15MinutesTransferredBytes")] + public long? Last15MinutesTransferredBytes {get; private set; } /// /// Gets the time of the last data transfer from source VM to target. /// - [JsonProperty(PropertyName = "lastDataTransferTimeUtc")] - public string LastDataTransferTimeUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastDataTransferTimeUtc")] + public string LastDataTransferTimeUtc {get; private set; } /// - /// Gets the total processed bytes. This includes bytes that are - /// transferred from source VM to target and matched bytes. + /// Gets the total processed bytes. This includes bytes that are transferred + /// from source VM to target and matched bytes. /// - [JsonProperty(PropertyName = "processedBytes")] - public long? ProcessedBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processedBytes")] + public long? ProcessedBytes {get; private set; } /// /// Gets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public string StartTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public string StartTime {get; private set; } /// /// Gets the last refresh time. /// - [JsonProperty(PropertyName = "lastRefreshTime")] - public string LastRefreshTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRefreshTime")] + public string LastRefreshTime {get; private set; } /// - /// Gets progress in percentage. Progress percentage is calculated - /// based on processed bytes. + /// Gets progress in percentage. Progress percentage is calculated based on + /// processed bytes. /// - [JsonProperty(PropertyName = "progressPercentage")] - public int? ProgressPercentage { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "progressPercentage")] + public int? ProgressPercentage {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmLastAgentUpgradeErrorDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmLastAgentUpgradeErrorDetails.cs index 00c7a536f1a0..b7bac2d9e334 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmLastAgentUpgradeErrorDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmLastAgentUpgradeErrorDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmLastAgentUpgradeErrorDetails { /// - /// Initializes a new instance of the - /// InMageRcmLastAgentUpgradeErrorDetails class. + /// Initializes a new instance of the InMageRcmLastAgentUpgradeErrorDetails class. /// public InMageRcmLastAgentUpgradeErrorDetails() { @@ -30,24 +21,35 @@ public InMageRcmLastAgentUpgradeErrorDetails() } /// - /// Initializes a new instance of the - /// InMageRcmLastAgentUpgradeErrorDetails class. + /// Initializes a new instance of the InMageRcmLastAgentUpgradeErrorDetails class. /// - /// The error code. - /// The error message. - /// The possible causes. - /// The recommended action. - /// The error message - /// parameters. - /// The error tags. - public InMageRcmLastAgentUpgradeErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), IDictionary errorMessageParameters = default(IDictionary), IDictionary errorTags = default(IDictionary)) + + /// The error code. + /// + + /// The error message. + /// + + /// The possible causes. + /// + + /// The recommended action. + /// + + /// The error message parameters. + /// + + /// The error tags. + /// + public InMageRcmLastAgentUpgradeErrorDetails(string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), System.Collections.Generic.IDictionary errorMessageParameters = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary errorTags = default(System.Collections.Generic.IDictionary)) + { - ErrorCode = errorCode; - ErrorMessage = errorMessage; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - ErrorMessageParameters = errorMessageParameters; - ErrorTags = errorTags; + this.ErrorCode = errorCode; + this.ErrorMessage = errorMessage; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.ErrorMessageParameters = errorMessageParameters; + this.ErrorTags = errorTags; CustomInit(); } @@ -56,41 +58,41 @@ public InMageRcmLastAgentUpgradeErrorDetails() /// partial void CustomInit(); + /// /// Gets the error code. /// - [JsonProperty(PropertyName = "errorCode")] - public string ErrorCode { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public string ErrorCode {get; private set; } /// /// Gets the error message. /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; private set; } /// /// Gets the possible causes. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; private set; } /// /// Gets the recommended action. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; private set; } /// /// Gets the error message parameters. /// - [JsonProperty(PropertyName = "errorMessageParameters")] - public IDictionary ErrorMessageParameters { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessageParameters")] + public System.Collections.Generic.IDictionary ErrorMessageParameters {get; private set; } /// /// Gets the error tags. /// - [JsonProperty(PropertyName = "errorTags")] - public IDictionary ErrorTags { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "errorTags")] + public System.Collections.Generic.IDictionary ErrorTags {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmMobilityAgentDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmMobilityAgentDetails.cs index 24f428c508e5..1d400b428b0a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmMobilityAgentDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmMobilityAgentDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmMobilityAgentDetails { /// - /// Initializes a new instance of the InMageRcmMobilityAgentDetails - /// class. + /// Initializes a new instance of the InMageRcmMobilityAgentDetails class. /// public InMageRcmMobilityAgentDetails() { @@ -30,39 +21,51 @@ public InMageRcmMobilityAgentDetails() } /// - /// Initializes a new instance of the InMageRcmMobilityAgentDetails - /// class. + /// Initializes a new instance of the InMageRcmMobilityAgentDetails class. /// - /// The agent version. - /// The latest agent version - /// available. - /// The latest agent version - /// release date. - /// The driver version. - /// The latest - /// upgradeable version available without reboot. - /// The agent version expiry - /// date. - /// The driver version expiry - /// date. - /// The time of the last heartbeat - /// received from the agent. - /// The whether update is possible - /// or not. - /// A value indicating whether agent is - /// upgradeable or not. - public InMageRcmMobilityAgentDetails(string version = default(string), string latestVersion = default(string), string latestAgentReleaseDate = default(string), string driverVersion = default(string), string latestUpgradableVersionWithoutReboot = default(string), System.DateTime? agentVersionExpiryDate = default(System.DateTime?), System.DateTime? driverVersionExpiryDate = default(System.DateTime?), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), IList reasonsBlockingUpgrade = default(IList), string isUpgradeable = default(string)) + + /// The agent version. + /// + + /// The latest agent version available. + /// + + /// The latest agent version release date. + /// + + /// The driver version. + /// + + /// The latest upgradeable version available without reboot. + /// + + /// The agent version expiry date. + /// + + /// The driver version expiry date. + /// + + /// The time of the last heartbeat received from the agent. + /// + + /// The whether update is possible or not. + /// + + /// A value indicating whether agent is upgradeable or not. + /// + public InMageRcmMobilityAgentDetails(string version = default(string), string latestVersion = default(string), string latestAgentReleaseDate = default(string), string driverVersion = default(string), string latestUpgradableVersionWithoutReboot = default(string), System.DateTime? agentVersionExpiryDate = default(System.DateTime?), System.DateTime? driverVersionExpiryDate = default(System.DateTime?), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), System.Collections.Generic.IList reasonsBlockingUpgrade = default(System.Collections.Generic.IList), string isUpgradeable = default(string)) + { - Version = version; - LatestVersion = latestVersion; - LatestAgentReleaseDate = latestAgentReleaseDate; - DriverVersion = driverVersion; - LatestUpgradableVersionWithoutReboot = latestUpgradableVersionWithoutReboot; - AgentVersionExpiryDate = agentVersionExpiryDate; - DriverVersionExpiryDate = driverVersionExpiryDate; - LastHeartbeatUtc = lastHeartbeatUtc; - ReasonsBlockingUpgrade = reasonsBlockingUpgrade; - IsUpgradeable = isUpgradeable; + this.Version = version; + this.LatestVersion = latestVersion; + this.LatestAgentReleaseDate = latestAgentReleaseDate; + this.DriverVersion = driverVersion; + this.LatestUpgradableVersionWithoutReboot = latestUpgradableVersionWithoutReboot; + this.AgentVersionExpiryDate = agentVersionExpiryDate; + this.DriverVersionExpiryDate = driverVersionExpiryDate; + this.LastHeartbeatUtc = lastHeartbeatUtc; + this.ReasonsBlockingUpgrade = reasonsBlockingUpgrade; + this.IsUpgradeable = isUpgradeable; CustomInit(); } @@ -71,65 +74,65 @@ public InMageRcmMobilityAgentDetails() /// partial void CustomInit(); + /// /// Gets the agent version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } /// /// Gets the latest agent version available. /// - [JsonProperty(PropertyName = "latestVersion")] - public string LatestVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "latestVersion")] + public string LatestVersion {get; private set; } /// /// Gets the latest agent version release date. /// - [JsonProperty(PropertyName = "latestAgentReleaseDate")] - public string LatestAgentReleaseDate { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "latestAgentReleaseDate")] + public string LatestAgentReleaseDate {get; private set; } /// /// Gets the driver version. /// - [JsonProperty(PropertyName = "driverVersion")] - public string DriverVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "driverVersion")] + public string DriverVersion {get; private set; } /// /// Gets the latest upgradeable version available without reboot. /// - [JsonProperty(PropertyName = "latestUpgradableVersionWithoutReboot")] - public string LatestUpgradableVersionWithoutReboot { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "latestUpgradableVersionWithoutReboot")] + public string LatestUpgradableVersionWithoutReboot {get; private set; } /// /// Gets the agent version expiry date. /// - [JsonProperty(PropertyName = "agentVersionExpiryDate")] - public System.DateTime? AgentVersionExpiryDate { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersionExpiryDate")] + public System.DateTime? AgentVersionExpiryDate {get; private set; } /// /// Gets the driver version expiry date. /// - [JsonProperty(PropertyName = "driverVersionExpiryDate")] - public System.DateTime? DriverVersionExpiryDate { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "driverVersionExpiryDate")] + public System.DateTime? DriverVersionExpiryDate {get; private set; } /// /// Gets the time of the last heartbeat received from the agent. /// - [JsonProperty(PropertyName = "lastHeartbeatUtc")] - public System.DateTime? LastHeartbeatUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeatUtc")] + public System.DateTime? LastHeartbeatUtc {get; private set; } /// /// Gets the whether update is possible or not. /// - [JsonProperty(PropertyName = "reasonsBlockingUpgrade")] - public IList ReasonsBlockingUpgrade { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reasonsBlockingUpgrade")] + public System.Collections.Generic.IList ReasonsBlockingUpgrade {get; private set; } /// /// Gets a value indicating whether agent is upgradeable or not. /// - [JsonProperty(PropertyName = "isUpgradeable")] - public string IsUpgradeable { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isUpgradeable")] + public string IsUpgradeable {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmNicDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmNicDetails.cs index e3795d31334b..8ceab74e372c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmNicDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmNicDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,39 +23,61 @@ public InMageRcmNicDetails() /// /// Initializes a new instance of the InMageRcmNicDetails class. /// - /// The NIC Id. - /// A value indicating whether this is the - /// primary NIC. - /// A value indicating whether this - /// NIC is selected for failover. - /// The source IP address. + + /// The NIC Id. + /// + + /// A value indicating whether this is the primary NIC. + /// + + /// A value indicating whether this NIC is selected for failover. + /// + + /// The source IP address. + /// + /// The source IP address type. /// Possible values include: 'Dynamic', 'Static' - /// Source network Id. - /// Source subnet name. - /// The target IP address. + + /// Source network Id. + /// + + /// Source subnet name. + /// + + /// The target IP address. + /// + /// The target IP address type. /// Possible values include: 'Dynamic', 'Static' - /// Target subnet name. - /// Test subnet name. - /// The test IP address. - /// The test IP address type. Possible - /// values include: 'Dynamic', 'Static' + + /// Target subnet name. + /// + + /// Test subnet name. + /// + + /// The test IP address. + /// + + /// The test IP address type. + /// Possible values include: 'Dynamic', 'Static' public InMageRcmNicDetails(string nicId = default(string), string isPrimaryNic = default(string), string isSelectedForFailover = default(string), string sourceIPAddress = default(string), string sourceIPAddressType = default(string), string sourceNetworkId = default(string), string sourceSubnetName = default(string), string targetIPAddress = default(string), string targetIPAddressType = default(string), string targetSubnetName = default(string), string testSubnetName = default(string), string testIPAddress = default(string), string testIPAddressType = default(string)) + { - NicId = nicId; - IsPrimaryNic = isPrimaryNic; - IsSelectedForFailover = isSelectedForFailover; - SourceIPAddress = sourceIPAddress; - SourceIPAddressType = sourceIPAddressType; - SourceNetworkId = sourceNetworkId; - SourceSubnetName = sourceSubnetName; - TargetIPAddress = targetIPAddress; - TargetIPAddressType = targetIPAddressType; - TargetSubnetName = targetSubnetName; - TestSubnetName = testSubnetName; - TestIPAddress = testIPAddress; - TestIPAddressType = testIPAddressType; + this.NicId = nicId; + this.IsPrimaryNic = isPrimaryNic; + this.IsSelectedForFailover = isSelectedForFailover; + this.SourceIPAddress = sourceIPAddress; + this.SourceIPAddressType = sourceIPAddressType; + this.SourceNetworkId = sourceNetworkId; + this.SourceSubnetName = sourceSubnetName; + this.TargetIPAddress = targetIPAddress; + this.TargetIPAddressType = targetIPAddressType; + this.TargetSubnetName = targetSubnetName; + this.TestSubnetName = testSubnetName; + this.TestIPAddress = testIPAddress; + this.TestIPAddressType = testIPAddressType; CustomInit(); } @@ -70,87 +86,83 @@ public InMageRcmNicDetails() /// partial void CustomInit(); + /// /// Gets the NIC Id. /// - [JsonProperty(PropertyName = "nicId")] - public string NicId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nicId")] + public string NicId {get; private set; } /// /// Gets or sets a value indicating whether this is the primary NIC. /// - [JsonProperty(PropertyName = "isPrimaryNic")] - public string IsPrimaryNic { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isPrimaryNic")] + public string IsPrimaryNic {get; set; } /// - /// Gets or sets a value indicating whether this NIC is selected for - /// failover. + /// Gets or sets a value indicating whether this NIC is selected for failover. /// - [JsonProperty(PropertyName = "isSelectedForFailover")] - public string IsSelectedForFailover { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isSelectedForFailover")] + public string IsSelectedForFailover {get; set; } /// /// Gets the source IP address. /// - [JsonProperty(PropertyName = "sourceIPAddress")] - public string SourceIPAddress { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceIPAddress")] + public string SourceIPAddress {get; private set; } /// - /// Gets the source IP address type. Possible values include: - /// 'Dynamic', 'Static' + /// Gets the source IP address type. Possible values include: 'Dynamic', 'Static' /// - [JsonProperty(PropertyName = "sourceIPAddressType")] - public string SourceIPAddressType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceIPAddressType")] + public string SourceIPAddressType {get; private set; } /// /// Gets source network Id. /// - [JsonProperty(PropertyName = "sourceNetworkId")] - public string SourceNetworkId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceNetworkId")] + public string SourceNetworkId {get; private set; } /// /// Gets source subnet name. /// - [JsonProperty(PropertyName = "sourceSubnetName")] - public string SourceSubnetName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceSubnetName")] + public string SourceSubnetName {get; private set; } /// /// Gets or sets the target IP address. /// - [JsonProperty(PropertyName = "targetIPAddress")] - public string TargetIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetIPAddress")] + public string TargetIPAddress {get; set; } /// - /// Gets or sets the target IP address type. Possible values include: - /// 'Dynamic', 'Static' + /// Gets or sets the target IP address type. Possible values include: 'Dynamic', 'Static' /// - [JsonProperty(PropertyName = "targetIPAddressType")] - public string TargetIPAddressType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetIPAddressType")] + public string TargetIPAddressType {get; set; } /// /// Gets or sets target subnet name. /// - [JsonProperty(PropertyName = "targetSubnetName")] - public string TargetSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetSubnetName")] + public string TargetSubnetName {get; set; } /// /// Gets or sets test subnet name. /// - [JsonProperty(PropertyName = "testSubnetName")] - public string TestSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testSubnetName")] + public string TestSubnetName {get; set; } /// /// Gets or sets the test IP address. /// - [JsonProperty(PropertyName = "testIPAddress")] - public string TestIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testIPAddress")] + public string TestIPAddress {get; set; } /// - /// Gets or sets the test IP address type. Possible values include: - /// 'Dynamic', 'Static' + /// Gets or sets the test IP address type. Possible values include: 'Dynamic', 'Static' /// - [JsonProperty(PropertyName = "testIPAddressType")] - public string TestIPAddressType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "testIPAddressType")] + public string TestIPAddressType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmNicInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmNicInput.cs index 381821d10ef0..3734e8ea3ec5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmNicInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmNicInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,26 +23,37 @@ public InMageRcmNicInput() /// /// Initializes a new instance of the InMageRcmNicInput class. /// - /// The NIC Id. - /// A value indicating whether this is the - /// primary NIC. - /// A value indicating whether this - /// NIC is selected for failover. - /// Target subnet name. - /// The target static IP - /// address. - /// The test subnet name. - /// The test static IP - /// address. + + /// The NIC Id. + /// + + /// A value indicating whether this is the primary NIC. + /// + + /// A value indicating whether this NIC is selected for failover. + /// + + /// Target subnet name. + /// + + /// The target static IP address. + /// + + /// The test subnet name. + /// + + /// The test static IP address. + /// public InMageRcmNicInput(string nicId, string isPrimaryNic, string isSelectedForFailover = default(string), string targetSubnetName = default(string), string targetStaticIPAddress = default(string), string testSubnetName = default(string), string testStaticIPAddress = default(string)) + { - NicId = nicId; - IsPrimaryNic = isPrimaryNic; - IsSelectedForFailover = isSelectedForFailover; - TargetSubnetName = targetSubnetName; - TargetStaticIPAddress = targetStaticIPAddress; - TestSubnetName = testSubnetName; - TestStaticIPAddress = testStaticIPAddress; + this.NicId = nicId; + this.IsPrimaryNic = isPrimaryNic; + this.IsSelectedForFailover = isSelectedForFailover; + this.TargetSubnetName = targetSubnetName; + this.TargetStaticIPAddress = targetStaticIPAddress; + this.TestSubnetName = testSubnetName; + this.TestStaticIPAddress = testStaticIPAddress; CustomInit(); } @@ -58,65 +62,71 @@ public InMageRcmNicInput() /// partial void CustomInit(); + /// /// Gets or sets the NIC Id. /// - [JsonProperty(PropertyName = "nicId")] - public string NicId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nicId")] + public string NicId {get; set; } /// /// Gets or sets a value indicating whether this is the primary NIC. /// - [JsonProperty(PropertyName = "isPrimaryNic")] - public string IsPrimaryNic { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isPrimaryNic")] + public string IsPrimaryNic {get; set; } /// - /// Gets or sets a value indicating whether this NIC is selected for - /// failover. + /// Gets or sets a value indicating whether this NIC is selected for failover. /// - [JsonProperty(PropertyName = "isSelectedForFailover")] - public string IsSelectedForFailover { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isSelectedForFailover")] + public string IsSelectedForFailover {get; set; } /// /// Gets or sets target subnet name. /// - [JsonProperty(PropertyName = "targetSubnetName")] - public string TargetSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetSubnetName")] + public string TargetSubnetName {get; set; } /// /// Gets or sets the target static IP address. /// - [JsonProperty(PropertyName = "targetStaticIPAddress")] - public string TargetStaticIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetStaticIPAddress")] + public string TargetStaticIPAddress {get; set; } /// /// Gets or sets the test subnet name. /// - [JsonProperty(PropertyName = "testSubnetName")] - public string TestSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testSubnetName")] + public string TestSubnetName {get; set; } /// /// Gets or sets the test static IP address. /// - [JsonProperty(PropertyName = "testStaticIPAddress")] - public string TestStaticIPAddress { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "testStaticIPAddress")] + public string TestStaticIPAddress {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (NicId == null) + if (this.NicId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "NicId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "NicId"); } - if (IsPrimaryNic == null) + if (this.IsPrimaryNic == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "IsPrimaryNic"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "IsPrimaryNic"); } + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmPolicyCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmPolicyCreationInput.cs index cb294194e3fd..2af54184f2c4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmPolicyCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmPolicyCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmPolicyCreationInput : PolicyProviderSpecificInput { /// - /// Initializes a new instance of the InMageRcmPolicyCreationInput - /// class. + /// Initializes a new instance of the InMageRcmPolicyCreationInput class. /// public InMageRcmPolicyCreationInput() { @@ -29,23 +22,27 @@ public InMageRcmPolicyCreationInput() } /// - /// Initializes a new instance of the InMageRcmPolicyCreationInput - /// class. + /// Initializes a new instance of the InMageRcmPolicyCreationInput class. /// - /// The duration in minutes - /// until which the recovery points need to be stored. - /// The crash - /// consistent snapshot frequency (in minutes). - /// The app consistent - /// snapshot frequency (in minutes). - /// A value indicating whether multi-VM - /// sync has to be enabled. - public InMageRcmPolicyCreationInput(int? recoveryPointHistoryInMinutes = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string enableMultiVmSync = default(string)) + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The crash consistent snapshot frequency (in minutes). + /// + + /// The app consistent snapshot frequency (in minutes). + /// + + /// A value indicating whether multi-VM sync has to be enabled. + /// + public InMageRcmPolicyCreationInput(int? recoveryPointHistoryInMinutes = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string enableMultiVMSync = default(string)) + { - RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - EnableMultiVmSync = enableMultiVmSync; + this.RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.EnableMultiVMSync = enableMultiVMSync; CustomInit(); } @@ -54,31 +51,30 @@ public InMageRcmPolicyCreationInput() /// partial void CustomInit(); + /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistoryInMinutes")] - public int? RecoveryPointHistoryInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistoryInMinutes")] + public int? RecoveryPointHistoryInMinutes {get; set; } /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the app consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. /// - [JsonProperty(PropertyName = "enableMultiVmSync")] - public string EnableMultiVmSync { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enableMultiVmSync")] + public string EnableMultiVMSync {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmPolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmPolicyDetails.cs index 4f480f5fefa7..6f133b1e054b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmPolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmPolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,20 +24,25 @@ public InMageRcmPolicyDetails() /// /// Initializes a new instance of the InMageRcmPolicyDetails class. /// - /// The duration in minutes - /// until which the recovery points need to be stored. - /// The app consistent - /// snapshot frequency in minutes. - /// The crash - /// consistent snapshot frequency in minutes. - /// A value indicating whether multi-VM - /// sync has to be enabled. - public InMageRcmPolicyDetails(int? recoveryPointHistoryInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), string enableMultiVmSync = default(string)) + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The app consistent snapshot frequency in minutes. + /// + + /// The crash consistent snapshot frequency in minutes. + /// + + /// A value indicating whether multi-VM sync has to be enabled. + /// + public InMageRcmPolicyDetails(int? recoveryPointHistoryInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), string enableMultiVMSync = default(string)) + { - RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - EnableMultiVmSync = enableMultiVmSync; + this.RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.EnableMultiVMSync = enableMultiVMSync; CustomInit(); } @@ -52,31 +51,30 @@ public InMageRcmPolicyDetails() /// partial void CustomInit(); + /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistoryInMinutes")] - public int? RecoveryPointHistoryInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistoryInMinutes")] + public int? RecoveryPointHistoryInMinutes {get; set; } /// /// Gets or sets the app consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the crash consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. /// - [JsonProperty(PropertyName = "enableMultiVmSync")] - public string EnableMultiVmSync { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enableMultiVmSync")] + public string EnableMultiVMSync {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmProtectedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmProtectedDiskDetails.cs index ce1b3f70f388..1472b9cd58d9 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmProtectedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmProtectedDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmProtectedDiskDetails { /// - /// Initializes a new instance of the InMageRcmProtectedDiskDetails - /// class. + /// Initializes a new instance of the InMageRcmProtectedDiskDetails class. /// public InMageRcmProtectedDiskDetails() { @@ -28,50 +21,71 @@ public InMageRcmProtectedDiskDetails() } /// - /// Initializes a new instance of the InMageRcmProtectedDiskDetails - /// class. - /// - /// The disk Id. - /// The disk name. - /// A value indicating whether the disk is the - /// OS disk. - /// The disk capacity in bytes. - /// The log storage account ARM - /// Id. - /// The DiskEncryptionSet ARM - /// Id. - /// The ARM Id of the seed managed - /// disk. - /// The uri of the seed blob. - /// The ARM Id of the target managed - /// disk. - /// The disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - /// The data pending in log - /// data store in MB. - /// The data pending at - /// source agent in MB. - /// A value indicating - /// whether initial replication is complete or not. - /// The initial replication details. - /// The resync details. - public InMageRcmProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string isOSDisk = default(string), long? capacityInBytes = default(long?), string logStorageAccountId = default(string), string diskEncryptionSetId = default(string), string seedManagedDiskId = default(string), string seedBlobUri = default(string), string targetManagedDiskId = default(string), string diskType = default(string), double? dataPendingInLogDataStoreInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?), string isInitialReplicationComplete = default(string), InMageRcmSyncDetails irDetails = default(InMageRcmSyncDetails), InMageRcmSyncDetails resyncDetails = default(InMageRcmSyncDetails)) + /// Initializes a new instance of the InMageRcmProtectedDiskDetails class. + /// + + /// The disk Id. + /// + + /// The disk name. + /// + + /// A value indicating whether the disk is the OS disk. + /// + + /// The disk capacity in bytes. + /// + + /// The log storage account ARM Id. + /// + + /// The DiskEncryptionSet ARM Id. + /// + + /// The ARM Id of the seed managed disk. + /// + + /// The uri of the seed blob. + /// + + /// The ARM Id of the target managed disk. + /// + + /// The disk type. + /// Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + + /// The data pending in log data store in MB. + /// + + /// The data pending at source agent in MB. + /// + + /// A value indicating whether initial replication is complete or not. + /// + + /// The initial replication details. + /// + + /// The resync details. + /// + public InMageRcmProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string isOSDisk = default(string), long? capacityInBytes = default(long?), string logStorageAccountId = default(string), string diskEncryptionSetId = default(string), string seedManagedDiskId = default(string), string seedBlobUri = default(string), string targetManagedDiskId = default(string), string diskType = default(string), double? dataPendingInLogDataStoreInMb = default(double?), double? dataPendingAtSourceAgentInMb = default(double?), string isInitialReplicationComplete = default(string), InMageRcmSyncDetails irDetails = default(InMageRcmSyncDetails), InMageRcmSyncDetails resyncDetails = default(InMageRcmSyncDetails)) + { - DiskId = diskId; - DiskName = diskName; - IsOSDisk = isOSDisk; - CapacityInBytes = capacityInBytes; - LogStorageAccountId = logStorageAccountId; - DiskEncryptionSetId = diskEncryptionSetId; - SeedManagedDiskId = seedManagedDiskId; - SeedBlobUri = seedBlobUri; - TargetManagedDiskId = targetManagedDiskId; - DiskType = diskType; - DataPendingInLogDataStoreInMB = dataPendingInLogDataStoreInMB; - DataPendingAtSourceAgentInMB = dataPendingAtSourceAgentInMB; - IsInitialReplicationComplete = isInitialReplicationComplete; - IrDetails = irDetails; - ResyncDetails = resyncDetails; + this.DiskId = diskId; + this.DiskName = diskName; + this.IsOSDisk = isOSDisk; + this.CapacityInBytes = capacityInBytes; + this.LogStorageAccountId = logStorageAccountId; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.SeedManagedDiskId = seedManagedDiskId; + this.SeedBlobUri = seedBlobUri; + this.TargetManagedDiskId = targetManagedDiskId; + this.DiskType = diskType; + this.DataPendingInLogDataStoreInMb = dataPendingInLogDataStoreInMb; + this.DataPendingAtSourceAgentInMb = dataPendingAtSourceAgentInMb; + this.IsInitialReplicationComplete = isInitialReplicationComplete; + this.IrDetails = irDetails; + this.ResyncDetails = resyncDetails; CustomInit(); } @@ -80,97 +94,95 @@ public InMageRcmProtectedDiskDetails() /// partial void CustomInit(); + /// /// Gets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; private set; } /// /// Gets the disk name. /// - [JsonProperty(PropertyName = "diskName")] - public string DiskName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskName")] + public string DiskName {get; private set; } /// /// Gets a value indicating whether the disk is the OS disk. /// - [JsonProperty(PropertyName = "isOSDisk")] - public string IsOSDisk { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isOSDisk")] + public string IsOSDisk {get; private set; } /// /// Gets the disk capacity in bytes. /// - [JsonProperty(PropertyName = "capacityInBytes")] - public long? CapacityInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "capacityInBytes")] + public long? CapacityInBytes {get; private set; } /// /// Gets the log storage account ARM Id. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; private set; } /// /// Gets the DiskEncryptionSet ARM Id. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; private set; } /// /// Gets the ARM Id of the seed managed disk. /// - [JsonProperty(PropertyName = "seedManagedDiskId")] - public string SeedManagedDiskId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedManagedDiskId")] + public string SeedManagedDiskId {get; private set; } /// /// Gets the uri of the seed blob. /// - [JsonProperty(PropertyName = "seedBlobUri")] - public string SeedBlobUri { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedBlobUri")] + public string SeedBlobUri {get; private set; } /// /// Gets the ARM Id of the target managed disk. /// - [JsonProperty(PropertyName = "targetManagedDiskId")] - public string TargetManagedDiskId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetManagedDiskId")] + public string TargetManagedDiskId {get; private set; } /// - /// Gets or sets the disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + /// Gets or sets the disk type. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// /// Gets the data pending in log data store in MB. /// - [JsonProperty(PropertyName = "dataPendingInLogDataStoreInMB")] - public double? DataPendingInLogDataStoreInMB { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPendingInLogDataStoreInMB")] + public double? DataPendingInLogDataStoreInMb {get; private set; } /// /// Gets the data pending at source agent in MB. /// - [JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] - public double? DataPendingAtSourceAgentInMB { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] + public double? DataPendingAtSourceAgentInMb {get; private set; } /// - /// Gets a value indicating whether initial replication is complete or - /// not. + /// Gets a value indicating whether initial replication is complete or not. /// - [JsonProperty(PropertyName = "isInitialReplicationComplete")] - public string IsInitialReplicationComplete { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isInitialReplicationComplete")] + public string IsInitialReplicationComplete {get; private set; } /// /// Gets or sets the initial replication details. /// - [JsonProperty(PropertyName = "irDetails")] - public InMageRcmSyncDetails IrDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "irDetails")] + public InMageRcmSyncDetails IrDetails {get; set; } /// /// Gets or sets the resync details. /// - [JsonProperty(PropertyName = "resyncDetails")] - public InMageRcmSyncDetails ResyncDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncDetails")] + public InMageRcmSyncDetails ResyncDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmProtectionContainerMappingDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmProtectionContainerMappingDetails.cs index e5f790616cf3..fbd1a1bcf989 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmProtectionContainerMappingDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmProtectionContainerMappingDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmProtectionContainerMappingDetails : ProtectionContainerMappingProviderSpecificDetails { /// - /// Initializes a new instance of the - /// InMageRcmProtectionContainerMappingDetails class. + /// Initializes a new instance of the InMageRcmProtectionContainerMappingDetails class. /// public InMageRcmProtectionContainerMappingDetails() { @@ -29,14 +22,15 @@ public InMageRcmProtectionContainerMappingDetails() } /// - /// Initializes a new instance of the - /// InMageRcmProtectionContainerMappingDetails class. + /// Initializes a new instance of the InMageRcmProtectionContainerMappingDetails class. /// - /// A value indicating whether the - /// flag for enable agent auto upgrade. + + /// A value indicating whether the flag for enable agent auto upgrade. + /// public InMageRcmProtectionContainerMappingDetails(string enableAgentAutoUpgrade = default(string)) + { - EnableAgentAutoUpgrade = enableAgentAutoUpgrade; + this.EnableAgentAutoUpgrade = enableAgentAutoUpgrade; CustomInit(); } @@ -45,12 +39,11 @@ public InMageRcmProtectionContainerMappingDetails() /// partial void CustomInit(); + /// - /// Gets a value indicating whether the flag for enable agent auto - /// upgrade. + /// Gets a value indicating whether the flag for enable agent auto upgrade. /// - [JsonProperty(PropertyName = "enableAgentAutoUpgrade")] - public string EnableAgentAutoUpgrade { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enableAgentAutoUpgrade")] + public string EnableAgentAutoUpgrade {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmRecoveryPointDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmRecoveryPointDetails.cs index 15965ef7ac36..18273d1d9ef8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmRecoveryPointDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmRecoveryPointDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmRecoveryPointDetails : ProviderSpecificRecoveryPointDetails { /// - /// Initializes a new instance of the InMageRcmRecoveryPointDetails - /// class. + /// Initializes a new instance of the InMageRcmRecoveryPointDetails class. /// public InMageRcmRecoveryPointDetails() { @@ -29,14 +22,15 @@ public InMageRcmRecoveryPointDetails() } /// - /// Initializes a new instance of the InMageRcmRecoveryPointDetails - /// class. + /// Initializes a new instance of the InMageRcmRecoveryPointDetails class. /// - /// A value indicating whether the - /// recovery point is multi VM consistent. - public InMageRcmRecoveryPointDetails(string isMultiVmSyncPoint = default(string)) + + /// A value indicating whether the recovery point is multi VM consistent. + /// + public InMageRcmRecoveryPointDetails(string isMultiVMSyncPoint = default(string)) + { - IsMultiVmSyncPoint = isMultiVmSyncPoint; + this.IsMultiVMSyncPoint = isMultiVMSyncPoint; CustomInit(); } @@ -45,12 +39,11 @@ public InMageRcmRecoveryPointDetails() /// partial void CustomInit(); + /// - /// Gets a value indicating whether the recovery point is multi VM - /// consistent. + /// Gets a value indicating whether the recovery point is multi VM consistent. /// - [JsonProperty(PropertyName = "isMultiVmSyncPoint")] - public string IsMultiVmSyncPoint { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isMultiVmSyncPoint")] + public string IsMultiVMSyncPoint {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmReplicationDetails.cs index 6b60028875a3..1e13ce18b1c4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmReplicationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmReplicationDetails : ReplicationProviderSpecificSettings { /// - /// Initializes a new instance of the InMageRcmReplicationDetails - /// class. + /// Initializes a new instance of the InMageRcmReplicationDetails class. /// public InMageRcmReplicationDetails() { @@ -31,163 +22,228 @@ public InMageRcmReplicationDetails() } /// - /// Initializes a new instance of the InMageRcmReplicationDetails - /// class. - /// - /// The virtual machine internal - /// identifier. - /// The ARM Id of the discovered - /// VM. - /// The multi VM group name. - /// The type of the discovered VM. - /// The process server Id. - /// The processor core count. - /// The allocated memory in - /// MB. - /// The process server name. - /// The run-as account Id. - /// The type of the OS on the VM. - /// The firmware type. - /// The IP address of the primary - /// network interface. - /// The target generation. - /// License Type of the VM to be - /// used. - /// The replication storage account ARM - /// Id. This is applicable only for the blob based replication test - /// hook. - /// Target VM name. - /// The target VM size. - /// The target resource group - /// Id. - /// The target location. - /// The target availability set - /// Id. - /// The target availability - /// zone. - /// The target proximity - /// placement group Id. - /// The target boot - /// diagnostics storage account ARM Id. - /// The target network Id. - /// The test network Id. - /// The recovery point Id to - /// which the VM was failed over. - /// The last recovery point - /// received time. - /// The last recovery point objective - /// value. - /// The last recovery point - /// objective calculated time. - /// The last recovery point - /// Id. - /// The initial - /// replication progress percentage. This is calculated based on total - /// bytes processed for all disks in the source VM. - /// The initial - /// replication processed bytes. This includes sum of total bytes - /// transferred and matched bytes on all selected disks in source - /// VM. - /// The initial - /// replication transferred bytes from source VM to azure for all - /// selected disks on source VM. - /// The initial - /// replication progress health. Possible values include: 'None', - /// 'InProgress', 'SlowProgress', 'NoProgress' - /// The resync progress - /// percentage. This is calculated based on total bytes processed for - /// all disks in the source VM. - /// The resync processed bytes. This - /// includes sum of total bytes transferred and matched bytes on all - /// selected disks in source VM. - /// The resync transferred bytes - /// from source VM to azure for all selected disks on source - /// VM. + /// Initializes a new instance of the InMageRcmReplicationDetails class. + /// + + /// The virtual machine internal identifier. + /// + + /// The ARM Id of the discovered VM. + /// + + /// The multi VM group name. + /// + + /// The type of the discovered VM. + /// + + /// The process server Id. + /// + + /// The processor core count. + /// + + /// The allocated memory in MB. + /// + + /// The process server name. + /// + + /// The run-as account Id. + /// + + /// The type of the OS on the VM. + /// + + /// The firmware type. + /// + + /// The IP address of the primary network interface. + /// + + /// The target generation. + /// + + /// License Type of the VM to be used. + /// + + /// The replication storage account ARM Id. This is applicable only for the + /// blob based replication test hook. + /// + + /// Target VM name. + /// + + /// The target VM size. + /// + + /// The target resource group Id. + /// + + /// The target location. + /// + + /// The target availability set Id. + /// + + /// The target availability zone. + /// + + /// The target proximity placement group Id. + /// + + /// The target boot diagnostics storage account ARM Id. + /// + + /// The target network Id. + /// + + /// The test network Id. + /// + + /// The recovery point Id to which the VM was failed over. + /// + + /// The last recovery point received time. + /// + + /// The last recovery point objective value. + /// + + /// The last recovery point objective calculated time. + /// + + /// The last recovery point Id. + /// + + /// The initial replication progress percentage. This is calculated based on + /// total bytes processed for all disks in the source VM. + /// + + /// The initial replication processed bytes. This includes sum of total bytes + /// transferred and matched bytes on all selected disks in source VM. + /// + + /// The initial replication transferred bytes from source VM to azure for all + /// selected disks on source VM. + /// + + /// The initial replication progress health. + /// Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' + + /// The resync progress percentage. This is calculated based on total bytes + /// processed for all disks in the source VM. + /// + + /// The resync processed bytes. This includes sum of total bytes transferred + /// and matched bytes on all selected disks in source VM. + /// + + /// The resync transferred bytes from source VM to azure for all selected disks + /// on source VM. + /// + /// The resync progress health. - /// Possible values include: 'None', 'InProgress', 'SlowProgress', - /// 'NoProgress' - /// A value indicating whether resync is - /// required. - /// The resync state. Possible values - /// include: 'None', 'PreparedForResynchronization', + /// Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' + + /// A value indicating whether resync is required. + /// + + /// The resync state. + /// Possible values include: 'None', 'PreparedForResynchronization', /// 'StartedResynchronization' + /// The agent auto upgrade state. - /// Possible values include: 'None', 'Started', 'Completed', - /// 'Commit' - /// The last agent upgrade - /// type. - /// The agent upgrade job Id. - /// The agent version to - /// which last agent upgrade was attempted. - /// The list of protected disks. - /// A value indicating whether - /// last agent upgrade was successful or not. - /// A value - /// indicating whether agent registration was successful after - /// failover. - /// The mobility agent - /// information. - /// The last agent upgrade - /// error information. - /// The agent upgrade - /// blocking error information. - /// The network details. - /// The discovered VM - /// details. - public InMageRcmReplicationDetails(string internalIdentifier = default(string), string fabricDiscoveryMachineId = default(string), string multiVmGroupName = default(string), string discoveryType = default(string), string processServerId = default(string), int? processorCoreCount = default(int?), double? allocatedMemoryInMB = default(double?), string processServerName = default(string), string runAsAccountId = default(string), string osType = default(string), string firmwareType = default(string), string primaryNicIpAddress = default(string), string targetGeneration = default(string), string licenseType = default(string), string storageAccountId = default(string), string targetVmName = default(string), string targetVmSize = default(string), string targetResourceGroupId = default(string), string targetLocation = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string targetNetworkId = default(string), string testNetworkId = default(string), string failoverRecoveryPointId = default(string), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?), long? lastRpoInSeconds = default(long?), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), string lastRecoveryPointId = default(string), int? initialReplicationProgressPercentage = default(int?), long? initialReplicationProcessedBytes = default(long?), long? initialReplicationTransferredBytes = default(long?), string initialReplicationProgressHealth = default(string), int? resyncProgressPercentage = default(int?), long? resyncProcessedBytes = default(long?), long? resyncTransferredBytes = default(long?), string resyncProgressHealth = default(string), string resyncRequired = default(string), string resyncState = default(string), string agentUpgradeState = default(string), string lastAgentUpgradeType = default(string), string agentUpgradeJobId = default(string), string agentUpgradeAttemptToVersion = default(string), IList protectedDisks = default(IList), string isLastUpgradeSuccessful = default(string), bool? isAgentRegistrationSuccessfulAfterFailover = default(bool?), InMageRcmMobilityAgentDetails mobilityAgentDetails = default(InMageRcmMobilityAgentDetails), IList lastAgentUpgradeErrorDetails = default(IList), IList agentUpgradeBlockingErrorDetails = default(IList), IList vmNics = default(IList), InMageRcmDiscoveredProtectedVmDetails discoveredVmDetails = default(InMageRcmDiscoveredProtectedVmDetails)) + /// Possible values include: 'None', 'Started', 'Completed', 'Commit' + + /// The last agent upgrade type. + /// + + /// The agent upgrade job Id. + /// + + /// The agent version to which last agent upgrade was attempted. + /// + + /// The list of protected disks. + /// + + /// A value indicating whether last agent upgrade was successful or not. + /// + + /// A value indicating whether agent registration was successful after + /// failover. + /// + + /// The mobility agent information. + /// + + /// The last agent upgrade error information. + /// + + /// The agent upgrade blocking error information. + /// + + /// The network details. + /// + + /// The discovered VM details. + /// + public InMageRcmReplicationDetails(string internalIdentifier = default(string), string fabricDiscoveryMachineId = default(string), string multiVMGroupName = default(string), string discoveryType = default(string), string processServerId = default(string), int? processorCoreCount = default(int?), double? allocatedMemoryInMb = default(double?), string processServerName = default(string), string runAsAccountId = default(string), string osType = default(string), string firmwareType = default(string), string primaryNicIPAddress = default(string), string targetGeneration = default(string), string licenseType = default(string), string storageAccountId = default(string), string targetVMName = default(string), string targetVMSize = default(string), string targetResourceGroupId = default(string), string targetLocation = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string targetNetworkId = default(string), string testNetworkId = default(string), string failoverRecoveryPointId = default(string), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?), long? lastRpoInSeconds = default(long?), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), string lastRecoveryPointId = default(string), int? initialReplicationProgressPercentage = default(int?), long? initialReplicationProcessedBytes = default(long?), long? initialReplicationTransferredBytes = default(long?), string initialReplicationProgressHealth = default(string), int? resyncProgressPercentage = default(int?), long? resyncProcessedBytes = default(long?), long? resyncTransferredBytes = default(long?), string resyncProgressHealth = default(string), string resyncRequired = default(string), string resyncState = default(string), string agentUpgradeState = default(string), string lastAgentUpgradeType = default(string), string agentUpgradeJobId = default(string), string agentUpgradeAttemptToVersion = default(string), System.Collections.Generic.IList protectedDisks = default(System.Collections.Generic.IList), string isLastUpgradeSuccessful = default(string), bool? isAgentRegistrationSuccessfulAfterFailover = default(bool?), InMageRcmMobilityAgentDetails mobilityAgentDetails = default(InMageRcmMobilityAgentDetails), System.Collections.Generic.IList lastAgentUpgradeErrorDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IList agentUpgradeBlockingErrorDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), InMageRcmDiscoveredProtectedVmDetails discoveredVMDetails = default(InMageRcmDiscoveredProtectedVmDetails)) + { - InternalIdentifier = internalIdentifier; - FabricDiscoveryMachineId = fabricDiscoveryMachineId; - MultiVmGroupName = multiVmGroupName; - DiscoveryType = discoveryType; - ProcessServerId = processServerId; - ProcessorCoreCount = processorCoreCount; - AllocatedMemoryInMB = allocatedMemoryInMB; - ProcessServerName = processServerName; - RunAsAccountId = runAsAccountId; - OsType = osType; - FirmwareType = firmwareType; - PrimaryNicIpAddress = primaryNicIpAddress; - TargetGeneration = targetGeneration; - LicenseType = licenseType; - StorageAccountId = storageAccountId; - TargetVmName = targetVmName; - TargetVmSize = targetVmSize; - TargetResourceGroupId = targetResourceGroupId; - TargetLocation = targetLocation; - TargetAvailabilitySetId = targetAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - TargetNetworkId = targetNetworkId; - TestNetworkId = testNetworkId; - FailoverRecoveryPointId = failoverRecoveryPointId; - LastRecoveryPointReceived = lastRecoveryPointReceived; - LastRpoInSeconds = lastRpoInSeconds; - LastRpoCalculatedTime = lastRpoCalculatedTime; - LastRecoveryPointId = lastRecoveryPointId; - InitialReplicationProgressPercentage = initialReplicationProgressPercentage; - InitialReplicationProcessedBytes = initialReplicationProcessedBytes; - InitialReplicationTransferredBytes = initialReplicationTransferredBytes; - InitialReplicationProgressHealth = initialReplicationProgressHealth; - ResyncProgressPercentage = resyncProgressPercentage; - ResyncProcessedBytes = resyncProcessedBytes; - ResyncTransferredBytes = resyncTransferredBytes; - ResyncProgressHealth = resyncProgressHealth; - ResyncRequired = resyncRequired; - ResyncState = resyncState; - AgentUpgradeState = agentUpgradeState; - LastAgentUpgradeType = lastAgentUpgradeType; - AgentUpgradeJobId = agentUpgradeJobId; - AgentUpgradeAttemptToVersion = agentUpgradeAttemptToVersion; - ProtectedDisks = protectedDisks; - IsLastUpgradeSuccessful = isLastUpgradeSuccessful; - IsAgentRegistrationSuccessfulAfterFailover = isAgentRegistrationSuccessfulAfterFailover; - MobilityAgentDetails = mobilityAgentDetails; - LastAgentUpgradeErrorDetails = lastAgentUpgradeErrorDetails; - AgentUpgradeBlockingErrorDetails = agentUpgradeBlockingErrorDetails; - VmNics = vmNics; - DiscoveredVmDetails = discoveredVmDetails; + this.InternalIdentifier = internalIdentifier; + this.FabricDiscoveryMachineId = fabricDiscoveryMachineId; + this.MultiVMGroupName = multiVMGroupName; + this.DiscoveryType = discoveryType; + this.ProcessServerId = processServerId; + this.ProcessorCoreCount = processorCoreCount; + this.AllocatedMemoryInMb = allocatedMemoryInMb; + this.ProcessServerName = processServerName; + this.RunAsAccountId = runAsAccountId; + this.OSType = osType; + this.FirmwareType = firmwareType; + this.PrimaryNicIPAddress = primaryNicIPAddress; + this.TargetGeneration = targetGeneration; + this.LicenseType = licenseType; + this.StorageAccountId = storageAccountId; + this.TargetVMName = targetVMName; + this.TargetVMSize = targetVMSize; + this.TargetResourceGroupId = targetResourceGroupId; + this.TargetLocation = targetLocation; + this.TargetAvailabilitySetId = targetAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; + this.TargetNetworkId = targetNetworkId; + this.TestNetworkId = testNetworkId; + this.FailoverRecoveryPointId = failoverRecoveryPointId; + this.LastRecoveryPointReceived = lastRecoveryPointReceived; + this.LastRpoInSeconds = lastRpoInSeconds; + this.LastRpoCalculatedTime = lastRpoCalculatedTime; + this.LastRecoveryPointId = lastRecoveryPointId; + this.InitialReplicationProgressPercentage = initialReplicationProgressPercentage; + this.InitialReplicationProcessedBytes = initialReplicationProcessedBytes; + this.InitialReplicationTransferredBytes = initialReplicationTransferredBytes; + this.InitialReplicationProgressHealth = initialReplicationProgressHealth; + this.ResyncProgressPercentage = resyncProgressPercentage; + this.ResyncProcessedBytes = resyncProcessedBytes; + this.ResyncTransferredBytes = resyncTransferredBytes; + this.ResyncProgressHealth = resyncProgressHealth; + this.ResyncRequired = resyncRequired; + this.ResyncState = resyncState; + this.AgentUpgradeState = agentUpgradeState; + this.LastAgentUpgradeType = lastAgentUpgradeType; + this.AgentUpgradeJobId = agentUpgradeJobId; + this.AgentUpgradeAttemptToVersion = agentUpgradeAttemptToVersion; + this.ProtectedDisks = protectedDisks; + this.IsLastUpgradeSuccessful = isLastUpgradeSuccessful; + this.IsAgentRegistrationSuccessfulAfterFailover = isAgentRegistrationSuccessfulAfterFailover; + this.MobilityAgentDetails = mobilityAgentDetails; + this.LastAgentUpgradeErrorDetails = lastAgentUpgradeErrorDetails; + this.AgentUpgradeBlockingErrorDetails = agentUpgradeBlockingErrorDetails; + this.VMNics = vmNics; + this.DiscoveredVMDetails = discoveredVMDetails; CustomInit(); } @@ -196,332 +252,325 @@ public InMageRcmReplicationDetails() /// partial void CustomInit(); + /// /// Gets the virtual machine internal identifier. /// - [JsonProperty(PropertyName = "internalIdentifier")] - public string InternalIdentifier { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "internalIdentifier")] + public string InternalIdentifier {get; private set; } /// /// Gets the ARM Id of the discovered VM. /// - [JsonProperty(PropertyName = "fabricDiscoveryMachineId")] - public string FabricDiscoveryMachineId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricDiscoveryMachineId")] + public string FabricDiscoveryMachineId {get; private set; } /// /// Gets the multi VM group name. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; private set; } /// /// Gets the type of the discovered VM. /// - [JsonProperty(PropertyName = "discoveryType")] - public string DiscoveryType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "discoveryType")] + public string DiscoveryType {get; private set; } /// /// Gets the process server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; private set; } /// /// Gets the processor core count. /// - [JsonProperty(PropertyName = "processorCoreCount")] - public int? ProcessorCoreCount { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processorCoreCount")] + public int? ProcessorCoreCount {get; private set; } /// /// Gets the allocated memory in MB. /// - [JsonProperty(PropertyName = "allocatedMemoryInMB")] - public double? AllocatedMemoryInMB { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allocatedMemoryInMB")] + public double? AllocatedMemoryInMb {get; private set; } /// /// Gets the process server name. /// - [JsonProperty(PropertyName = "processServerName")] - public string ProcessServerName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerName")] + public string ProcessServerName {get; private set; } /// /// Gets the run-as account Id. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; private set; } /// /// Gets the type of the OS on the VM. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; private set; } /// /// Gets the firmware type. /// - [JsonProperty(PropertyName = "firmwareType")] - public string FirmwareType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "firmwareType")] + public string FirmwareType {get; private set; } /// /// Gets the IP address of the primary network interface. /// - [JsonProperty(PropertyName = "primaryNicIpAddress")] - public string PrimaryNicIpAddress { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryNicIpAddress")] + public string PrimaryNicIPAddress {get; private set; } /// /// Gets the target generation. /// - [JsonProperty(PropertyName = "targetGeneration")] - public string TargetGeneration { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetGeneration")] + public string TargetGeneration {get; private set; } /// /// Gets or sets license Type of the VM to be used. /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// - /// Gets the replication storage account ARM Id. This is applicable - /// only for the blob based replication test hook. + /// Gets the replication storage account ARM Id. This is applicable only for + /// the blob based replication test hook. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; private set; } /// /// Gets or sets target VM name. /// - [JsonProperty(PropertyName = "targetVmName")] - public string TargetVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmName")] + public string TargetVMName {get; set; } /// /// Gets or sets the target VM size. /// - [JsonProperty(PropertyName = "targetVmSize")] - public string TargetVmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSize")] + public string TargetVMSize {get; set; } /// /// Gets or sets the target resource group Id. /// - [JsonProperty(PropertyName = "targetResourceGroupId")] - public string TargetResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroupId")] + public string TargetResourceGroupId {get; set; } /// /// Gets or sets the target location. /// - [JsonProperty(PropertyName = "targetLocation")] - public string TargetLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetLocation")] + public string TargetLocation {get; set; } /// /// Gets or sets the target availability set Id. /// - [JsonProperty(PropertyName = "targetAvailabilitySetId")] - public string TargetAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilitySetId")] + public string TargetAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target proximity placement group Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// /// Gets or sets the target boot diagnostics storage account ARM Id. /// - [JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] - public string TargetBootDiagnosticsStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] + public string TargetBootDiagnosticsStorageAccountId {get; set; } /// /// Gets or sets the target network Id. /// - [JsonProperty(PropertyName = "targetNetworkId")] - public string TargetNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNetworkId")] + public string TargetNetworkId {get; set; } /// /// Gets or sets the test network Id. /// - [JsonProperty(PropertyName = "testNetworkId")] - public string TestNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testNetworkId")] + public string TestNetworkId {get; set; } /// /// Gets the recovery point Id to which the VM was failed over. /// - [JsonProperty(PropertyName = "failoverRecoveryPointId")] - public string FailoverRecoveryPointId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverRecoveryPointId")] + public string FailoverRecoveryPointId {get; private set; } /// /// Gets the last recovery point received time. /// - [JsonProperty(PropertyName = "lastRecoveryPointReceived")] - public System.DateTime? LastRecoveryPointReceived { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRecoveryPointReceived")] + public System.DateTime? LastRecoveryPointReceived {get; private set; } /// /// Gets the last recovery point objective value. /// - [JsonProperty(PropertyName = "lastRpoInSeconds")] - public long? LastRpoInSeconds { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRpoInSeconds")] + public long? LastRpoInSeconds {get; private set; } /// /// Gets the last recovery point objective calculated time. /// - [JsonProperty(PropertyName = "lastRpoCalculatedTime")] - public System.DateTime? LastRpoCalculatedTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRpoCalculatedTime")] + public System.DateTime? LastRpoCalculatedTime {get; private set; } /// /// Gets the last recovery point Id. /// - [JsonProperty(PropertyName = "lastRecoveryPointId")] - public string LastRecoveryPointId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRecoveryPointId")] + public string LastRecoveryPointId {get; private set; } /// - /// Gets the initial replication progress percentage. This is - /// calculated based on total bytes processed for all disks in the - /// source VM. + /// Gets the initial replication progress percentage. This is calculated based + /// on total bytes processed for all disks in the source VM. /// - [JsonProperty(PropertyName = "initialReplicationProgressPercentage")] - public int? InitialReplicationProgressPercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationProgressPercentage")] + public int? InitialReplicationProgressPercentage {get; private set; } /// - /// Gets the initial replication processed bytes. This includes sum of - /// total bytes transferred and matched bytes on all selected disks in - /// source VM. + /// Gets the initial replication processed bytes. This includes sum of total + /// bytes transferred and matched bytes on all selected disks in source VM. /// - [JsonProperty(PropertyName = "initialReplicationProcessedBytes")] - public long? InitialReplicationProcessedBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationProcessedBytes")] + public long? InitialReplicationProcessedBytes {get; private set; } /// - /// Gets the initial replication transferred bytes from source VM to - /// azure for all selected disks on source VM. + /// Gets the initial replication transferred bytes from source VM to azure for + /// all selected disks on source VM. /// - [JsonProperty(PropertyName = "initialReplicationTransferredBytes")] - public long? InitialReplicationTransferredBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationTransferredBytes")] + public long? InitialReplicationTransferredBytes {get; private set; } /// - /// Gets the initial replication progress health. Possible values - /// include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' + /// Gets the initial replication progress health. Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' /// - [JsonProperty(PropertyName = "initialReplicationProgressHealth")] - public string InitialReplicationProgressHealth { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationProgressHealth")] + public string InitialReplicationProgressHealth {get; private set; } /// - /// Gets the resync progress percentage. This is calculated based on - /// total bytes processed for all disks in the source VM. + /// Gets the resync progress percentage. This is calculated based on total + /// bytes processed for all disks in the source VM. /// - [JsonProperty(PropertyName = "resyncProgressPercentage")] - public int? ResyncProgressPercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage {get; private set; } /// /// Gets the resync processed bytes. This includes sum of total bytes /// transferred and matched bytes on all selected disks in source VM. /// - [JsonProperty(PropertyName = "resyncProcessedBytes")] - public long? ResyncProcessedBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProcessedBytes")] + public long? ResyncProcessedBytes {get; private set; } /// - /// Gets the resync transferred bytes from source VM to azure for all - /// selected disks on source VM. + /// Gets the resync transferred bytes from source VM to azure for all selected + /// disks on source VM. /// - [JsonProperty(PropertyName = "resyncTransferredBytes")] - public long? ResyncTransferredBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncTransferredBytes")] + public long? ResyncTransferredBytes {get; private set; } /// - /// Gets the resync progress health. Possible values include: 'None', - /// 'InProgress', 'SlowProgress', 'NoProgress' + /// Gets the resync progress health. Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress' /// - [JsonProperty(PropertyName = "resyncProgressHealth")] - public string ResyncProgressHealth { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProgressHealth")] + public string ResyncProgressHealth {get; private set; } /// /// Gets a value indicating whether resync is required. /// - [JsonProperty(PropertyName = "resyncRequired")] - public string ResyncRequired { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncRequired")] + public string ResyncRequired {get; private set; } /// - /// Gets the resync state. Possible values include: 'None', - /// 'PreparedForResynchronization', 'StartedResynchronization' + /// Gets the resync state. Possible values include: 'None', 'PreparedForResynchronization', 'StartedResynchronization' /// - [JsonProperty(PropertyName = "resyncState")] - public string ResyncState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncState")] + public string ResyncState {get; private set; } /// - /// Gets the agent auto upgrade state. Possible values include: 'None', - /// 'Started', 'Completed', 'Commit' + /// Gets the agent auto upgrade state. Possible values include: 'None', 'Started', 'Completed', 'Commit' /// - [JsonProperty(PropertyName = "agentUpgradeState")] - public string AgentUpgradeState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentUpgradeState")] + public string AgentUpgradeState {get; private set; } /// /// Gets the last agent upgrade type. /// - [JsonProperty(PropertyName = "lastAgentUpgradeType")] - public string LastAgentUpgradeType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastAgentUpgradeType")] + public string LastAgentUpgradeType {get; private set; } /// /// Gets the agent upgrade job Id. /// - [JsonProperty(PropertyName = "agentUpgradeJobId")] - public string AgentUpgradeJobId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentUpgradeJobId")] + public string AgentUpgradeJobId {get; private set; } /// /// Gets the agent version to which last agent upgrade was attempted. /// - [JsonProperty(PropertyName = "agentUpgradeAttemptToVersion")] - public string AgentUpgradeAttemptToVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentUpgradeAttemptToVersion")] + public string AgentUpgradeAttemptToVersion {get; private set; } /// /// Gets or sets the list of protected disks. /// - [JsonProperty(PropertyName = "protectedDisks")] - public IList ProtectedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedDisks")] + public System.Collections.Generic.IList ProtectedDisks {get; set; } /// - /// Gets a value indicating whether last agent upgrade was successful - /// or not. + /// Gets a value indicating whether last agent upgrade was successful or not. /// - [JsonProperty(PropertyName = "isLastUpgradeSuccessful")] - public string IsLastUpgradeSuccessful { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isLastUpgradeSuccessful")] + public string IsLastUpgradeSuccessful {get; private set; } /// - /// Gets a value indicating whether agent registration was successful - /// after failover. + /// Gets a value indicating whether agent registration was successful after + /// failover. /// - [JsonProperty(PropertyName = "isAgentRegistrationSuccessfulAfterFailover")] - public bool? IsAgentRegistrationSuccessfulAfterFailover { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isAgentRegistrationSuccessfulAfterFailover")] + public bool? IsAgentRegistrationSuccessfulAfterFailover {get; private set; } /// /// Gets or sets the mobility agent information. /// - [JsonProperty(PropertyName = "mobilityAgentDetails")] - public InMageRcmMobilityAgentDetails MobilityAgentDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mobilityAgentDetails")] + public InMageRcmMobilityAgentDetails MobilityAgentDetails {get; set; } /// /// Gets or sets the last agent upgrade error information. /// - [JsonProperty(PropertyName = "lastAgentUpgradeErrorDetails")] - public IList LastAgentUpgradeErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastAgentUpgradeErrorDetails")] + public System.Collections.Generic.IList LastAgentUpgradeErrorDetails {get; set; } /// /// Gets or sets the agent upgrade blocking error information. /// - [JsonProperty(PropertyName = "agentUpgradeBlockingErrorDetails")] - public IList AgentUpgradeBlockingErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentUpgradeBlockingErrorDetails")] + public System.Collections.Generic.IList AgentUpgradeBlockingErrorDetails {get; set; } /// /// Gets or sets the network details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets the discovered VM details. /// - [JsonProperty(PropertyName = "discoveredVmDetails")] - public InMageRcmDiscoveredProtectedVmDetails DiscoveredVmDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "discoveredVmDetails")] + public InMageRcmDiscoveredProtectedVmDetails DiscoveredVMDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmReprotectInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmReprotectInput.cs index c963c886439a..e88ad86085cb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmReprotectInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmReprotectInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -31,17 +24,25 @@ public InMageRcmReprotectInput() /// /// Initializes a new instance of the InMageRcmReprotectInput class. /// - /// The reprotect agent Id. - /// The target datastore name. - /// The log storage account ARM - /// Id. - /// The Policy Id. + + /// The reprotect agent Id. + /// + + /// The target datastore name. + /// + + /// The log storage account ARM Id. + /// + + /// The Policy Id. + /// public InMageRcmReprotectInput(string reprotectAgentId, string datastoreName, string logStorageAccountId, string policyId = default(string)) + { - ReprotectAgentId = reprotectAgentId; - DatastoreName = datastoreName; - LogStorageAccountId = logStorageAccountId; - PolicyId = policyId; + this.ReprotectAgentId = reprotectAgentId; + this.DatastoreName = datastoreName; + this.LogStorageAccountId = logStorageAccountId; + this.PolicyId = policyId; CustomInit(); } @@ -50,50 +51,54 @@ public InMageRcmReprotectInput() /// partial void CustomInit(); + /// /// Gets or sets the reprotect agent Id. /// - [JsonProperty(PropertyName = "reprotectAgentId")] - public string ReprotectAgentId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reprotectAgentId")] + public string ReprotectAgentId {get; set; } /// /// Gets or sets the target datastore name. /// - [JsonProperty(PropertyName = "datastoreName")] - public string DatastoreName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datastoreName")] + public string DatastoreName {get; set; } /// /// Gets or sets the log storage account ARM Id. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } /// /// Gets or sets the Policy Id. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ReprotectAgentId == null) + if (this.ReprotectAgentId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ReprotectAgentId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReprotectAgentId"); } - if (DatastoreName == null) + if (this.DatastoreName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DatastoreName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DatastoreName"); } - if (LogStorageAccountId == null) + if (this.LogStorageAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "LogStorageAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "LogStorageAccountId"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmSyncDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmSyncDetails.cs index 3bc0b95fa574..94a54eef4683 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmSyncDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmSyncDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,32 +23,44 @@ public InMageRcmSyncDetails() /// /// Initializes a new instance of the InMageRcmSyncDetails class. /// - /// The progress health. Possible values - /// include: 'None', 'InProgress', 'SlowProgress', 'NoProgress', - /// 'Queued' - /// The transferred bytes from source VM - /// to azure for the disk. - /// The bytes transferred - /// in last 15 minutes from source VM to azure. - /// The time of the last data - /// transfer from source VM to azure. - /// The total processed bytes. This - /// includes bytes that are transferred from source VM to azure and - /// matched bytes. - /// The start time. - /// The last refresh time. - /// Progress in percentage. Progress - /// percentage is calculated based on processed bytes. + + /// The progress health. + /// Possible values include: 'None', 'InProgress', 'SlowProgress', + /// 'NoProgress', 'Queued' + + /// The transferred bytes from source VM to azure for the disk. + /// + + /// The bytes transferred in last 15 minutes from source VM to azure. + /// + + /// The time of the last data transfer from source VM to azure. + /// + + /// The total processed bytes. This includes bytes that are transferred from + /// source VM to azure and matched bytes. + /// + + /// The start time. + /// + + /// The last refresh time. + /// + + /// Progress in percentage. Progress percentage is calculated based on + /// processed bytes. + /// public InMageRcmSyncDetails(string progressHealth = default(string), long? transferredBytes = default(long?), long? last15MinutesTransferredBytes = default(long?), string lastDataTransferTimeUtc = default(string), long? processedBytes = default(long?), string startTime = default(string), string lastRefreshTime = default(string), int? progressPercentage = default(int?)) + { - ProgressHealth = progressHealth; - TransferredBytes = transferredBytes; - Last15MinutesTransferredBytes = last15MinutesTransferredBytes; - LastDataTransferTimeUtc = lastDataTransferTimeUtc; - ProcessedBytes = processedBytes; - StartTime = startTime; - LastRefreshTime = lastRefreshTime; - ProgressPercentage = progressPercentage; + this.ProgressHealth = progressHealth; + this.TransferredBytes = transferredBytes; + this.Last15MinutesTransferredBytes = last15MinutesTransferredBytes; + this.LastDataTransferTimeUtc = lastDataTransferTimeUtc; + this.ProcessedBytes = processedBytes; + this.StartTime = startTime; + this.LastRefreshTime = lastRefreshTime; + this.ProgressPercentage = progressPercentage; CustomInit(); } @@ -63,57 +69,55 @@ public InMageRcmSyncDetails() /// partial void CustomInit(); + /// - /// Gets the progress health. Possible values include: 'None', - /// 'InProgress', 'SlowProgress', 'NoProgress', 'Queued' + /// Gets the progress health. Possible values include: 'None', 'InProgress', 'SlowProgress', 'NoProgress', 'Queued' /// - [JsonProperty(PropertyName = "progressHealth")] - public string ProgressHealth { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "progressHealth")] + public string ProgressHealth {get; private set; } /// /// Gets the transferred bytes from source VM to azure for the disk. /// - [JsonProperty(PropertyName = "transferredBytes")] - public long? TransferredBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "transferredBytes")] + public long? TransferredBytes {get; private set; } /// - /// Gets the bytes transferred in last 15 minutes from source VM to - /// azure. + /// Gets the bytes transferred in last 15 minutes from source VM to azure. /// - [JsonProperty(PropertyName = "last15MinutesTransferredBytes")] - public long? Last15MinutesTransferredBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "last15MinutesTransferredBytes")] + public long? Last15MinutesTransferredBytes {get; private set; } /// /// Gets the time of the last data transfer from source VM to azure. /// - [JsonProperty(PropertyName = "lastDataTransferTimeUtc")] - public string LastDataTransferTimeUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastDataTransferTimeUtc")] + public string LastDataTransferTimeUtc {get; private set; } /// - /// Gets the total processed bytes. This includes bytes that are - /// transferred from source VM to azure and matched bytes. + /// Gets the total processed bytes. This includes bytes that are transferred + /// from source VM to azure and matched bytes. /// - [JsonProperty(PropertyName = "processedBytes")] - public long? ProcessedBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processedBytes")] + public long? ProcessedBytes {get; private set; } /// /// Gets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public string StartTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public string StartTime {get; private set; } /// /// Gets the last refresh time. /// - [JsonProperty(PropertyName = "lastRefreshTime")] - public string LastRefreshTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRefreshTime")] + public string LastRefreshTime {get; private set; } /// - /// Gets progress in percentage. Progress percentage is calculated - /// based on processed bytes. + /// Gets progress in percentage. Progress percentage is calculated based on + /// processed bytes. /// - [JsonProperty(PropertyName = "progressPercentage")] - public int? ProgressPercentage { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "progressPercentage")] + public int? ProgressPercentage {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmTestFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmTestFailoverInput.cs index 22f2ba02819b..29b6d451a9fc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmTestFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmTestFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,14 +24,18 @@ public InMageRcmTestFailoverInput() /// /// Initializes a new instance of the InMageRcmTestFailoverInput class. /// - /// The test network Id. - /// The recovery point id to be passed to - /// test failover to a particular recovery point. In case of latest - /// recovery point, null should be passed. + + /// The test network Id. + /// + + /// The recovery point id to be passed to test failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. + /// public InMageRcmTestFailoverInput(string networkId = default(string), string recoveryPointId = default(string)) + { - NetworkId = networkId; - RecoveryPointId = recoveryPointId; + this.NetworkId = networkId; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -46,19 +44,19 @@ public InMageRcmTestFailoverInput() /// partial void CustomInit(); + /// /// Gets or sets the test network Id. /// - [JsonProperty(PropertyName = "networkId")] - public string NetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkId")] + public string NetworkId {get; set; } /// - /// Gets or sets the recovery point id to be passed to test failover to - /// a particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to test failover to a + /// particular recovery point. In case of latest recovery point, null should be + /// passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUnplannedFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUnplannedFailoverInput.cs index 9b54f303fdec..2c3a9e9c1882 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUnplannedFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUnplannedFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmUnplannedFailoverInput : UnplannedFailoverProviderSpecificInput { /// - /// Initializes a new instance of the InMageRcmUnplannedFailoverInput - /// class. + /// Initializes a new instance of the InMageRcmUnplannedFailoverInput class. /// public InMageRcmUnplannedFailoverInput() { @@ -30,18 +22,20 @@ public InMageRcmUnplannedFailoverInput() } /// - /// Initializes a new instance of the InMageRcmUnplannedFailoverInput - /// class. + /// Initializes a new instance of the InMageRcmUnplannedFailoverInput class. /// - /// A value indicating whether VM is to - /// be shutdown. - /// The recovery point id to be passed to - /// failover to a particular recovery point. In case of latest recovery - /// point, null should be passed. + + /// A value indicating whether VM is to be shutdown. + /// + + /// The recovery point id to be passed to failover to a particular recovery + /// point. In case of latest recovery point, null should be passed. + /// public InMageRcmUnplannedFailoverInput(string performShutdown, string recoveryPointId = default(string)) + { - PerformShutdown = performShutdown; - RecoveryPointId = recoveryPointId; + this.PerformShutdown = performShutdown; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -50,32 +44,33 @@ public InMageRcmUnplannedFailoverInput() /// partial void CustomInit(); + /// /// Gets or sets a value indicating whether VM is to be shutdown. /// - [JsonProperty(PropertyName = "performShutdown")] - public string PerformShutdown { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "performShutdown")] + public string PerformShutdown {get; set; } /// - /// Gets or sets the recovery point id to be passed to failover to a - /// particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PerformShutdown == null) + if (this.PerformShutdown == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PerformShutdown"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PerformShutdown"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateApplianceForReplicationProtectedItemInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateApplianceForReplicationProtectedItemInput.cs index 85eab6405031..b41a51133d87 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateApplianceForReplicationProtectedItemInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateApplianceForReplicationProtectedItemInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +15,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmUpdateApplianceForReplicationProtectedItemInput : UpdateApplianceForReplicationProtectedItemProviderSpecificInput { /// - /// Initializes a new instance of the - /// InMageRcmUpdateApplianceForReplicationProtectedItemInput class. + /// Initializes a new instance of the InMageRcmUpdateApplianceForReplicationProtectedItemInput class. /// public InMageRcmUpdateApplianceForReplicationProtectedItemInput() { @@ -30,13 +23,15 @@ public InMageRcmUpdateApplianceForReplicationProtectedItemInput() } /// - /// Initializes a new instance of the - /// InMageRcmUpdateApplianceForReplicationProtectedItemInput class. + /// Initializes a new instance of the InMageRcmUpdateApplianceForReplicationProtectedItemInput class. /// - /// The run as account Id. + + /// The run as account Id. + /// public InMageRcmUpdateApplianceForReplicationProtectedItemInput(string runAsAccountId = default(string)) + { - RunAsAccountId = runAsAccountId; + this.RunAsAccountId = runAsAccountId; CustomInit(); } @@ -45,11 +40,11 @@ public InMageRcmUpdateApplianceForReplicationProtectedItemInput() /// partial void CustomInit(); + /// /// Gets or sets the run as account Id. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateContainerMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateContainerMappingInput.cs index 2c1b0cac383c..4dba08030cf7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateContainerMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateContainerMappingInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmUpdateContainerMappingInput : ReplicationProviderSpecificUpdateContainerMappingInput { /// - /// Initializes a new instance of the - /// InMageRcmUpdateContainerMappingInput class. + /// Initializes a new instance of the InMageRcmUpdateContainerMappingInput class. /// public InMageRcmUpdateContainerMappingInput() { @@ -30,14 +22,15 @@ public InMageRcmUpdateContainerMappingInput() } /// - /// Initializes a new instance of the - /// InMageRcmUpdateContainerMappingInput class. + /// Initializes a new instance of the InMageRcmUpdateContainerMappingInput class. /// - /// A value indicating whether - /// agent auto upgrade has to be enabled. + + /// A value indicating whether agent auto upgrade has to be enabled. + /// public InMageRcmUpdateContainerMappingInput(string enableAgentAutoUpgrade) + { - EnableAgentAutoUpgrade = enableAgentAutoUpgrade; + this.EnableAgentAutoUpgrade = enableAgentAutoUpgrade; CustomInit(); } @@ -46,25 +39,26 @@ public InMageRcmUpdateContainerMappingInput(string enableAgentAutoUpgrade) /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether agent auto upgrade has to - /// be enabled. + /// Gets or sets a value indicating whether agent auto upgrade has to be + /// enabled. /// - [JsonProperty(PropertyName = "enableAgentAutoUpgrade")] - public string EnableAgentAutoUpgrade { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enableAgentAutoUpgrade")] + public string EnableAgentAutoUpgrade {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (EnableAgentAutoUpgrade == null) + if (this.EnableAgentAutoUpgrade == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "EnableAgentAutoUpgrade"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "EnableAgentAutoUpgrade"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateReplicationProtectedItemInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateReplicationProtectedItemInput.cs index 14a802856a58..9990f9f94e94 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateReplicationProtectedItemInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageRcmUpdateReplicationProtectedItemInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageRcmUpdateReplicationProtectedItemInput : UpdateReplicationProtectedItemProviderInput { /// - /// Initializes a new instance of the - /// InMageRcmUpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the InMageRcmUpdateReplicationProtectedItemInput class. /// public InMageRcmUpdateReplicationProtectedItemInput() { @@ -31,39 +22,55 @@ public InMageRcmUpdateReplicationProtectedItemInput() } /// - /// Initializes a new instance of the - /// InMageRcmUpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the InMageRcmUpdateReplicationProtectedItemInput class. /// - /// The target VM name. - /// The target VM size. - /// The target resource group ARM - /// Id. - /// The target availability set - /// ARM Id. - /// The target availability - /// zone. - /// The target proximity - /// placement group Id. - /// The target boot - /// diagnostics storage account ARM Id. - /// The target network ARM Id. - /// The test network ARM Id. - /// The list of NIC details. - /// The license type. Possible values - /// include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' - public InMageRcmUpdateReplicationProtectedItemInput(string targetVmName = default(string), string targetVmSize = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string targetNetworkId = default(string), string testNetworkId = default(string), IList vmNics = default(IList), string licenseType = default(string)) + + /// The target VM name. + /// + + /// The target VM size. + /// + + /// The target resource group ARM Id. + /// + + /// The target availability set ARM Id. + /// + + /// The target availability zone. + /// + + /// The target proximity placement group Id. + /// + + /// The target boot diagnostics storage account ARM Id. + /// + + /// The target network ARM Id. + /// + + /// The test network ARM Id. + /// + + /// The list of NIC details. + /// + + /// The license type. + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' + public InMageRcmUpdateReplicationProtectedItemInput(string targetVMName = default(string), string targetVMSize = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string targetNetworkId = default(string), string testNetworkId = default(string), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), string licenseType = default(string)) + { - TargetVmName = targetVmName; - TargetVmSize = targetVmSize; - TargetResourceGroupId = targetResourceGroupId; - TargetAvailabilitySetId = targetAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - TargetNetworkId = targetNetworkId; - TestNetworkId = testNetworkId; - VmNics = vmNics; - LicenseType = licenseType; + this.TargetVMName = targetVMName; + this.TargetVMSize = targetVMSize; + this.TargetResourceGroupId = targetResourceGroupId; + this.TargetAvailabilitySetId = targetAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; + this.TargetNetworkId = targetNetworkId; + this.TestNetworkId = testNetworkId; + this.VMNics = vmNics; + this.LicenseType = licenseType; CustomInit(); } @@ -72,72 +79,71 @@ public InMageRcmUpdateReplicationProtectedItemInput() /// partial void CustomInit(); + /// /// Gets or sets the target VM name. /// - [JsonProperty(PropertyName = "targetVmName")] - public string TargetVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmName")] + public string TargetVMName {get; set; } /// /// Gets or sets the target VM size. /// - [JsonProperty(PropertyName = "targetVmSize")] - public string TargetVmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSize")] + public string TargetVMSize {get; set; } /// /// Gets or sets the target resource group ARM Id. /// - [JsonProperty(PropertyName = "targetResourceGroupId")] - public string TargetResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroupId")] + public string TargetResourceGroupId {get; set; } /// /// Gets or sets the target availability set ARM Id. /// - [JsonProperty(PropertyName = "targetAvailabilitySetId")] - public string TargetAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilitySetId")] + public string TargetAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target proximity placement group Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// /// Gets or sets the target boot diagnostics storage account ARM Id. /// - [JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] - public string TargetBootDiagnosticsStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] + public string TargetBootDiagnosticsStorageAccountId {get; set; } /// /// Gets or sets the target network ARM Id. /// - [JsonProperty(PropertyName = "targetNetworkId")] - public string TargetNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNetworkId")] + public string TargetNetworkId {get; set; } /// /// Gets or sets the test network ARM Id. /// - [JsonProperty(PropertyName = "testNetworkId")] - public string TestNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testNetworkId")] + public string TestNetworkId {get; set; } /// /// Gets or sets the list of NIC details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// - /// Gets or sets the license type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'WindowsServer' + /// Gets or sets the license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageReplicationDetails.cs index 3160559f812c..f658a6346ca5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageReplicationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,118 +24,175 @@ public InMageReplicationDetails() /// /// Initializes a new instance of the InMageReplicationDetails class. /// - /// The active location of the VM. If the - /// VM is being protected from Azure, this field will take values from - /// { Azure, OnPrem }. If the VM is being protected between two - /// data-centers, this field will be OnPrem always. - /// The CPU count of the VM on the - /// primary side. - /// The RAM size of the VM on the - /// primary side. - /// The OS details. - /// The protection stage. - /// The virtual machine Id. - /// The protection state for the - /// vm. - /// The protection state - /// description for the vm. - /// The resync details of the - /// machine. - /// The retention window start - /// time. - /// The retention window end - /// time. - /// The compressed data change - /// rate in MB. - /// The uncompressed data change - /// rate in MB. - /// The RPO in seconds. - /// The list of protected disks. - /// The source IP address. - /// The last heartbeat received from the - /// source server. - /// The process server Id. - /// The master target Id. - /// The collection of Consistency - /// points. - /// A value indicating whether any disk is - /// resized for this VM. - /// A value indicating whether - /// the source server requires a restart after update. - /// The multi vm group Id, if any. - /// The multi vm group name, if - /// any. - /// A value indicating whether the - /// multi vm sync is enabled or disabled. - /// The agent details. - /// The vCenter infrastructure - /// Id. - /// The infrastructure VM Id. - /// The PE Network details. - /// A value indicating the discovery type - /// of the machine. - /// A value indicating the - /// underlying Azure storage account. If the VM is not running in - /// Azure, this value shall be set to null. - /// The datastores of the on-premise machine - /// Value can be list of strings that contain datastore names. - /// The validation errors of the - /// on-premise machine Value can be list of validation errors. - /// The last RPO calculated - /// time. - /// The last update time received - /// from on-prem components. - /// The replica id of the protected - /// item. - /// The OS Version of the protected - /// item. - /// A value indicating whether - /// additional IR stats are available or not. - /// The total transferred data in - /// bytes. - /// The progress health. - public InMageReplicationDetails(string activeSiteType = default(string), int? sourceVmCpuCount = default(int?), int? sourceVmRamSizeInMB = default(int?), OSDiskDetails osDetails = default(OSDiskDetails), string protectionStage = default(string), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails resyncDetails = default(InitialReplicationDetails), System.DateTime? retentionWindowStart = default(System.DateTime?), System.DateTime? retentionWindowEnd = default(System.DateTime?), double? compressedDataRateInMB = default(double?), double? uncompressedDataRateInMB = default(double?), long? rpoInSeconds = default(long?), IList protectedDisks = default(IList), string ipAddress = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string processServerId = default(string), string masterTargetId = default(string), IDictionary consistencyPoints = default(IDictionary), string diskResized = default(string), string rebootAfterUpdateStatus = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), string multiVmSyncStatus = default(string), InMageAgentDetails agentDetails = default(InMageAgentDetails), string vCenterInfrastructureId = default(string), string infrastructureVmId = default(string), IList vmNics = default(IList), string discoveryType = default(string), string azureStorageAccountId = default(string), IList datastores = default(IList), IList validationErrors = default(IList), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), System.DateTime? lastUpdateReceivedTime = default(System.DateTime?), string replicaId = default(string), string osVersion = default(string), bool? isAdditionalStatsAvailable = default(bool?), long? totalDataTransferred = default(long?), string totalProgressHealth = default(string)) + + /// The active location of the VM. If the VM is being protected from Azure, + /// this field will take values from { Azure, OnPrem }. If the VM is being + /// protected between two data-centers, this field will be OnPrem always. + /// + + /// The CPU count of the VM on the primary side. + /// + + /// The RAM size of the VM on the primary side. + /// + + /// The OS details. + /// + + /// The protection stage. + /// + + /// The virtual machine Id. + /// + + /// The protection state for the vm. + /// + + /// The protection state description for the vm. + /// + + /// The resync details of the machine. + /// + + /// The retention window start time. + /// + + /// The retention window end time. + /// + + /// The compressed data change rate in MB. + /// + + /// The uncompressed data change rate in MB. + /// + + /// The RPO in seconds. + /// + + /// The list of protected disks. + /// + + /// The source IP address. + /// + + /// The last heartbeat received from the source server. + /// + + /// The process server Id. + /// + + /// The master target Id. + /// + + /// The collection of Consistency points. + /// + + /// A value indicating whether any disk is resized for this VM. + /// + + /// A value indicating whether the source server requires a restart after + /// update. + /// + + /// The multi vm group Id, if any. + /// + + /// The multi vm group name, if any. + /// + + /// A value indicating whether the multi vm sync is enabled or disabled. + /// + + /// The agent details. + /// + + /// The vCenter infrastructure Id. + /// + + /// The infrastructure VM Id. + /// + + /// The PE Network details. + /// + + /// A value indicating the discovery type of the machine. + /// + + /// A value indicating the underlying Azure storage account. If the VM is not + /// running in Azure, this value shall be set to null. + /// + + /// The datastores of the on-premise machine Value can be list of strings that + /// contain datastore names. + /// + + /// The validation errors of the on-premise machine Value can be list of + /// validation errors. + /// + + /// The last RPO calculated time. + /// + + /// The last update time received from on-prem components. + /// + + /// The replica id of the protected item. + /// + + /// The OS Version of the protected item. + /// + + /// A value indicating whether additional IR stats are available or not. + /// + + /// The total transferred data in bytes. + /// + + /// The progress health. + /// + public InMageReplicationDetails(string activeSiteType = default(string), int? sourceVMCpuCount = default(int?), int? sourceVMRamSizeInMb = default(int?), OSDiskDetails osDetails = default(OSDiskDetails), string protectionStage = default(string), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails resyncDetails = default(InitialReplicationDetails), System.DateTime? retentionWindowStart = default(System.DateTime?), System.DateTime? retentionWindowEnd = default(System.DateTime?), double? compressedDataRateInMb = default(double?), double? uncompressedDataRateInMb = default(double?), long? rpoInSeconds = default(long?), System.Collections.Generic.IList protectedDisks = default(System.Collections.Generic.IList), string ipAddress = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string processServerId = default(string), string masterTargetId = default(string), System.Collections.Generic.IDictionary consistencyPoints = default(System.Collections.Generic.IDictionary), string diskResized = default(string), string rebootAfterUpdateStatus = default(string), string multiVMGroupId = default(string), string multiVMGroupName = default(string), string multiVMSyncStatus = default(string), InMageAgentDetails agentDetails = default(InMageAgentDetails), string vCenterInfrastructureId = default(string), string infrastructureVMId = default(string), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), string discoveryType = default(string), string azureStorageAccountId = default(string), System.Collections.Generic.IList datastores = default(System.Collections.Generic.IList), System.Collections.Generic.IList validationErrors = default(System.Collections.Generic.IList), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), System.DateTime? lastUpdateReceivedTime = default(System.DateTime?), string replicaId = default(string), string osVersion = default(string), bool? isAdditionalStatsAvailable = default(bool?), long? totalDataTransferred = default(long?), string totalProgressHealth = default(string)) + { - ActiveSiteType = activeSiteType; - SourceVmCpuCount = sourceVmCpuCount; - SourceVmRamSizeInMB = sourceVmRamSizeInMB; - OsDetails = osDetails; - ProtectionStage = protectionStage; - VmId = vmId; - VmProtectionState = vmProtectionState; - VmProtectionStateDescription = vmProtectionStateDescription; - ResyncDetails = resyncDetails; - RetentionWindowStart = retentionWindowStart; - RetentionWindowEnd = retentionWindowEnd; - CompressedDataRateInMB = compressedDataRateInMB; - UncompressedDataRateInMB = uncompressedDataRateInMB; - RpoInSeconds = rpoInSeconds; - ProtectedDisks = protectedDisks; - IpAddress = ipAddress; - LastHeartbeat = lastHeartbeat; - ProcessServerId = processServerId; - MasterTargetId = masterTargetId; - ConsistencyPoints = consistencyPoints; - DiskResized = diskResized; - RebootAfterUpdateStatus = rebootAfterUpdateStatus; - MultiVmGroupId = multiVmGroupId; - MultiVmGroupName = multiVmGroupName; - MultiVmSyncStatus = multiVmSyncStatus; - AgentDetails = agentDetails; - VCenterInfrastructureId = vCenterInfrastructureId; - InfrastructureVmId = infrastructureVmId; - VmNics = vmNics; - DiscoveryType = discoveryType; - AzureStorageAccountId = azureStorageAccountId; - Datastores = datastores; - ValidationErrors = validationErrors; - LastRpoCalculatedTime = lastRpoCalculatedTime; - LastUpdateReceivedTime = lastUpdateReceivedTime; - ReplicaId = replicaId; - OsVersion = osVersion; - IsAdditionalStatsAvailable = isAdditionalStatsAvailable; - TotalDataTransferred = totalDataTransferred; - TotalProgressHealth = totalProgressHealth; + this.ActiveSiteType = activeSiteType; + this.SourceVMCpuCount = sourceVMCpuCount; + this.SourceVMRamSizeInMb = sourceVMRamSizeInMb; + this.OSDetails = osDetails; + this.ProtectionStage = protectionStage; + this.VMId = vmId; + this.VMProtectionState = vmProtectionState; + this.VMProtectionStateDescription = vmProtectionStateDescription; + this.ResyncDetails = resyncDetails; + this.RetentionWindowStart = retentionWindowStart; + this.RetentionWindowEnd = retentionWindowEnd; + this.CompressedDataRateInMb = compressedDataRateInMb; + this.UncompressedDataRateInMb = uncompressedDataRateInMb; + this.RpoInSeconds = rpoInSeconds; + this.ProtectedDisks = protectedDisks; + this.IPAddress = ipAddress; + this.LastHeartbeat = lastHeartbeat; + this.ProcessServerId = processServerId; + this.MasterTargetId = masterTargetId; + this.ConsistencyPoints = consistencyPoints; + this.DiskResized = diskResized; + this.RebootAfterUpdateStatus = rebootAfterUpdateStatus; + this.MultiVMGroupId = multiVMGroupId; + this.MultiVMGroupName = multiVMGroupName; + this.MultiVMSyncStatus = multiVMSyncStatus; + this.AgentDetails = agentDetails; + this.VCenterInfrastructureId = vCenterInfrastructureId; + this.InfrastructureVMId = infrastructureVMId; + this.VMNics = vmNics; + this.DiscoveryType = discoveryType; + this.AzureStorageAccountId = azureStorageAccountId; + this.Datastores = datastores; + this.ValidationErrors = validationErrors; + this.LastRpoCalculatedTime = lastRpoCalculatedTime; + this.LastUpdateReceivedTime = lastUpdateReceivedTime; + this.ReplicaId = replicaId; + this.OSVersion = osVersion; + this.IsAdditionalStatsAvailable = isAdditionalStatsAvailable; + this.TotalDataTransferred = totalDataTransferred; + this.TotalProgressHealth = totalProgressHealth; CustomInit(); } @@ -152,256 +201,254 @@ public InMageReplicationDetails() /// partial void CustomInit(); + /// - /// Gets or sets the active location of the VM. If the VM is being - /// protected from Azure, this field will take values from { Azure, - /// OnPrem }. If the VM is being protected between two data-centers, - /// this field will be OnPrem always. + /// Gets or sets the active location of the VM. If the VM is being protected + /// from Azure, this field will take values from { Azure, OnPrem }. If the VM + /// is being protected between two data-centers, this field will be OnPrem + /// always. /// - [JsonProperty(PropertyName = "activeSiteType")] - public string ActiveSiteType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "activeSiteType")] + public string ActiveSiteType {get; set; } /// /// Gets or sets the CPU count of the VM on the primary side. /// - [JsonProperty(PropertyName = "sourceVmCpuCount")] - public int? SourceVmCpuCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceVmCpuCount")] + public int? SourceVMCpuCount {get; set; } /// /// Gets or sets the RAM size of the VM on the primary side. /// - [JsonProperty(PropertyName = "sourceVmRamSizeInMB")] - public int? SourceVmRamSizeInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceVmRamSizeInMB")] + public int? SourceVMRamSizeInMb {get; set; } /// /// Gets or sets the OS details. /// - [JsonProperty(PropertyName = "osDetails")] - public OSDiskDetails OsDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osDetails")] + public OSDiskDetails OSDetails {get; set; } /// /// Gets or sets the protection stage. /// - [JsonProperty(PropertyName = "protectionStage")] - public string ProtectionStage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStage")] + public string ProtectionStage {get; set; } /// /// Gets or sets the virtual machine Id. /// - [JsonProperty(PropertyName = "vmId")] - public string VmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmId")] + public string VMId {get; set; } /// /// Gets or sets the protection state for the vm. /// - [JsonProperty(PropertyName = "vmProtectionState")] - public string VmProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionState")] + public string VMProtectionState {get; set; } /// /// Gets or sets the protection state description for the vm. /// - [JsonProperty(PropertyName = "vmProtectionStateDescription")] - public string VmProtectionStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VMProtectionStateDescription {get; set; } /// /// Gets or sets the resync details of the machine. /// - [JsonProperty(PropertyName = "resyncDetails")] - public InitialReplicationDetails ResyncDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncDetails")] + public InitialReplicationDetails ResyncDetails {get; set; } /// /// Gets or sets the retention window start time. /// - [JsonProperty(PropertyName = "retentionWindowStart")] - public System.DateTime? RetentionWindowStart { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionWindowStart")] + public System.DateTime? RetentionWindowStart {get; set; } /// /// Gets or sets the retention window end time. /// - [JsonProperty(PropertyName = "retentionWindowEnd")] - public System.DateTime? RetentionWindowEnd { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionWindowEnd")] + public System.DateTime? RetentionWindowEnd {get; set; } /// /// Gets or sets the compressed data change rate in MB. /// - [JsonProperty(PropertyName = "compressedDataRateInMB")] - public double? CompressedDataRateInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "compressedDataRateInMB")] + public double? CompressedDataRateInMb {get; set; } /// /// Gets or sets the uncompressed data change rate in MB. /// - [JsonProperty(PropertyName = "uncompressedDataRateInMB")] - public double? UncompressedDataRateInMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "uncompressedDataRateInMB")] + public double? UncompressedDataRateInMb {get; set; } /// /// Gets or sets the RPO in seconds. /// - [JsonProperty(PropertyName = "rpoInSeconds")] - public long? RpoInSeconds { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds {get; set; } /// /// Gets or sets the list of protected disks. /// - [JsonProperty(PropertyName = "protectedDisks")] - public IList ProtectedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedDisks")] + public System.Collections.Generic.IList ProtectedDisks {get; set; } /// /// Gets or sets the source IP address. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the last heartbeat received from the source server. /// - [JsonProperty(PropertyName = "lastHeartbeat")] - public System.DateTime? LastHeartbeat { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat {get; set; } /// /// Gets or sets the process server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the master target Id. /// - [JsonProperty(PropertyName = "masterTargetId")] - public string MasterTargetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId {get; set; } /// /// Gets or sets the collection of Consistency points. /// - [JsonProperty(PropertyName = "consistencyPoints")] - public IDictionary ConsistencyPoints { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "consistencyPoints")] + public System.Collections.Generic.IDictionary ConsistencyPoints {get; set; } /// - /// Gets or sets a value indicating whether any disk is resized for - /// this VM. + /// Gets or sets a value indicating whether any disk is resized for this VM. /// - [JsonProperty(PropertyName = "diskResized")] - public string DiskResized { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskResized")] + public string DiskResized {get; set; } /// - /// Gets or sets a value indicating whether the source server requires - /// a restart after update. + /// Gets or sets a value indicating whether the source server requires a + /// restart after update. /// - [JsonProperty(PropertyName = "rebootAfterUpdateStatus")] - public string RebootAfterUpdateStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rebootAfterUpdateStatus")] + public string RebootAfterUpdateStatus {get; set; } /// /// Gets or sets the multi vm group Id, if any. /// - [JsonProperty(PropertyName = "multiVmGroupId")] - public string MultiVmGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVMGroupId {get; set; } /// /// Gets or sets the multi vm group name, if any. /// - [JsonProperty(PropertyName = "multiVmGroupName")] - public string MultiVmGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVMGroupName {get; set; } /// - /// Gets or sets a value indicating whether the multi vm sync is - /// enabled or disabled. + /// Gets or sets a value indicating whether the multi vm sync is enabled or + /// disabled. /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } /// /// Gets or sets the agent details. /// - [JsonProperty(PropertyName = "agentDetails")] - public InMageAgentDetails AgentDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentDetails")] + public InMageAgentDetails AgentDetails {get; set; } /// /// Gets or sets the vCenter infrastructure Id. /// - [JsonProperty(PropertyName = "vCenterInfrastructureId")] - public string VCenterInfrastructureId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vCenterInfrastructureId")] + public string VCenterInfrastructureId {get; set; } /// /// Gets or sets the infrastructure VM Id. /// - [JsonProperty(PropertyName = "infrastructureVmId")] - public string InfrastructureVmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "infrastructureVmId")] + public string InfrastructureVMId {get; set; } /// /// Gets or sets the PE Network details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets a value indicating the discovery type of the machine. /// - [JsonProperty(PropertyName = "discoveryType")] - public string DiscoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "discoveryType")] + public string DiscoveryType {get; set; } /// - /// Gets or sets a value indicating the underlying Azure storage - /// account. If the VM is not running in Azure, this value shall be set - /// to null. + /// Gets or sets a value indicating the underlying Azure storage account. If + /// the VM is not running in Azure, this value shall be set to null. /// - [JsonProperty(PropertyName = "azureStorageAccountId")] - public string AzureStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureStorageAccountId")] + public string AzureStorageAccountId {get; set; } /// - /// Gets or sets the datastores of the on-premise machine Value can be - /// list of strings that contain datastore names. + /// Gets or sets the datastores of the on-premise machine Value can be list of + /// strings that contain datastore names. /// - [JsonProperty(PropertyName = "datastores")] - public IList Datastores { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datastores")] + public System.Collections.Generic.IList Datastores {get; set; } /// - /// Gets or sets the validation errors of the on-premise machine Value - /// can be list of validation errors. + /// Gets or sets the validation errors of the on-premise machine Value can be + /// list of validation errors. /// - [JsonProperty(PropertyName = "validationErrors")] - public IList ValidationErrors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "validationErrors")] + public System.Collections.Generic.IList ValidationErrors {get; set; } /// /// Gets or sets the last RPO calculated time. /// - [JsonProperty(PropertyName = "lastRpoCalculatedTime")] - public System.DateTime? LastRpoCalculatedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRpoCalculatedTime")] + public System.DateTime? LastRpoCalculatedTime {get; set; } /// /// Gets or sets the last update time received from on-prem components. /// - [JsonProperty(PropertyName = "lastUpdateReceivedTime")] - public System.DateTime? LastUpdateReceivedTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUpdateReceivedTime")] + public System.DateTime? LastUpdateReceivedTime {get; set; } /// /// Gets or sets the replica id of the protected item. /// - [JsonProperty(PropertyName = "replicaId")] - public string ReplicaId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaId")] + public string ReplicaId {get; set; } /// /// Gets or sets the OS Version of the protected item. /// - [JsonProperty(PropertyName = "osVersion")] - public string OsVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osVersion")] + public string OSVersion {get; set; } /// - /// Gets or sets a value indicating whether additional IR stats are - /// available or not. + /// Gets or sets a value indicating whether additional IR stats are available + /// or not. /// - [JsonProperty(PropertyName = "isAdditionalStatsAvailable")] - public bool? IsAdditionalStatsAvailable { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isAdditionalStatsAvailable")] + public bool? IsAdditionalStatsAvailable {get; set; } /// /// Gets or sets the total transferred data in bytes. /// - [JsonProperty(PropertyName = "totalDataTransferred")] - public long? TotalDataTransferred { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "totalDataTransferred")] + public long? TotalDataTransferred {get; set; } /// /// Gets or sets the progress health. /// - [JsonProperty(PropertyName = "totalProgressHealth")] - public string TotalProgressHealth { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "totalProgressHealth")] + public string TotalProgressHealth {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageReprotectInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageReprotectInput.cs index 9da32820fe9e..d495b334e0c1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageReprotectInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageReprotectInput.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -33,26 +24,41 @@ public InMageReprotectInput() /// /// Initializes a new instance of the InMageReprotectInput class. /// - /// The Master Target Id. - /// The Process Server Id. - /// The retention drive to use on the - /// MT. - /// The Policy Id. - /// The CS account Id. - /// The target datastore name. - /// The enable disk exclusion - /// input. - /// The disks to include list. - public InMageReprotectInput(string masterTargetId, string processServerId, string retentionDrive, string profileId, string runAsAccountId = default(string), string datastoreName = default(string), InMageDiskExclusionInput diskExclusionInput = default(InMageDiskExclusionInput), IList disksToInclude = default(IList)) + + /// The Master Target Id. + /// + + /// The Process Server Id. + /// + + /// The retention drive to use on the MT. + /// + + /// The CS account Id. + /// + + /// The target datastore name. + /// + + /// The enable disk exclusion input. + /// + + /// The Policy Id. + /// + + /// The disks to include list. + /// + public InMageReprotectInput(string masterTargetId, string processServerId, string retentionDrive, string profileId, string runAsAccountId = default(string), string datastoreName = default(string), InMageDiskExclusionInput diskExclusionInput = default(InMageDiskExclusionInput), System.Collections.Generic.IList disksToInclude = default(System.Collections.Generic.IList)) + { - MasterTargetId = masterTargetId; - ProcessServerId = processServerId; - RetentionDrive = retentionDrive; - RunAsAccountId = runAsAccountId; - DatastoreName = datastoreName; - DiskExclusionInput = diskExclusionInput; - ProfileId = profileId; - DisksToInclude = disksToInclude; + this.MasterTargetId = masterTargetId; + this.ProcessServerId = processServerId; + this.RetentionDrive = retentionDrive; + this.RunAsAccountId = runAsAccountId; + this.DatastoreName = datastoreName; + this.DiskExclusionInput = diskExclusionInput; + this.ProfileId = profileId; + this.DisksToInclude = disksToInclude; CustomInit(); } @@ -61,78 +67,86 @@ public InMageReprotectInput() /// partial void CustomInit(); + /// /// Gets or sets the Master Target Id. /// - [JsonProperty(PropertyName = "masterTargetId")] - public string MasterTargetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId {get; set; } /// /// Gets or sets the Process Server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the retention drive to use on the MT. /// - [JsonProperty(PropertyName = "retentionDrive")] - public string RetentionDrive { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionDrive")] + public string RetentionDrive {get; set; } /// /// Gets or sets the CS account Id. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } /// /// Gets or sets the target datastore name. /// - [JsonProperty(PropertyName = "datastoreName")] - public string DatastoreName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "datastoreName")] + public string DatastoreName {get; set; } /// /// Gets or sets the enable disk exclusion input. /// - [JsonProperty(PropertyName = "diskExclusionInput")] - public InMageDiskExclusionInput DiskExclusionInput { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskExclusionInput")] + public InMageDiskExclusionInput DiskExclusionInput {get; set; } /// /// Gets or sets the Policy Id. /// - [JsonProperty(PropertyName = "profileId")] - public string ProfileId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "profileId")] + public string ProfileId {get; set; } /// /// Gets or sets the disks to include list. /// - [JsonProperty(PropertyName = "disksToInclude")] - public IList DisksToInclude { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "disksToInclude")] + public System.Collections.Generic.IList DisksToInclude {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (MasterTargetId == null) + if (this.MasterTargetId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MasterTargetId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MasterTargetId"); } - if (ProcessServerId == null) + if (this.ProcessServerId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProcessServerId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProcessServerId"); } - if (RetentionDrive == null) + if (this.RetentionDrive == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RetentionDrive"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RetentionDrive"); } - if (ProfileId == null) + if (this.ProfileId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProfileId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProfileId"); } + + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageTestFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageTestFailoverInput.cs index 1ca31d65a08e..98bbae89e061 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageTestFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageTestFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,18 +24,20 @@ public InMageTestFailoverInput() /// /// Initializes a new instance of the InMageTestFailoverInput class. /// - /// The recovery point type. Values - /// from LatestTime, LatestTag or Custom. In the case of custom, the - /// recovery point provided by RecoveryPointId will be used. In the - /// other two cases, recovery point id will be ignored. Possible values - /// include: 'LatestTime', 'LatestTag', 'Custom' - /// The recovery point id to be passed to - /// test failover to a particular recovery point. In case of latest - /// recovery point, null should be passed. + + /// The recovery point type. Values from LatestTime, LatestTag or Custom. In + /// the case of custom, the recovery point provided by RecoveryPointId will be + /// used. In the other two cases, recovery point id will be ignored. + /// Possible values include: 'LatestTime', 'LatestTag', 'Custom' + + /// The recovery point id to be passed to test failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. + /// public InMageTestFailoverInput(string recoveryPointType = default(string), string recoveryPointId = default(string)) + { - RecoveryPointType = recoveryPointType; - RecoveryPointId = recoveryPointId; + this.RecoveryPointType = recoveryPointType; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -50,23 +46,22 @@ public InMageTestFailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point type. Values from LatestTime, - /// LatestTag or Custom. In the case of custom, the recovery point - /// provided by RecoveryPointId will be used. In the other two cases, - /// recovery point id will be ignored. Possible values include: - /// 'LatestTime', 'LatestTag', 'Custom' + /// Gets or sets the recovery point type. Values from LatestTime, LatestTag or + /// Custom. In the case of custom, the recovery point provided by + /// RecoveryPointId will be used. In the other two cases, recovery point id + /// will be ignored. Possible values include: 'LatestTime', 'LatestTag', 'Custom' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// - /// Gets or sets the recovery point id to be passed to test failover to - /// a particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to test failover to a + /// particular recovery point. In case of latest recovery point, null should be + /// passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageUnplannedFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageUnplannedFailoverInput.cs index 96bbd9182629..63c33b18fe22 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageUnplannedFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageUnplannedFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageUnplannedFailoverInput : UnplannedFailoverProviderSpecificInput { /// - /// Initializes a new instance of the InMageUnplannedFailoverInput - /// class. + /// Initializes a new instance of the InMageUnplannedFailoverInput class. /// public InMageUnplannedFailoverInput() { @@ -29,21 +22,22 @@ public InMageUnplannedFailoverInput() } /// - /// Initializes a new instance of the InMageUnplannedFailoverInput - /// class. + /// Initializes a new instance of the InMageUnplannedFailoverInput class. /// - /// The recovery point type. Values - /// from LatestTime, LatestTag or Custom. In the case of custom, the - /// recovery point provided by RecoveryPointId will be used. In the - /// other two cases, recovery point id will be ignored. Possible values - /// include: 'LatestTime', 'LatestTag', 'Custom' - /// The recovery point id to be passed to - /// failover to a particular recovery point. In case of latest recovery - /// point, null should be passed. + + /// The recovery point type. Values from LatestTime, LatestTag or Custom. In + /// the case of custom, the recovery point provided by RecoveryPointId will be + /// used. In the other two cases, recovery point id will be ignored. + /// Possible values include: 'LatestTime', 'LatestTag', 'Custom' + + /// The recovery point id to be passed to failover to a particular recovery + /// point. In case of latest recovery point, null should be passed. + /// public InMageUnplannedFailoverInput(string recoveryPointType = default(string), string recoveryPointId = default(string)) + { - RecoveryPointType = recoveryPointType; - RecoveryPointId = recoveryPointId; + this.RecoveryPointType = recoveryPointType; + this.RecoveryPointId = recoveryPointId; CustomInit(); } @@ -52,23 +46,21 @@ public InMageUnplannedFailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point type. Values from LatestTime, - /// LatestTag or Custom. In the case of custom, the recovery point - /// provided by RecoveryPointId will be used. In the other two cases, - /// recovery point id will be ignored. Possible values include: - /// 'LatestTime', 'LatestTag', 'Custom' + /// Gets or sets the recovery point type. Values from LatestTime, LatestTag or + /// Custom. In the case of custom, the recovery point provided by + /// RecoveryPointId will be used. In the other two cases, recovery point id + /// will be ignored. Possible values include: 'LatestTime', 'LatestTag', 'Custom' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// - /// Gets or sets the recovery point id to be passed to failover to a - /// particular recovery point. In case of latest recovery point, null - /// should be passed. + /// Gets or sets the recovery point id to be passed to failover to a particular + /// recovery point. In case of latest recovery point, null should be passed. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageV2RpRecoveryPointType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageV2RpRecoveryPointType.cs index 6cb2102b19c5..91071d2b8c90 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageV2RpRecoveryPointType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageV2RpRecoveryPointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for InMageV2RpRecoveryPointType. /// + + public static class InMageV2RpRecoveryPointType { public const string Latest = "Latest"; @@ -21,4 +18,4 @@ public static class InMageV2RpRecoveryPointType public const string LatestCrashConsistent = "LatestCrashConsistent"; public const string LatestProcessed = "LatestProcessed"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageVolumeExclusionOptions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageVolumeExclusionOptions.cs index 4114cd01020b..927b9363366b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageVolumeExclusionOptions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InMageVolumeExclusionOptions.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class InMageVolumeExclusionOptions { /// - /// Initializes a new instance of the InMageVolumeExclusionOptions - /// class. + /// Initializes a new instance of the InMageVolumeExclusionOptions class. /// public InMageVolumeExclusionOptions() { @@ -29,20 +22,23 @@ public InMageVolumeExclusionOptions() } /// - /// Initializes a new instance of the InMageVolumeExclusionOptions - /// class. + /// Initializes a new instance of the InMageVolumeExclusionOptions class. /// - /// The volume label. The disk having any - /// volume with this label will be excluded from replication. - /// The value indicating - /// whether to exclude multi volume disk or not. If a disk has multiple - /// volumes and one of the volume has label matching with VolumeLabel - /// this disk will be excluded from replication if - /// OnlyExcludeIfSingleVolume is false. + + /// The volume label. The disk having any volume with this label will be + /// excluded from replication. + /// + + /// The value indicating whether to exclude multi volume disk or not. If a disk + /// has multiple volumes and one of the volume has label matching with + /// VolumeLabel this disk will be excluded from replication if + /// OnlyExcludeIfSingleVolume is false. + /// public InMageVolumeExclusionOptions(string volumeLabel = default(string), string onlyExcludeIfSingleVolume = default(string)) + { - VolumeLabel = volumeLabel; - OnlyExcludeIfSingleVolume = onlyExcludeIfSingleVolume; + this.VolumeLabel = volumeLabel; + this.OnlyExcludeIfSingleVolume = onlyExcludeIfSingleVolume; CustomInit(); } @@ -51,21 +47,21 @@ public InMageVolumeExclusionOptions() /// partial void CustomInit(); + /// - /// Gets or sets the volume label. The disk having any volume with this - /// label will be excluded from replication. + /// Gets or sets the volume label. The disk having any volume with this label + /// will be excluded from replication. /// - [JsonProperty(PropertyName = "volumeLabel")] - public string VolumeLabel { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "volumeLabel")] + public string VolumeLabel {get; set; } /// - /// Gets or sets the value indicating whether to exclude multi volume - /// disk or not. If a disk has multiple volumes and one of the volume - /// has label matching with VolumeLabel this disk will be excluded from - /// replication if OnlyExcludeIfSingleVolume is false. + /// Gets or sets the value indicating whether to exclude multi volume disk or + /// not. If a disk has multiple volumes and one of the volume has label + /// matching with VolumeLabel this disk will be excluded from replication if + /// OnlyExcludeIfSingleVolume is false. /// - [JsonProperty(PropertyName = "onlyExcludeIfSingleVolume")] - public string OnlyExcludeIfSingleVolume { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "onlyExcludeIfSingleVolume")] + public string OnlyExcludeIfSingleVolume {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InconsistentVmDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InconsistentVmDetails.cs index 7c4ec0b70132..5529be206afe 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InconsistentVmDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InconsistentVmDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,17 +24,26 @@ public InconsistentVmDetails() /// /// Initializes a new instance of the InconsistentVmDetails class. /// - /// The Vm name. - /// The Cloud name. - /// The list of details regarding state of the - /// Protected Entity in SRS and On prem. - /// The list of error ids. - public InconsistentVmDetails(string vmName = default(string), string cloudName = default(string), IList details = default(IList), IList errorIds = default(IList)) + + /// The Vm name. + /// + + /// The Cloud name. + /// + + /// The list of details regarding state of the Protected Entity in SRS and On + /// prem. + /// + + /// The list of error ids. + /// + public InconsistentVmDetails(string vmName = default(string), string cloudName = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList), System.Collections.Generic.IList errorIds = default(System.Collections.Generic.IList)) + { - VmName = vmName; - CloudName = cloudName; - Details = details; - ErrorIds = errorIds; + this.VMName = vmName; + this.CloudName = cloudName; + this.Details = details; + this.ErrorIds = errorIds; CustomInit(); } @@ -51,30 +52,30 @@ public InconsistentVmDetails() /// partial void CustomInit(); + /// /// Gets or sets the Vm name. /// - [JsonProperty(PropertyName = "vmName")] - public string VmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmName")] + public string VMName {get; set; } /// /// Gets or sets the Cloud name. /// - [JsonProperty(PropertyName = "cloudName")] - public string CloudName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cloudName")] + public string CloudName {get; set; } /// - /// Gets or sets the list of details regarding state of the Protected - /// Entity in SRS and On prem. + /// Gets or sets the list of details regarding state of the Protected Entity in + /// SRS and On prem. /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; set; } /// /// Gets or sets the list of error ids. /// - [JsonProperty(PropertyName = "errorIds")] - public IList ErrorIds { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "errorIds")] + public System.Collections.Generic.IList ErrorIds {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InitialReplicationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InitialReplicationDetails.cs index 226b16778a1a..057cad124398 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InitialReplicationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InitialReplicationDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,17 @@ public InitialReplicationDetails() /// /// Initializes a new instance of the InitialReplicationDetails class. /// - /// Initial replication - /// type. - /// The initial - /// replication progress percentage. + + /// Initial replication type. + /// + + /// The initial replication progress percentage. + /// public InitialReplicationDetails(string initialReplicationType = default(string), string initialReplicationProgressPercentage = default(string)) + { - InitialReplicationType = initialReplicationType; - InitialReplicationProgressPercentage = initialReplicationProgressPercentage; + this.InitialReplicationType = initialReplicationType; + this.InitialReplicationProgressPercentage = initialReplicationProgressPercentage; CustomInit(); } @@ -45,17 +42,17 @@ public InitialReplicationDetails() /// partial void CustomInit(); + /// /// Gets or sets initial replication type. /// - [JsonProperty(PropertyName = "initialReplicationType")] - public string InitialReplicationType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationType")] + public string InitialReplicationType {get; set; } /// /// Gets or sets the initial replication progress percentage. /// - [JsonProperty(PropertyName = "initialReplicationProgressPercentage")] - public string InitialReplicationProgressPercentage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "initialReplicationProgressPercentage")] + public string InitialReplicationProgressPercentage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InlineWorkflowTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InlineWorkflowTaskDetails.cs index af50b7999a8a..6de4abf66f59 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InlineWorkflowTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InlineWorkflowTaskDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,12 +24,17 @@ public InlineWorkflowTaskDetails() /// /// Initializes a new instance of the InlineWorkflowTaskDetails class. /// - /// The child tasks. - /// The list of child workflow ids. - public InlineWorkflowTaskDetails(IList childTasks = default(IList), IList workflowIds = default(IList)) - : base(childTasks) + + /// The child tasks. + /// + + /// The list of child workflow ids. + /// + public InlineWorkflowTaskDetails(System.Collections.Generic.IList childTasks = default(System.Collections.Generic.IList), System.Collections.Generic.IList workflowIds = default(System.Collections.Generic.IList)) + + : base(childTasks) { - WorkflowIds = workflowIds; + this.WorkflowIds = workflowIds; CustomInit(); } @@ -46,11 +43,11 @@ public InlineWorkflowTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the list of child workflow ids. /// - [JsonProperty(PropertyName = "workflowIds")] - public IList WorkflowIds { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "workflowIds")] + public System.Collections.Generic.IList WorkflowIds {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InnerHealthError.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InnerHealthError.cs index e04a2492a5fd..2f58f956ab00 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InnerHealthError.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InnerHealthError.cs @@ -1,25 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// /// Implements InnerHealthError class. HealthError object has a list of - /// InnerHealthErrors as child errors. InnerHealthError is used because - /// this will prevent an infinite loop of structures when Hydra tries to - /// auto-generate the contract. We are exposing the related health errors - /// as inner health errors and all API consumers can utilize this in the - /// same fashion as Exception -&gt; InnerException. + /// InnerHealthErrors as child errors. InnerHealthError is used because this + /// will prevent an infinite loop of structures when Hydra tries to + /// auto-generate the contract. We are exposing the related health errors as + /// inner health errors and all API consumers can utilize this in the same + /// fashion as Exception -&gt; InnerException. /// public partial class InnerHealthError { @@ -34,40 +28,65 @@ public InnerHealthError() /// /// Initializes a new instance of the InnerHealthError class. /// - /// Source of error. - /// Type of error. - /// Level of error. - /// Category of error. - /// Error code. - /// Summary message of the entity. - /// Error message. - /// Possible causes of error. - /// Recommended action to resolve - /// error. - /// Error creation time (UTC). - /// DRA error - /// message. - /// ID of the entity. - /// The health error unique id. - /// Value indicating whether the - /// health error is customer resolvable. Possible values include: - /// 'Allowed', 'NotAllowed' + + /// Source of error. + /// + + /// Type of error. + /// + + /// Level of error. + /// + + /// Category of error. + /// + + /// Error code. + /// + + /// Summary message of the entity. + /// + + /// Error message. + /// + + /// Possible causes of error. + /// + + /// Recommended action to resolve error. + /// + + /// Error creation time (UTC). + /// + + /// DRA error message. + /// + + /// ID of the entity. + /// + + /// The health error unique id. + /// + + /// Value indicating whether the health error is customer resolvable. + /// Possible values include: 'Allowed', 'NotAllowed' public InnerHealthError(string errorSource = default(string), string errorType = default(string), string errorLevel = default(string), string errorCategory = default(string), string errorCode = default(string), string summaryMessage = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), System.DateTime? creationTimeUtc = default(System.DateTime?), string recoveryProviderErrorMessage = default(string), string entityId = default(string), string errorId = default(string), string customerResolvability = default(string)) + { - ErrorSource = errorSource; - ErrorType = errorType; - ErrorLevel = errorLevel; - ErrorCategory = errorCategory; - ErrorCode = errorCode; - SummaryMessage = summaryMessage; - ErrorMessage = errorMessage; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - CreationTimeUtc = creationTimeUtc; - RecoveryProviderErrorMessage = recoveryProviderErrorMessage; - EntityId = entityId; - ErrorId = errorId; - CustomerResolvability = customerResolvability; + this.ErrorSource = errorSource; + this.ErrorType = errorType; + this.ErrorLevel = errorLevel; + this.ErrorCategory = errorCategory; + this.ErrorCode = errorCode; + this.SummaryMessage = summaryMessage; + this.ErrorMessage = errorMessage; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.CreationTimeUtc = creationTimeUtc; + this.RecoveryProviderErrorMessage = recoveryProviderErrorMessage; + this.EntityId = entityId; + this.ErrorId = errorId; + this.CustomerResolvability = customerResolvability; CustomInit(); } @@ -76,90 +95,90 @@ public InnerHealthError() /// partial void CustomInit(); + /// /// Gets or sets source of error. /// - [JsonProperty(PropertyName = "errorSource")] - public string ErrorSource { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorSource")] + public string ErrorSource {get; set; } /// /// Gets or sets type of error. /// - [JsonProperty(PropertyName = "errorType")] - public string ErrorType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorType")] + public string ErrorType {get; set; } /// /// Gets or sets level of error. /// - [JsonProperty(PropertyName = "errorLevel")] - public string ErrorLevel { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorLevel")] + public string ErrorLevel {get; set; } /// /// Gets or sets category of error. /// - [JsonProperty(PropertyName = "errorCategory")] - public string ErrorCategory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCategory")] + public string ErrorCategory {get; set; } /// /// Gets or sets error code. /// - [JsonProperty(PropertyName = "errorCode")] - public string ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public string ErrorCode {get; set; } /// /// Gets or sets summary message of the entity. /// - [JsonProperty(PropertyName = "summaryMessage")] - public string SummaryMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "summaryMessage")] + public string SummaryMessage {get; set; } /// /// Gets or sets error message. /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; set; } /// /// Gets or sets possible causes of error. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; set; } /// /// Gets or sets recommended action to resolve error. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; set; } /// /// Gets or sets error creation time (UTC). /// - [JsonProperty(PropertyName = "creationTimeUtc")] - public System.DateTime? CreationTimeUtc { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "creationTimeUtc")] + public System.DateTime? CreationTimeUtc {get; set; } /// - /// Gets or sets DRA error message. + /// Gets or sets dRA error message. /// - [JsonProperty(PropertyName = "recoveryProviderErrorMessage")] - public string RecoveryProviderErrorMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProviderErrorMessage")] + public string RecoveryProviderErrorMessage {get; set; } /// - /// Gets or sets ID of the entity. + /// Gets or sets iD of the entity. /// - [JsonProperty(PropertyName = "entityId")] - public string EntityId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "entityId")] + public string EntityId {get; set; } /// /// Gets or sets the health error unique id. /// - [JsonProperty(PropertyName = "errorId")] - public string ErrorId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorId")] + public string ErrorId {get; set; } /// /// Gets or sets value indicating whether the health error is customer - /// resolvable. Possible values include: 'Allowed', 'NotAllowed' + /// resolvable. Possible values include: 'Allowed', 'NotAllowed' /// - [JsonProperty(PropertyName = "customerResolvability")] - public string CustomerResolvability { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "customerResolvability")] + public string CustomerResolvability {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InputEndpoint.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InputEndpoint.cs index f1e9f3ad5a9e..d9a1e564624e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InputEndpoint.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/InputEndpoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; public partial class InputEndpoint @@ -26,12 +20,25 @@ public InputEndpoint() /// /// Initializes a new instance of the InputEndpoint class. /// + + /// + /// + + /// + /// + + /// + /// + + /// + /// public InputEndpoint(string endpointName = default(string), int? privatePort = default(int?), int? publicPort = default(int?), string protocol = default(string)) + { - EndpointName = endpointName; - PrivatePort = privatePort; - PublicPort = publicPort; - Protocol = protocol; + this.EndpointName = endpointName; + this.PrivatePort = privatePort; + this.PublicPort = publicPort; + this.Protocol = protocol; CustomInit(); } @@ -40,25 +47,29 @@ public InputEndpoint() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "endpointName")] - public string EndpointName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endpointName")] + public string EndpointName {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "privatePort")] - public int? PrivatePort { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "privatePort")] + public int? PrivatePort {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "publicPort")] - public int? PublicPort { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "publicPort")] + public int? PublicPort {get; set; } /// + /// Gets or sets /// - [JsonProperty(PropertyName = "protocol")] - public string Protocol { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protocol")] + public string Protocol {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Job.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Job.cs index 15f8893c9bba..366dc68e84ec 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Job.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Job.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public Job() /// /// Initializes a new instance of the Job class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The custom data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The custom data. + /// public Job(string id = default(string), string name = default(string), string type = default(string), string location = default(string), JobProperties properties = default(JobProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public Job() /// partial void CustomInit(); + /// /// Gets or sets the custom data. /// - [JsonProperty(PropertyName = "properties")] - public JobProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public JobProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobDetails.cs index fc3a1c0e37ee..56030382ba4c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,12 +24,14 @@ public JobDetails() /// /// Initializes a new instance of the JobDetails class. /// - /// The affected object properties - /// like source server, source cloud, target server, target cloud etc. - /// based on the workflow object details. - public JobDetails(IDictionary affectedObjectDetails = default(IDictionary)) + + /// The affected object properties like source server, source cloud, target + /// server, target cloud etc. based on the workflow object details. + /// + public JobDetails(System.Collections.Generic.IDictionary affectedObjectDetails = default(System.Collections.Generic.IDictionary)) + { - AffectedObjectDetails = affectedObjectDetails; + this.AffectedObjectDetails = affectedObjectDetails; CustomInit(); } @@ -46,13 +40,13 @@ public JobDetails() /// partial void CustomInit(); + /// - /// Gets or sets the affected object properties like source server, - /// source cloud, target server, target cloud etc. based on the - /// workflow object details. + /// Gets or sets the affected object properties like source server, source + /// cloud, target server, target cloud etc. based on the workflow object + /// details. /// - [JsonProperty(PropertyName = "affectedObjectDetails")] - public IDictionary AffectedObjectDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedObjectDetails")] + public System.Collections.Generic.IDictionary AffectedObjectDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobEntity.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobEntity.cs index cf131937585b..47e91ec5ae63 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobEntity.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobEntity.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,22 +24,33 @@ public JobEntity() /// /// Initializes a new instance of the JobEntity class. /// - /// The job id. - /// The job display name. - /// The object id. - /// The object name. - /// The workflow affected object - /// type. - /// The job name. Enum type - /// ScenarioName. + + /// The job id. + /// + + /// The job display name. + /// + + /// The object id. + /// + + /// The object name. + /// + + /// The workflow affected object type. + /// + + /// The job name. Enum type ScenarioName. + /// public JobEntity(string jobId = default(string), string jobFriendlyName = default(string), string targetObjectId = default(string), string targetObjectName = default(string), string targetInstanceType = default(string), string jobScenarioName = default(string)) + { - JobId = jobId; - JobFriendlyName = jobFriendlyName; - TargetObjectId = targetObjectId; - TargetObjectName = targetObjectName; - TargetInstanceType = targetInstanceType; - JobScenarioName = jobScenarioName; + this.JobId = jobId; + this.JobFriendlyName = jobFriendlyName; + this.TargetObjectId = targetObjectId; + this.TargetObjectName = targetObjectName; + this.TargetInstanceType = targetInstanceType; + this.JobScenarioName = jobScenarioName; CustomInit(); } @@ -54,41 +59,41 @@ public JobEntity() /// partial void CustomInit(); + /// /// Gets or sets the job id. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; set; } /// /// Gets or sets the job display name. /// - [JsonProperty(PropertyName = "jobFriendlyName")] - public string JobFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobFriendlyName")] + public string JobFriendlyName {get; set; } /// /// Gets or sets the object id. /// - [JsonProperty(PropertyName = "targetObjectId")] - public string TargetObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetObjectId")] + public string TargetObjectId {get; set; } /// /// Gets or sets the object name. /// - [JsonProperty(PropertyName = "targetObjectName")] - public string TargetObjectName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetObjectName")] + public string TargetObjectName {get; set; } /// /// Gets or sets the workflow affected object type. /// - [JsonProperty(PropertyName = "targetInstanceType")] - public string TargetInstanceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetInstanceType")] + public string TargetInstanceType {get; set; } /// /// Gets or sets the job name. Enum type ScenarioName. /// - [JsonProperty(PropertyName = "jobScenarioName")] - public string JobScenarioName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "jobScenarioName")] + public string JobScenarioName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobErrorDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobErrorDetails.cs index c0510d73f4f3..187919eda01c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobErrorDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobErrorDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,20 +23,29 @@ public JobErrorDetails() /// /// Initializes a new instance of the JobErrorDetails class. /// - /// The Service error - /// details. - /// The Provider error - /// details. - /// Error level of error. - /// The creation time of job error. - /// The Id of the task. + + /// The Service error details. + /// + + /// The Provider error details. + /// + + /// Error level of error. + /// + + /// The creation time of job error. + /// + + /// The Id of the task. + /// public JobErrorDetails(ServiceError serviceErrorDetails = default(ServiceError), ProviderError providerErrorDetails = default(ProviderError), string errorLevel = default(string), System.DateTime? creationTime = default(System.DateTime?), string taskId = default(string)) + { - ServiceErrorDetails = serviceErrorDetails; - ProviderErrorDetails = providerErrorDetails; - ErrorLevel = errorLevel; - CreationTime = creationTime; - TaskId = taskId; + this.ServiceErrorDetails = serviceErrorDetails; + this.ProviderErrorDetails = providerErrorDetails; + this.ErrorLevel = errorLevel; + this.CreationTime = creationTime; + this.TaskId = taskId; CustomInit(); } @@ -51,35 +54,35 @@ public JobErrorDetails() /// partial void CustomInit(); + /// /// Gets or sets the Service error details. /// - [JsonProperty(PropertyName = "serviceErrorDetails")] - public ServiceError ServiceErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceErrorDetails")] + public ServiceError ServiceErrorDetails {get; set; } /// /// Gets or sets the Provider error details. /// - [JsonProperty(PropertyName = "providerErrorDetails")] - public ProviderError ProviderErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "providerErrorDetails")] + public ProviderError ProviderErrorDetails {get; set; } /// /// Gets or sets error level of error. /// - [JsonProperty(PropertyName = "errorLevel")] - public string ErrorLevel { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorLevel")] + public string ErrorLevel {get; set; } /// /// Gets or sets the creation time of job error. /// - [JsonProperty(PropertyName = "creationTime")] - public System.DateTime? CreationTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "creationTime")] + public System.DateTime? CreationTime {get; set; } /// /// Gets or sets the Id of the task. /// - [JsonProperty(PropertyName = "taskId")] - public string TaskId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "taskId")] + public string TaskId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobProperties.cs index 15e620fb337c..cbb9b3c1ad10 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,45 +23,69 @@ public JobProperties() /// /// Initializes a new instance of the JobProperties class. /// - /// The activity id. - /// The ScenarioName. - /// The DisplayName. - /// The status of the Job. It is one of these - /// values - NotStarted, InProgress, Succeeded, Failed, Cancelled, - /// Suspended or Other. - /// The description of the state of the - /// Job. For e.g. - For Succeeded state, description can be Completed, - /// PartiallySucceeded, CompletedWithInformation or Skipped. - /// The tasks. - /// The errors. - /// The start time. - /// The end time. - /// The Allowed action the job. - /// The affected Object Id. - /// The name of the affected - /// object. - /// The type of the affected object - /// which is of - /// Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType - /// class. - /// The custom job details like test - /// failover job details. - public JobProperties(string activityId = default(string), string scenarioName = default(string), string friendlyName = default(string), string state = default(string), string stateDescription = default(string), IList tasks = default(IList), IList errors = default(IList), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), IList allowedActions = default(IList), string targetObjectId = default(string), string targetObjectName = default(string), string targetInstanceType = default(string), JobDetails customDetails = default(JobDetails)) + + /// The activity id. + /// + + /// The ScenarioName. + /// + + /// The DisplayName. + /// + + /// The status of the Job. It is one of these values - NotStarted, InProgress, + /// Succeeded, Failed, Cancelled, Suspended or Other. + /// + + /// The description of the state of the Job. For e.g. - For Succeeded state, + /// description can be Completed, PartiallySucceeded, CompletedWithInformation + /// or Skipped. + /// + + /// The tasks. + /// + + /// The errors. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// The Allowed action the job. + /// + + /// The affected Object Id. + /// + + /// The name of the affected object. + /// + + /// The type of the affected object which is of + /// Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType class. + /// + + /// The custom job details like test failover job details. + /// + public JobProperties(string activityId = default(string), string scenarioName = default(string), string friendlyName = default(string), string state = default(string), string stateDescription = default(string), System.Collections.Generic.IList tasks = default(System.Collections.Generic.IList), System.Collections.Generic.IList errors = default(System.Collections.Generic.IList), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.Collections.Generic.IList allowedActions = default(System.Collections.Generic.IList), string targetObjectId = default(string), string targetObjectName = default(string), string targetInstanceType = default(string), JobDetails customDetails = default(JobDetails)) + { - ActivityId = activityId; - ScenarioName = scenarioName; - FriendlyName = friendlyName; - State = state; - StateDescription = stateDescription; - Tasks = tasks; - Errors = errors; - StartTime = startTime; - EndTime = endTime; - AllowedActions = allowedActions; - TargetObjectId = targetObjectId; - TargetObjectName = targetObjectName; - TargetInstanceType = targetInstanceType; - CustomDetails = customDetails; + this.ActivityId = activityId; + this.ScenarioName = scenarioName; + this.FriendlyName = friendlyName; + this.State = state; + this.StateDescription = stateDescription; + this.Tasks = tasks; + this.Errors = errors; + this.StartTime = startTime; + this.EndTime = endTime; + this.AllowedActions = allowedActions; + this.TargetObjectId = targetObjectId; + this.TargetObjectName = targetObjectName; + this.TargetInstanceType = targetInstanceType; + this.CustomDetails = customDetails; CustomInit(); } @@ -78,94 +94,93 @@ public JobProperties() /// partial void CustomInit(); + /// /// Gets or sets the activity id. /// - [JsonProperty(PropertyName = "activityId")] - public string ActivityId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "activityId")] + public string ActivityId {get; set; } /// /// Gets or sets the ScenarioName. /// - [JsonProperty(PropertyName = "scenarioName")] - public string ScenarioName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scenarioName")] + public string ScenarioName {get; set; } /// /// Gets or sets the DisplayName. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets the status of the Job. It is one of these values - - /// NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or - /// Other. + /// Gets or sets the status of the Job. It is one of these values - NotStarted, + /// InProgress, Succeeded, Failed, Cancelled, Suspended or Other. /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } /// - /// Gets or sets the description of the state of the Job. For e.g. - - /// For Succeeded state, description can be Completed, - /// PartiallySucceeded, CompletedWithInformation or Skipped. + /// Gets or sets the description of the state of the Job. For e.g. - For + /// Succeeded state, description can be Completed, PartiallySucceeded, + /// CompletedWithInformation or Skipped. /// - [JsonProperty(PropertyName = "stateDescription")] - public string StateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "stateDescription")] + public string StateDescription {get; set; } /// /// Gets or sets the tasks. /// - [JsonProperty(PropertyName = "tasks")] - public IList Tasks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tasks")] + public System.Collections.Generic.IList Tasks {get; set; } /// /// Gets or sets the errors. /// - [JsonProperty(PropertyName = "errors")] - public IList Errors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errors")] + public System.Collections.Generic.IList Errors {get; set; } /// /// Gets or sets the start time. /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } /// /// Gets or sets the end time. /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } /// /// Gets or sets the Allowed action the job. /// - [JsonProperty(PropertyName = "allowedActions")] - public IList AllowedActions { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedActions")] + public System.Collections.Generic.IList AllowedActions {get; set; } /// /// Gets or sets the affected Object Id. /// - [JsonProperty(PropertyName = "targetObjectId")] - public string TargetObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetObjectId")] + public string TargetObjectId {get; set; } /// /// Gets or sets the name of the affected object. /// - [JsonProperty(PropertyName = "targetObjectName")] - public string TargetObjectName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetObjectName")] + public string TargetObjectName {get; set; } /// /// Gets or sets the type of the affected object which is of /// Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType class. /// - [JsonProperty(PropertyName = "targetInstanceType")] - public string TargetInstanceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetInstanceType")] + public string TargetInstanceType {get; set; } /// /// Gets or sets the custom job details like test failover job details. /// - [JsonProperty(PropertyName = "customDetails")] - public JobDetails CustomDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "customDetails")] + public JobDetails CustomDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobQueryParameter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobQueryParameter.cs index e358dc193302..60307983e038 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobQueryParameter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobQueryParameter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,28 +23,41 @@ public JobQueryParameter() /// /// Initializes a new instance of the JobQueryParameter class. /// - /// Date time to get jobs from. - /// Date time to get jobs upto. - /// The Id of the fabric to search jobs - /// under. - /// The type of objects. - /// The states of the job to be filtered can be - /// in. - /// The output type of the jobs. Possible - /// values include: 'Json', 'Xml', 'Excel' - /// The job Name. - /// The timezone offset for the location - /// of the request (in minutes). + + /// Date time to get jobs from. + /// + + /// Date time to get jobs upto. + /// + + /// The Id of the fabric to search jobs under. + /// + + /// The type of objects. + /// + + /// The states of the job to be filtered can be in. + /// + + /// The output type of the jobs. + /// Possible values include: 'Json', 'Xml', 'Excel' + + /// The job Name. + /// + + /// The timezone offset for the location of the request (in minutes). + /// public JobQueryParameter(string startTime = default(string), string endTime = default(string), string fabricId = default(string), string affectedObjectTypes = default(string), string jobStatus = default(string), string jobOutputType = default(string), string jobName = default(string), double? timezoneOffset = default(double?)) + { - StartTime = startTime; - EndTime = endTime; - FabricId = fabricId; - AffectedObjectTypes = affectedObjectTypes; - JobStatus = jobStatus; - JobOutputType = jobOutputType; - JobName = jobName; - TimezoneOffset = timezoneOffset; + this.StartTime = startTime; + this.EndTime = endTime; + this.FabricId = fabricId; + this.AffectedObjectTypes = affectedObjectTypes; + this.JobStatus = jobStatus; + this.JobOutputType = jobOutputType; + this.JobName = jobName; + this.TimezoneOffset = timezoneOffset; CustomInit(); } @@ -59,55 +66,54 @@ public JobQueryParameter() /// partial void CustomInit(); + /// /// Gets or sets date time to get jobs from. /// - [JsonProperty(PropertyName = "startTime")] - public string StartTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public string StartTime {get; set; } /// /// Gets or sets date time to get jobs upto. /// - [JsonProperty(PropertyName = "endTime")] - public string EndTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public string EndTime {get; set; } /// /// Gets or sets the Id of the fabric to search jobs under. /// - [JsonProperty(PropertyName = "fabricId")] - public string FabricId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricId")] + public string FabricId {get; set; } /// /// Gets or sets the type of objects. /// - [JsonProperty(PropertyName = "affectedObjectTypes")] - public string AffectedObjectTypes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedObjectTypes")] + public string AffectedObjectTypes {get; set; } /// /// Gets or sets the states of the job to be filtered can be in. /// - [JsonProperty(PropertyName = "jobStatus")] - public string JobStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobStatus")] + public string JobStatus {get; set; } /// - /// Gets or sets the output type of the jobs. Possible values include: - /// 'Json', 'Xml', 'Excel' + /// Gets or sets the output type of the jobs. Possible values include: 'Json', 'Xml', 'Excel' /// - [JsonProperty(PropertyName = "jobOutputType")] - public string JobOutputType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobOutputType")] + public string JobOutputType {get; set; } /// /// Gets or sets the job Name. /// - [JsonProperty(PropertyName = "jobName")] - public string JobName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobName")] + public string JobName {get; set; } /// - /// Gets or sets the timezone offset for the location of the request - /// (in minutes). + /// Gets or sets the timezone offset for the location of the request (in + /// minutes). /// - [JsonProperty(PropertyName = "timezoneOffset")] - public double? TimezoneOffset { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "timezoneOffset")] + public double? TimezoneOffset {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobStatusEventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobStatusEventDetails.cs index 990e488237cb..15be34a46dbc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobStatusEventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobStatusEventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,17 +24,25 @@ public JobStatusEventDetails() /// /// Initializes a new instance of the JobStatusEventDetails class. /// - /// Job arm id for the event. - /// JobName for the Event. - /// JobStatus for the Event. - /// AffectedObjectType for the - /// event. + + /// Job arm id for the event. + /// + + /// JobName for the Event. + /// + + /// JobStatus for the Event. + /// + + /// AffectedObjectType for the event. + /// public JobStatusEventDetails(string jobId = default(string), string jobFriendlyName = default(string), string jobStatus = default(string), string affectedObjectType = default(string)) + { - JobId = jobId; - JobFriendlyName = jobFriendlyName; - JobStatus = jobStatus; - AffectedObjectType = affectedObjectType; + this.JobId = jobId; + this.JobFriendlyName = jobFriendlyName; + this.JobStatus = jobStatus; + this.AffectedObjectType = affectedObjectType; CustomInit(); } @@ -49,29 +51,29 @@ public JobStatusEventDetails() /// partial void CustomInit(); + /// /// Gets or sets job arm id for the event. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; set; } /// /// Gets or sets jobName for the Event. /// - [JsonProperty(PropertyName = "jobFriendlyName")] - public string JobFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobFriendlyName")] + public string JobFriendlyName {get; set; } /// /// Gets or sets jobStatus for the Event. /// - [JsonProperty(PropertyName = "jobStatus")] - public string JobStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobStatus")] + public string JobStatus {get; set; } /// /// Gets or sets affectedObjectType for the event. /// - [JsonProperty(PropertyName = "affectedObjectType")] - public string AffectedObjectType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "affectedObjectType")] + public string AffectedObjectType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobTaskDetails.cs index d643f6e98caa..57487507f21b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/JobTaskDetails.cs @@ -1,21 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// - /// This class represents a task which is actually a workflow so that one - /// can navigate to its individual drill down. + /// This class represents a task which is actually a workflow so that one can + /// navigate to its individual drill down. /// [Newtonsoft.Json.JsonObject("JobTaskDetails")] public partial class JobTaskDetails : TaskTypeDetails @@ -31,10 +25,13 @@ public JobTaskDetails() /// /// Initializes a new instance of the JobTaskDetails class. /// - /// The job entity. + + /// The job entity. + /// public JobTaskDetails(JobEntity jobTask = default(JobEntity)) + { - JobTask = jobTask; + this.JobTask = jobTask; CustomInit(); } @@ -43,11 +40,11 @@ public JobTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the job entity. /// - [JsonProperty(PropertyName = "jobTask")] - public JobEntity JobTask { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "jobTask")] + public JobEntity JobTask {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/KeyEncryptionKeyInfo.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/KeyEncryptionKeyInfo.cs index 795acdbaaecf..3586d676030e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/KeyEncryptionKeyInfo.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/KeyEncryptionKeyInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public KeyEncryptionKeyInfo() /// /// Initializes a new instance of the KeyEncryptionKeyInfo class. /// - /// The key URL / identifier. - /// The KeyVault resource ARM Id - /// for key. + + /// The key URL / identifier. + /// + + /// The KeyVault resource ARM Id for key. + /// public KeyEncryptionKeyInfo(string keyIdentifier = default(string), string keyVaultResourceArmId = default(string)) + { - KeyIdentifier = keyIdentifier; - KeyVaultResourceArmId = keyVaultResourceArmId; + this.KeyIdentifier = keyIdentifier; + this.KeyVaultResourceArmId = keyVaultResourceArmId; CustomInit(); } @@ -44,17 +42,17 @@ public KeyEncryptionKeyInfo() /// partial void CustomInit(); + /// /// Gets or sets the key URL / identifier. /// - [JsonProperty(PropertyName = "keyIdentifier")] - public string KeyIdentifier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyIdentifier")] + public string KeyIdentifier {get; set; } /// /// Gets or sets the KeyVault resource ARM Id for key. /// - [JsonProperty(PropertyName = "keyVaultResourceArmId")] - public string KeyVaultResourceArmId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultResourceArmId")] + public string KeyVaultResourceArmId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LicenseType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LicenseType.cs index 601e65be58f8..cb3ee54e19f7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LicenseType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LicenseType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for LicenseType. /// + + public static class LicenseType { public const string NotSpecified = "NotSpecified"; public const string NoLicenseType = "NoLicenseType"; public const string WindowsServer = "WindowsServer"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LogicalNetwork.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LogicalNetwork.cs index f56717f5c16b..0fcf28aa1757 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LogicalNetwork.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LogicalNetwork.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public LogicalNetwork() /// /// Initializes a new instance of the LogicalNetwork class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The Logical Network Properties. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The Logical Network Properties. + /// public LogicalNetwork(string id = default(string), string name = default(string), string type = default(string), string location = default(string), LogicalNetworkProperties properties = default(LogicalNetworkProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public LogicalNetwork() /// partial void CustomInit(); + /// /// Gets or sets the Logical Network Properties. /// - [JsonProperty(PropertyName = "properties")] - public LogicalNetworkProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public LogicalNetworkProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LogicalNetworkProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LogicalNetworkProperties.cs index c7a14805be2c..85cebee09ca4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LogicalNetworkProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/LogicalNetworkProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,21 +23,27 @@ public LogicalNetworkProperties() /// /// Initializes a new instance of the LogicalNetworkProperties class. /// - /// The Friendly Name. - /// A value indicating - /// whether Network Virtualization is enabled for the logical - /// network. - /// A value indicating whether - /// logical network is used as private test network by test - /// failover. - /// A value indicating - /// whether logical network definitions are isolated. + + /// The Friendly Name. + /// + + /// A value indicating whether Network Virtualization is enabled for the + /// logical network. + /// + + /// A value indicating whether logical network is used as private test network + /// by test failover. + /// + + /// A value indicating whether logical network definitions are isolated. + /// public LogicalNetworkProperties(string friendlyName = default(string), string networkVirtualizationStatus = default(string), string logicalNetworkUsage = default(string), string logicalNetworkDefinitionsStatus = default(string)) + { - FriendlyName = friendlyName; - NetworkVirtualizationStatus = networkVirtualizationStatus; - LogicalNetworkUsage = logicalNetworkUsage; - LogicalNetworkDefinitionsStatus = logicalNetworkDefinitionsStatus; + this.FriendlyName = friendlyName; + this.NetworkVirtualizationStatus = networkVirtualizationStatus; + this.LogicalNetworkUsage = logicalNetworkUsage; + this.LogicalNetworkDefinitionsStatus = logicalNetworkDefinitionsStatus; CustomInit(); } @@ -52,32 +52,32 @@ public LogicalNetworkProperties() /// partial void CustomInit(); + /// /// Gets or sets the Friendly Name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets a value indicating whether Network Virtualization is - /// enabled for the logical network. + /// Gets or sets a value indicating whether Network Virtualization is enabled + /// for the logical network. /// - [JsonProperty(PropertyName = "networkVirtualizationStatus")] - public string NetworkVirtualizationStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkVirtualizationStatus")] + public string NetworkVirtualizationStatus {get; set; } /// - /// Gets or sets a value indicating whether logical network is used as - /// private test network by test failover. + /// Gets or sets a value indicating whether logical network is used as private + /// test network by test failover. /// - [JsonProperty(PropertyName = "logicalNetworkUsage")] - public string LogicalNetworkUsage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logicalNetworkUsage")] + public string LogicalNetworkUsage {get; set; } /// - /// Gets or sets a value indicating whether logical network definitions - /// are isolated. + /// Gets or sets a value indicating whether logical network definitions are + /// isolated. /// - [JsonProperty(PropertyName = "logicalNetworkDefinitionsStatus")] - public string LogicalNetworkDefinitionsStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "logicalNetworkDefinitionsStatus")] + public string LogicalNetworkDefinitionsStatus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ManualActionTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ManualActionTaskDetails.cs index db65c3268a28..9d4c377570ec 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ManualActionTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ManualActionTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,14 +24,21 @@ public ManualActionTaskDetails() /// /// Initializes a new instance of the ManualActionTaskDetails class. /// - /// The name. - /// The instructions. - /// The observation. + + /// The name. + /// + + /// The instructions. + /// + + /// The observation. + /// public ManualActionTaskDetails(string name = default(string), string instructions = default(string), string observation = default(string)) + { - Name = name; - Instructions = instructions; - Observation = observation; + this.Name = name; + this.Instructions = instructions; + this.Observation = observation; CustomInit(); } @@ -46,23 +47,23 @@ public ManualActionTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the instructions. /// - [JsonProperty(PropertyName = "instructions")] - public string Instructions { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "instructions")] + public string Instructions {get; set; } /// /// Gets or sets the observation. /// - [JsonProperty(PropertyName = "observation")] - public string Observation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "observation")] + public string Observation {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MarsAgentDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MarsAgentDetails.cs index 7939133fe76f..9642b43cf552 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MarsAgentDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MarsAgentDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,28 +23,45 @@ public MarsAgentDetails() /// /// Initializes a new instance of the MarsAgentDetails class. /// - /// The Mars agent Id. - /// The Mars agent name. - /// The Mars agent Bios Id. - /// The fabric object Id. - /// The Mars agent Fqdn. - /// The version. - /// The last heartbeat received from the - /// Mars agent. - /// The health of the Mars agent. Possible values - /// include: 'None', 'Normal', 'Warning', 'Critical' - /// The health errors. - public MarsAgentDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), IList healthErrors = default(IList)) + + /// The Mars agent Id. + /// + + /// The Mars agent name. + /// + + /// The Mars agent Bios Id. + /// + + /// The fabric object Id. + /// + + /// The Mars agent Fqdn. + /// + + /// The version. + /// + + /// The last heartbeat received from the Mars agent. + /// + + /// The health of the Mars agent. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + + /// The health errors. + /// + public MarsAgentDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList)) + { - Id = id; - Name = name; - BiosId = biosId; - FabricObjectId = fabricObjectId; - Fqdn = fqdn; - Version = version; - LastHeartbeatUtc = lastHeartbeatUtc; - Health = health; - HealthErrors = healthErrors; + this.Id = id; + this.Name = name; + this.BiosId = biosId; + this.FabricObjectId = fabricObjectId; + this.Fqdn = fqdn; + this.Version = version; + this.LastHeartbeatUtc = lastHeartbeatUtc; + this.Health = health; + this.HealthErrors = healthErrors; CustomInit(); } @@ -61,60 +70,59 @@ public MarsAgentDetails() /// partial void CustomInit(); + /// /// Gets the Mars agent Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the Mars agent name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the Mars agent Bios Id. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; private set; } /// /// Gets the fabric object Id. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; private set; } /// /// Gets the Mars agent Fqdn. /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdn")] + public string Fqdn {get; private set; } /// /// Gets the version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } /// /// Gets the last heartbeat received from the Mars agent. /// - [JsonProperty(PropertyName = "lastHeartbeatUtc")] - public System.DateTime? LastHeartbeatUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeatUtc")] + public System.DateTime? LastHeartbeatUtc {get; private set; } /// - /// Gets the health of the Mars agent. Possible values include: 'None', - /// 'Normal', 'Warning', 'Critical' + /// Gets the health of the Mars agent. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "health")] - public string Health { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; private set; } /// /// Gets the health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MasterTargetServer.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MasterTargetServer.cs index f6e60f92b6fa..f9ab03ab8d97 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MasterTargetServer.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MasterTargetServer.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,49 +23,81 @@ public MasterTargetServer() /// /// Initializes a new instance of the MasterTargetServer class. /// - /// The server Id. - /// The IP address of the server. - /// The server name. - /// The OS type of the server. - /// The version of the scout component on - /// the server. - /// The last heartbeat received from the - /// server. - /// Version status. - /// The retention volumes of Master - /// target Server. - /// The list of data stores in the - /// fabric. - /// Validation errors. - /// Health errors. - /// Disk count of the master target. - /// OS Version of the master target. - /// Agent expiry date. - /// MARS agent version. - /// MARS agent expiry date. - /// Agent version details. - /// Mars agent version - /// details. - public MasterTargetServer(string id = default(string), string ipAddress = default(string), string name = default(string), string osType = default(string), string agentVersion = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), IList retentionVolumes = default(IList), IList dataStores = default(IList), IList validationErrors = default(IList), IList healthErrors = default(IList), int? diskCount = default(int?), string osVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), string marsAgentVersion = default(string), System.DateTime? marsAgentExpiryDate = default(System.DateTime?), VersionDetails agentVersionDetails = default(VersionDetails), VersionDetails marsAgentVersionDetails = default(VersionDetails)) + + /// The server Id. + /// + + /// The IP address of the server. + /// + + /// The server name. + /// + + /// The OS type of the server. + /// + + /// The version of the scout component on the server. + /// + + /// The last heartbeat received from the server. + /// + + /// Version status. + /// + + /// The retention volumes of Master target Server. + /// + + /// The list of data stores in the fabric. + /// + + /// Validation errors. + /// + + /// Health errors. + /// + + /// Disk count of the master target. + /// + + /// OS Version of the master target. + /// + + /// Agent expiry date. + /// + + /// MARS agent version. + /// + + /// MARS agent expiry date. + /// + + /// Agent version details. + /// + + /// Mars agent version details. + /// + public MasterTargetServer(string id = default(string), string ipAddress = default(string), string name = default(string), string osType = default(string), string agentVersion = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), System.Collections.Generic.IList retentionVolumes = default(System.Collections.Generic.IList), System.Collections.Generic.IList dataStores = default(System.Collections.Generic.IList), System.Collections.Generic.IList validationErrors = default(System.Collections.Generic.IList), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList), int? diskCount = default(int?), string osVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), string marsAgentVersion = default(string), System.DateTime? marsAgentExpiryDate = default(System.DateTime?), VersionDetails agentVersionDetails = default(VersionDetails), VersionDetails marsAgentVersionDetails = default(VersionDetails)) + { - Id = id; - IpAddress = ipAddress; - Name = name; - OsType = osType; - AgentVersion = agentVersion; - LastHeartbeat = lastHeartbeat; - VersionStatus = versionStatus; - RetentionVolumes = retentionVolumes; - DataStores = dataStores; - ValidationErrors = validationErrors; - HealthErrors = healthErrors; - DiskCount = diskCount; - OsVersion = osVersion; - AgentExpiryDate = agentExpiryDate; - MarsAgentVersion = marsAgentVersion; - MarsAgentExpiryDate = marsAgentExpiryDate; - AgentVersionDetails = agentVersionDetails; - MarsAgentVersionDetails = marsAgentVersionDetails; + this.Id = id; + this.IPAddress = ipAddress; + this.Name = name; + this.OSType = osType; + this.AgentVersion = agentVersion; + this.LastHeartbeat = lastHeartbeat; + this.VersionStatus = versionStatus; + this.RetentionVolumes = retentionVolumes; + this.DataStores = dataStores; + this.ValidationErrors = validationErrors; + this.HealthErrors = healthErrors; + this.DiskCount = diskCount; + this.OSVersion = osVersion; + this.AgentExpiryDate = agentExpiryDate; + this.MarsAgentVersion = marsAgentVersion; + this.MarsAgentExpiryDate = marsAgentExpiryDate; + this.AgentVersionDetails = agentVersionDetails; + this.MarsAgentVersionDetails = marsAgentVersionDetails; CustomInit(); } @@ -82,113 +106,113 @@ public MasterTargetServer() /// partial void CustomInit(); + /// /// Gets or sets the server Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the IP address of the server. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the server name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the OS type of the server. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the version of the scout component on the server. /// - [JsonProperty(PropertyName = "agentVersion")] - public string AgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion {get; set; } /// /// Gets or sets the last heartbeat received from the server. /// - [JsonProperty(PropertyName = "lastHeartbeat")] - public System.DateTime? LastHeartbeat { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat {get; set; } /// /// Gets or sets version status. /// - [JsonProperty(PropertyName = "versionStatus")] - public string VersionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "versionStatus")] + public string VersionStatus {get; set; } /// /// Gets or sets the retention volumes of Master target Server. /// - [JsonProperty(PropertyName = "retentionVolumes")] - public IList RetentionVolumes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "retentionVolumes")] + public System.Collections.Generic.IList RetentionVolumes {get; set; } /// /// Gets or sets the list of data stores in the fabric. /// - [JsonProperty(PropertyName = "dataStores")] - public IList DataStores { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataStores")] + public System.Collections.Generic.IList DataStores {get; set; } /// /// Gets or sets validation errors. /// - [JsonProperty(PropertyName = "validationErrors")] - public IList ValidationErrors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "validationErrors")] + public System.Collections.Generic.IList ValidationErrors {get; set; } /// /// Gets or sets health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; set; } /// /// Gets or sets disk count of the master target. /// - [JsonProperty(PropertyName = "diskCount")] - public int? DiskCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskCount")] + public int? DiskCount {get; set; } /// - /// Gets or sets OS Version of the master target. + /// Gets or sets oS Version of the master target. /// - [JsonProperty(PropertyName = "osVersion")] - public string OsVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osVersion")] + public string OSVersion {get; set; } /// /// Gets or sets agent expiry date. /// - [JsonProperty(PropertyName = "agentExpiryDate")] - public System.DateTime? AgentExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentExpiryDate")] + public System.DateTime? AgentExpiryDate {get; set; } /// - /// Gets or sets MARS agent version. + /// Gets or sets mARS agent version. /// - [JsonProperty(PropertyName = "marsAgentVersion")] - public string MarsAgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "marsAgentVersion")] + public string MarsAgentVersion {get; set; } /// - /// Gets or sets MARS agent expiry date. + /// Gets or sets mARS agent expiry date. /// - [JsonProperty(PropertyName = "marsAgentExpiryDate")] - public System.DateTime? MarsAgentExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "marsAgentExpiryDate")] + public System.DateTime? MarsAgentExpiryDate {get; set; } /// /// Gets or sets agent version details. /// - [JsonProperty(PropertyName = "agentVersionDetails")] - public VersionDetails AgentVersionDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersionDetails")] + public VersionDetails AgentVersionDetails {get; set; } /// /// Gets or sets mars agent version details. /// - [JsonProperty(PropertyName = "marsAgentVersionDetails")] - public VersionDetails MarsAgentVersionDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "marsAgentVersionDetails")] + public VersionDetails MarsAgentVersionDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateInput.cs index 7c3e1427ed2b..ab4630b37c49 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +23,13 @@ public MigrateInput() /// /// Initializes a new instance of the MigrateInput class. /// - /// Migrate input properties. + + /// Migrate input properties. + /// public MigrateInput(MigrateInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,28 +38,28 @@ public MigrateInput(MigrateInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets migrate input properties. /// - [JsonProperty(PropertyName = "properties")] - public MigrateInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public MigrateInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateInputProperties.cs index 2e79ed2a9944..ede6fa39285a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public MigrateInputProperties() /// /// Initializes a new instance of the MigrateInputProperties class. /// - /// The provider specific - /// details. + + /// The provider specific details. + /// public MigrateInputProperties(MigrateProviderSpecificInput providerSpecificDetails) + { - ProviderSpecificDetails = providerSpecificDetails; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -43,24 +38,25 @@ public MigrateInputProperties(MigrateProviderSpecificInput providerSpecificDetai /// partial void CustomInit(); + /// /// Gets or sets the provider specific details. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public MigrateProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public MigrateProviderSpecificInput ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ProviderSpecificDetails == null) + if (this.ProviderSpecificDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProviderSpecificDetails"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateProviderSpecificInput.cs index 0850e597fa7b..6def8e50b020 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrateProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class MigrateProviderSpecificInput { /// - /// Initializes a new instance of the MigrateProviderSpecificInput - /// class. + /// Initializes a new instance of the MigrateProviderSpecificInput class. /// public MigrateProviderSpecificInput() { @@ -35,4 +28,4 @@ public MigrateProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItem.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItem.cs index b20b0bf227f4..31f80e7d551b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItem.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public MigrationItem() /// /// Initializes a new instance of the MigrationItem class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The migration item properties. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The migration item properties. + /// public MigrationItem(string id = default(string), string name = default(string), string type = default(string), string location = default(string), MigrationItemProperties properties = default(MigrationItemProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public MigrationItem() /// partial void CustomInit(); + /// /// Gets or sets the migration item properties. /// - [JsonProperty(PropertyName = "properties")] - public MigrationItemProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public MigrationItemProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemOperation.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemOperation.cs index 4425df8926dd..ffcf276d7c2b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemOperation.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemOperation.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for MigrationItemOperation. /// + + public static class MigrationItemOperation { public const string DisableMigration = "DisableMigration"; @@ -24,4 +21,4 @@ public static class MigrationItemOperation public const string PauseReplication = "PauseReplication"; public const string ResumeReplication = "ResumeReplication"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemProperties.cs index 62da6b332443..855d6566953e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,76 +23,99 @@ public MigrationItemProperties() /// /// Initializes a new instance of the MigrationItemProperties class. /// - /// The on-premise virtual machine - /// name. - /// The ARM Id of policy governing this - /// item. - /// The name of policy governing this - /// item. - /// The recovery services - /// provider ARM Id. - /// The replication status. - /// The migration status. Possible values - /// include: 'None', 'EnableMigrationInProgress', + + /// The on-premise virtual machine name. + /// + + /// The ARM Id of policy governing this item. + /// + + /// The name of policy governing this item. + /// + + /// The recovery services provider ARM Id. + /// + + /// The replication status. + /// + + /// The migration status. + /// Possible values include: 'None', 'EnableMigrationInProgress', /// 'EnableMigrationFailed', 'DisableMigrationInProgress', /// 'DisableMigrationFailed', 'InitialSeedingInProgress', /// 'InitialSeedingFailed', 'Replicating', 'MigrationInProgress', /// 'MigrationSucceeded', 'MigrationFailed', 'ResumeInProgress', /// 'ResumeInitiated', 'SuspendingProtection', 'ProtectionSuspended', - /// 'MigrationCompletedWithInformation', - /// 'MigrationPartiallySucceeded' - /// The migration state - /// description. - /// The last test migration - /// time. - /// The status of the last test - /// migration. - /// The last migration time. - /// The status of the last - /// migration. - /// The test migrate state. Possible - /// values include: 'None', 'TestMigrationInProgress', + /// 'MigrationCompletedWithInformation', 'MigrationPartiallySucceeded' + + /// The migration state description. + /// + + /// The last test migration time. + /// + + /// The status of the last test migration. + /// + + /// The last migration time. + /// + + /// The status of the last migration. + /// + + /// The test migrate state. + /// Possible values include: 'None', 'TestMigrationInProgress', /// 'TestMigrationSucceeded', 'TestMigrationFailed', - /// 'TestMigrationCleanupInProgress', - /// 'TestMigrationCompletedWithInformation', + /// 'TestMigrationCleanupInProgress', 'TestMigrationCompletedWithInformation', /// 'TestMigrationPartiallySucceeded' - /// The test migrate state - /// description. - /// The consolidated health. Possible values - /// include: 'None', 'Normal', 'Warning', 'Critical' - /// The list of health errors. - /// The allowed operations on the - /// migration item based on the current migration state of the - /// item. - /// The current job details. - /// The critical past job - /// details. - /// The correlation Id for events - /// associated with this migration item. - /// The migration provider custom - /// settings. - public MigrationItemProperties(string machineName = default(string), string policyId = default(string), string policyFriendlyName = default(string), string recoveryServicesProviderId = default(string), string replicationStatus = default(string), string migrationState = default(string), string migrationStateDescription = default(string), System.DateTime? lastTestMigrationTime = default(System.DateTime?), string lastTestMigrationStatus = default(string), System.DateTime? lastMigrationTime = default(System.DateTime?), string lastMigrationStatus = default(string), string testMigrateState = default(string), string testMigrateStateDescription = default(string), string health = default(string), IList healthErrors = default(IList), IList allowedOperations = default(IList), CurrentJobDetails currentJob = default(CurrentJobDetails), IList criticalJobHistory = default(IList), string eventCorrelationId = default(string), MigrationProviderSpecificSettings providerSpecificDetails = default(MigrationProviderSpecificSettings)) + + /// The test migrate state description. + /// + + /// The consolidated health. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + + /// The list of health errors. + /// + + /// The allowed operations on the migration item based on the current migration + /// state of the item. + /// + + /// The current job details. + /// + + /// The critical past job details. + /// + + /// The correlation Id for events associated with this migration item. + /// + + /// The migration provider custom settings. + /// + public MigrationItemProperties(string machineName = default(string), string policyId = default(string), string policyFriendlyName = default(string), string recoveryServicesProviderId = default(string), string replicationStatus = default(string), string migrationState = default(string), string migrationStateDescription = default(string), System.DateTime? lastTestMigrationTime = default(System.DateTime?), string lastTestMigrationStatus = default(string), System.DateTime? lastMigrationTime = default(System.DateTime?), string lastMigrationStatus = default(string), string testMigrateState = default(string), string testMigrateStateDescription = default(string), string health = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList), System.Collections.Generic.IList allowedOperations = default(System.Collections.Generic.IList), CurrentJobDetails currentJob = default(CurrentJobDetails), System.Collections.Generic.IList criticalJobHistory = default(System.Collections.Generic.IList), string eventCorrelationId = default(string), MigrationProviderSpecificSettings providerSpecificDetails = default(MigrationProviderSpecificSettings)) + { - MachineName = machineName; - PolicyId = policyId; - PolicyFriendlyName = policyFriendlyName; - RecoveryServicesProviderId = recoveryServicesProviderId; - ReplicationStatus = replicationStatus; - MigrationState = migrationState; - MigrationStateDescription = migrationStateDescription; - LastTestMigrationTime = lastTestMigrationTime; - LastTestMigrationStatus = lastTestMigrationStatus; - LastMigrationTime = lastMigrationTime; - LastMigrationStatus = lastMigrationStatus; - TestMigrateState = testMigrateState; - TestMigrateStateDescription = testMigrateStateDescription; - Health = health; - HealthErrors = healthErrors; - AllowedOperations = allowedOperations; - CurrentJob = currentJob; - CriticalJobHistory = criticalJobHistory; - EventCorrelationId = eventCorrelationId; - ProviderSpecificDetails = providerSpecificDetails; + this.MachineName = machineName; + this.PolicyId = policyId; + this.PolicyFriendlyName = policyFriendlyName; + this.RecoveryServicesProviderId = recoveryServicesProviderId; + this.ReplicationStatus = replicationStatus; + this.MigrationState = migrationState; + this.MigrationStateDescription = migrationStateDescription; + this.LastTestMigrationTime = lastTestMigrationTime; + this.LastTestMigrationStatus = lastTestMigrationStatus; + this.LastMigrationTime = lastMigrationTime; + this.LastMigrationStatus = lastMigrationStatus; + this.TestMigrateState = testMigrateState; + this.TestMigrateStateDescription = testMigrateStateDescription; + this.Health = health; + this.HealthErrors = healthErrors; + this.AllowedOperations = allowedOperations; + this.CurrentJob = currentJob; + this.CriticalJobHistory = criticalJobHistory; + this.EventCorrelationId = eventCorrelationId; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -109,139 +124,126 @@ public MigrationItemProperties() /// partial void CustomInit(); + /// /// Gets the on-premise virtual machine name. /// - [JsonProperty(PropertyName = "machineName")] - public string MachineName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "machineName")] + public string MachineName {get; private set; } /// /// Gets the ARM Id of policy governing this item. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; private set; } /// /// Gets the name of policy governing this item. /// - [JsonProperty(PropertyName = "policyFriendlyName")] - public string PolicyFriendlyName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyFriendlyName")] + public string PolicyFriendlyName {get; private set; } /// /// Gets the recovery services provider ARM Id. /// - [JsonProperty(PropertyName = "recoveryServicesProviderId")] - public string RecoveryServicesProviderId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryServicesProviderId")] + public string RecoveryServicesProviderId {get; private set; } /// /// Gets the replication status. /// - [JsonProperty(PropertyName = "replicationStatus")] - public string ReplicationStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationStatus")] + public string ReplicationStatus {get; private set; } /// - /// Gets the migration status. Possible values include: 'None', - /// 'EnableMigrationInProgress', 'EnableMigrationFailed', - /// 'DisableMigrationInProgress', 'DisableMigrationFailed', - /// 'InitialSeedingInProgress', 'InitialSeedingFailed', 'Replicating', - /// 'MigrationInProgress', 'MigrationSucceeded', 'MigrationFailed', - /// 'ResumeInProgress', 'ResumeInitiated', 'SuspendingProtection', - /// 'ProtectionSuspended', 'MigrationCompletedWithInformation', - /// 'MigrationPartiallySucceeded' + /// Gets the migration status. Possible values include: 'None', 'EnableMigrationInProgress', 'EnableMigrationFailed', 'DisableMigrationInProgress', 'DisableMigrationFailed', 'InitialSeedingInProgress', 'InitialSeedingFailed', 'Replicating', 'MigrationInProgress', 'MigrationSucceeded', 'MigrationFailed', 'ResumeInProgress', 'ResumeInitiated', 'SuspendingProtection', 'ProtectionSuspended', 'MigrationCompletedWithInformation', 'MigrationPartiallySucceeded' /// - [JsonProperty(PropertyName = "migrationState")] - public string MigrationState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "migrationState")] + public string MigrationState {get; private set; } /// /// Gets the migration state description. /// - [JsonProperty(PropertyName = "migrationStateDescription")] - public string MigrationStateDescription { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "migrationStateDescription")] + public string MigrationStateDescription {get; private set; } /// /// Gets the last test migration time. /// - [JsonProperty(PropertyName = "lastTestMigrationTime")] - public System.DateTime? LastTestMigrationTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastTestMigrationTime")] + public System.DateTime? LastTestMigrationTime {get; private set; } /// /// Gets the status of the last test migration. /// - [JsonProperty(PropertyName = "lastTestMigrationStatus")] - public string LastTestMigrationStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastTestMigrationStatus")] + public string LastTestMigrationStatus {get; private set; } /// /// Gets the last migration time. /// - [JsonProperty(PropertyName = "lastMigrationTime")] - public System.DateTime? LastMigrationTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastMigrationTime")] + public System.DateTime? LastMigrationTime {get; private set; } /// /// Gets the status of the last migration. /// - [JsonProperty(PropertyName = "lastMigrationStatus")] - public string LastMigrationStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastMigrationStatus")] + public string LastMigrationStatus {get; private set; } /// - /// Gets the test migrate state. Possible values include: 'None', - /// 'TestMigrationInProgress', 'TestMigrationSucceeded', - /// 'TestMigrationFailed', 'TestMigrationCleanupInProgress', - /// 'TestMigrationCompletedWithInformation', - /// 'TestMigrationPartiallySucceeded' + /// Gets the test migrate state. Possible values include: 'None', 'TestMigrationInProgress', 'TestMigrationSucceeded', 'TestMigrationFailed', 'TestMigrationCleanupInProgress', 'TestMigrationCompletedWithInformation', 'TestMigrationPartiallySucceeded' /// - [JsonProperty(PropertyName = "testMigrateState")] - public string TestMigrateState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testMigrateState")] + public string TestMigrateState {get; private set; } /// /// Gets the test migrate state description. /// - [JsonProperty(PropertyName = "testMigrateStateDescription")] - public string TestMigrateStateDescription { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testMigrateStateDescription")] + public string TestMigrateStateDescription {get; private set; } /// - /// Gets the consolidated health. Possible values include: 'None', - /// 'Normal', 'Warning', 'Critical' + /// Gets the consolidated health. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "health")] - public string Health { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; private set; } /// /// Gets the list of health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; private set; } /// - /// Gets the allowed operations on the migration item based on the - /// current migration state of the item. + /// Gets the allowed operations on the migration item based on the current + /// migration state of the item. /// - [JsonProperty(PropertyName = "allowedOperations")] - public IList AllowedOperations { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedOperations")] + public System.Collections.Generic.IList AllowedOperations {get; private set; } /// /// Gets the current job details. /// - [JsonProperty(PropertyName = "currentJob")] - public CurrentJobDetails CurrentJob { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "currentJob")] + public CurrentJobDetails CurrentJob {get; private set; } /// /// Gets the critical past job details. /// - [JsonProperty(PropertyName = "criticalJobHistory")] - public IList CriticalJobHistory { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "criticalJobHistory")] + public System.Collections.Generic.IList CriticalJobHistory {get; private set; } /// - /// Gets the correlation Id for events associated with this migration - /// item. + /// Gets the correlation Id for events associated with this migration item. /// - [JsonProperty(PropertyName = "eventCorrelationId")] - public string EventCorrelationId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "eventCorrelationId")] + public string EventCorrelationId {get; private set; } /// /// Gets or sets the migration provider custom settings. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public MigrationProviderSpecificSettings ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public MigrationProviderSpecificSettings ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemsQueryParameter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemsQueryParameter.cs index 15610f390293..47e51d55b7a2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemsQueryParameter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationItemsQueryParameter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class MigrationItemsQueryParameter { /// - /// Initializes a new instance of the MigrationItemsQueryParameter - /// class. + /// Initializes a new instance of the MigrationItemsQueryParameter class. /// public MigrationItemsQueryParameter() { @@ -28,19 +21,23 @@ public MigrationItemsQueryParameter() } /// - /// Initializes a new instance of the MigrationItemsQueryParameter - /// class. + /// Initializes a new instance of the MigrationItemsQueryParameter class. /// - /// The source fabric name - /// filter. - /// The source container name - /// filter. - /// The replication provider type. + + /// The source fabric name filter. + /// + + /// The source container name filter. + /// + + /// The replication provider type. + /// public MigrationItemsQueryParameter(string sourceFabricName = default(string), string sourceContainerName = default(string), string instanceType = default(string)) + { - SourceFabricName = sourceFabricName; - SourceContainerName = sourceContainerName; - InstanceType = instanceType; + this.SourceFabricName = sourceFabricName; + this.SourceContainerName = sourceContainerName; + this.InstanceType = instanceType; CustomInit(); } @@ -49,23 +46,23 @@ public MigrationItemsQueryParameter() /// partial void CustomInit(); + /// /// Gets or sets the source fabric name filter. /// - [JsonProperty(PropertyName = "sourceFabricName")] - public string SourceFabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceFabricName")] + public string SourceFabricName {get; set; } /// /// Gets or sets the source container name filter. /// - [JsonProperty(PropertyName = "sourceContainerName")] - public string SourceContainerName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceContainerName")] + public string SourceContainerName {get; set; } /// /// Gets or sets the replication provider type. /// - [JsonProperty(PropertyName = "instanceType")] - public string InstanceType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "instanceType")] + public string InstanceType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationProviderSpecificSettings.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationProviderSpecificSettings.cs index 290afc8007d2..6af7d7491574 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationProviderSpecificSettings.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationProviderSpecificSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class MigrationProviderSpecificSettings { /// - /// Initializes a new instance of the MigrationProviderSpecificSettings - /// class. + /// Initializes a new instance of the MigrationProviderSpecificSettings class. /// public MigrationProviderSpecificSettings() { @@ -35,4 +28,4 @@ public MigrationProviderSpecificSettings() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPoint.cs index 776f9a71ac12..8cfa874a3685 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public MigrationRecoveryPoint() /// /// Initializes a new instance of the MigrationRecoveryPoint class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// Recovery point properties. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// Recovery point properties. + /// public MigrationRecoveryPoint(string id = default(string), string name = default(string), string type = default(string), string location = default(string), MigrationRecoveryPointProperties properties = default(MigrationRecoveryPointProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public MigrationRecoveryPoint() /// partial void CustomInit(); + /// /// Gets or sets recovery point properties. /// - [JsonProperty(PropertyName = "properties")] - public MigrationRecoveryPointProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public MigrationRecoveryPointProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPointProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPointProperties.cs index 5ca49b157398..faa1b65f2205 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPointProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPointProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class MigrationRecoveryPointProperties { /// - /// Initializes a new instance of the MigrationRecoveryPointProperties - /// class. + /// Initializes a new instance of the MigrationRecoveryPointProperties class. /// public MigrationRecoveryPointProperties() { @@ -28,17 +21,20 @@ public MigrationRecoveryPointProperties() } /// - /// Initializes a new instance of the MigrationRecoveryPointProperties - /// class. + /// Initializes a new instance of the MigrationRecoveryPointProperties class. /// - /// The recovery point time. - /// The recovery point type. Possible - /// values include: 'NotSpecified', 'ApplicationConsistent', + + /// The recovery point time. + /// + + /// The recovery point type. + /// Possible values include: 'NotSpecified', 'ApplicationConsistent', /// 'CrashConsistent' public MigrationRecoveryPointProperties(System.DateTime? recoveryPointTime = default(System.DateTime?), string recoveryPointType = default(string)) + { - RecoveryPointTime = recoveryPointTime; - RecoveryPointType = recoveryPointType; + this.RecoveryPointTime = recoveryPointTime; + this.RecoveryPointType = recoveryPointType; CustomInit(); } @@ -47,18 +43,17 @@ public MigrationRecoveryPointProperties() /// partial void CustomInit(); + /// /// Gets the recovery point time. /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public System.DateTime? RecoveryPointTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime {get; private set; } /// - /// Gets the recovery point type. Possible values include: - /// 'NotSpecified', 'ApplicationConsistent', 'CrashConsistent' + /// Gets the recovery point type. Possible values include: 'NotSpecified', 'ApplicationConsistent', 'CrashConsistent' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPointType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPointType.cs index 4ce059d33c3f..dcba2851cb36 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPointType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationRecoveryPointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for MigrationRecoveryPointType. /// + + public static class MigrationRecoveryPointType { public const string NotSpecified = "NotSpecified"; public const string ApplicationConsistent = "ApplicationConsistent"; public const string CrashConsistent = "CrashConsistent"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationState.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationState.cs index aa707b28ea10..4ce286b9f543 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationState.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MigrationState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for MigrationState. /// + + public static class MigrationState { public const string None = "None"; @@ -34,4 +31,4 @@ public static class MigrationState public const string MigrationCompletedWithInformation = "MigrationCompletedWithInformation"; public const string MigrationPartiallySucceeded = "MigrationPartiallySucceeded"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MobilityAgentUpgradeState.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MobilityAgentUpgradeState.cs index 743ba91280dd..63a80246b2ee 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MobilityAgentUpgradeState.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MobilityAgentUpgradeState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for MobilityAgentUpgradeState. /// + + public static class MobilityAgentUpgradeState { public const string None = "None"; @@ -21,4 +18,4 @@ public static class MobilityAgentUpgradeState public const string Completed = "Completed"; public const string Commit = "Commit"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MobilityServiceUpdate.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MobilityServiceUpdate.cs index 7b8dcead9ee3..1ab46a04c767 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MobilityServiceUpdate.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MobilityServiceUpdate.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,21 @@ public MobilityServiceUpdate() /// /// Initializes a new instance of the MobilityServiceUpdate class. /// - /// The version of the latest update. - /// The reboot status of the update - - /// whether it is required or not. - /// The OS type. + + /// The version of the latest update. + /// + + /// The reboot status of the update - whether it is required or not. + /// + + /// The OS type. + /// public MobilityServiceUpdate(string version = default(string), string rebootStatus = default(string), string osType = default(string)) + { - Version = version; - RebootStatus = rebootStatus; - OsType = osType; + this.Version = version; + this.RebootStatus = rebootStatus; + this.OSType = osType; CustomInit(); } @@ -46,24 +46,24 @@ public MobilityServiceUpdate() /// partial void CustomInit(); + /// /// Gets or sets the version of the latest update. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; set; } /// - /// Gets or sets the reboot status of the update - whether it is - /// required or not. + /// Gets or sets the reboot status of the update - whether it is required or + /// not. /// - [JsonProperty(PropertyName = "rebootStatus")] - public string RebootStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "rebootStatus")] + public string RebootStatus {get; set; } /// /// Gets or sets the OS type. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MultiVmGroupCreateOption.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MultiVmGroupCreateOption.cs index 7e0041e72ccb..97a098209d51 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MultiVmGroupCreateOption.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MultiVmGroupCreateOption.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for MultiVmGroupCreateOption. /// + + public static class MultiVmGroupCreateOption { public const string AutoCreated = "AutoCreated"; public const string UserSpecified = "UserSpecified"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MultiVmSyncPointOption.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MultiVmSyncPointOption.cs index 3596e2a44abc..3ec3fc4e7790 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MultiVmSyncPointOption.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/MultiVmSyncPointOption.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for MultiVmSyncPointOption. /// + + public static class MultiVmSyncPointOption { public const string UseMultiVmSyncRecoveryPoint = "UseMultiVmSyncRecoveryPoint"; public const string UsePerVmRecoveryPoint = "UsePerVmRecoveryPoint"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Network.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Network.cs index fc2e69bf5bcf..1314d5ee147f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Network.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Network.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public Network() /// /// Initializes a new instance of the Network class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The Network Properties. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The Network Properties. + /// public Network(string id = default(string), string name = default(string), string type = default(string), string location = default(string), NetworkProperties properties = default(NetworkProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public Network() /// partial void CustomInit(); + /// /// Gets or sets the Network Properties. /// - [JsonProperty(PropertyName = "properties")] - public NetworkProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public NetworkProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMapping.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMapping.cs index 1d3f5fde05d2..1f25e6eb060f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMapping.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMapping.cs @@ -1,26 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Network Mapping model. Ideally it should have been possible to inherit - /// this class from prev version in InheritedModels as long as there is no + /// Network Mapping model. Ideally it should have been possible to inherit this + /// class from prev version in InheritedModels as long as there is no /// difference in structure or method signature. Since there were no base - /// Models for certain fields and methods viz NetworkMappingProperties and - /// Load with required return type, the class has been introduced in its - /// entirety with references to base models to facilitate extensions in - /// subsequent versions. + /// Models for certain fields and methods viz NetworkMappingProperties and Load + /// with required return type, the class has been introduced in its entirety + /// with references to base models to facilitate extensions in subsequent + /// versions. /// public partial class NetworkMapping : Resource { @@ -35,15 +29,26 @@ public NetworkMapping() /// /// Initializes a new instance of the NetworkMapping class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The Network Mapping Properties. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The Network Mapping Properties. + /// public NetworkMapping(string id = default(string), string name = default(string), string type = default(string), string location = default(string), NetworkMappingProperties properties = default(NetworkMappingProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -52,11 +57,11 @@ public NetworkMapping() /// partial void CustomInit(); + /// /// Gets or sets the Network Mapping Properties. /// - [JsonProperty(PropertyName = "properties")] - public NetworkMappingProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public NetworkMappingProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMappingFabricSpecificSettings.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMappingFabricSpecificSettings.cs index f0ce96362b63..f8436b05c23c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMappingFabricSpecificSettings.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMappingFabricSpecificSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class NetworkMappingFabricSpecificSettings { /// - /// Initializes a new instance of the - /// NetworkMappingFabricSpecificSettings class. + /// Initializes a new instance of the NetworkMappingFabricSpecificSettings class. /// public NetworkMappingFabricSpecificSettings() { @@ -35,4 +28,4 @@ public NetworkMappingFabricSpecificSettings() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMappingProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMappingProperties.cs index 682ea7436ed3..3d6b43ecb86c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMappingProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkMappingProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,34 +23,45 @@ public NetworkMappingProperties() /// /// Initializes a new instance of the NetworkMappingProperties class. /// - /// The pairing state for network mapping. - /// The primary network - /// friendly name. - /// The primary network id for network - /// mapping. - /// The primary fabric friendly - /// name. - /// The recovery network - /// friendly name. - /// The recovery network id for network - /// mapping. - /// The recovery fabric ARM - /// id. - /// The recovery fabric - /// friendly name. - /// The fabric specific - /// settings. + + /// The pairing state for network mapping. + /// + + /// The primary network friendly name. + /// + + /// The primary network id for network mapping. + /// + + /// The primary fabric friendly name. + /// + + /// The recovery network friendly name. + /// + + /// The recovery network id for network mapping. + /// + + /// The recovery fabric ARM id. + /// + + /// The recovery fabric friendly name. + /// + + /// The fabric specific settings. + /// public NetworkMappingProperties(string state = default(string), string primaryNetworkFriendlyName = default(string), string primaryNetworkId = default(string), string primaryFabricFriendlyName = default(string), string recoveryNetworkFriendlyName = default(string), string recoveryNetworkId = default(string), string recoveryFabricArmId = default(string), string recoveryFabricFriendlyName = default(string), NetworkMappingFabricSpecificSettings fabricSpecificSettings = default(NetworkMappingFabricSpecificSettings)) + { - State = state; - PrimaryNetworkFriendlyName = primaryNetworkFriendlyName; - PrimaryNetworkId = primaryNetworkId; - PrimaryFabricFriendlyName = primaryFabricFriendlyName; - RecoveryNetworkFriendlyName = recoveryNetworkFriendlyName; - RecoveryNetworkId = recoveryNetworkId; - RecoveryFabricArmId = recoveryFabricArmId; - RecoveryFabricFriendlyName = recoveryFabricFriendlyName; - FabricSpecificSettings = fabricSpecificSettings; + this.State = state; + this.PrimaryNetworkFriendlyName = primaryNetworkFriendlyName; + this.PrimaryNetworkId = primaryNetworkId; + this.PrimaryFabricFriendlyName = primaryFabricFriendlyName; + this.RecoveryNetworkFriendlyName = recoveryNetworkFriendlyName; + this.RecoveryNetworkId = recoveryNetworkId; + this.RecoveryFabricArmId = recoveryFabricArmId; + this.RecoveryFabricFriendlyName = recoveryFabricFriendlyName; + this.FabricSpecificSettings = fabricSpecificSettings; CustomInit(); } @@ -65,59 +70,59 @@ public NetworkMappingProperties() /// partial void CustomInit(); + /// /// Gets or sets the pairing state for network mapping. /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } /// /// Gets or sets the primary network friendly name. /// - [JsonProperty(PropertyName = "primaryNetworkFriendlyName")] - public string PrimaryNetworkFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryNetworkFriendlyName")] + public string PrimaryNetworkFriendlyName {get; set; } /// /// Gets or sets the primary network id for network mapping. /// - [JsonProperty(PropertyName = "primaryNetworkId")] - public string PrimaryNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryNetworkId")] + public string PrimaryNetworkId {get; set; } /// /// Gets or sets the primary fabric friendly name. /// - [JsonProperty(PropertyName = "primaryFabricFriendlyName")] - public string PrimaryFabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricFriendlyName")] + public string PrimaryFabricFriendlyName {get; set; } /// /// Gets or sets the recovery network friendly name. /// - [JsonProperty(PropertyName = "recoveryNetworkFriendlyName")] - public string RecoveryNetworkFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNetworkFriendlyName")] + public string RecoveryNetworkFriendlyName {get; set; } /// /// Gets or sets the recovery network id for network mapping. /// - [JsonProperty(PropertyName = "recoveryNetworkId")] - public string RecoveryNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNetworkId")] + public string RecoveryNetworkId {get; set; } /// /// Gets or sets the recovery fabric ARM id. /// - [JsonProperty(PropertyName = "recoveryFabricArmId")] - public string RecoveryFabricArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricArmId")] + public string RecoveryFabricArmId {get; set; } /// /// Gets or sets the recovery fabric friendly name. /// - [JsonProperty(PropertyName = "recoveryFabricFriendlyName")] - public string RecoveryFabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricFriendlyName")] + public string RecoveryFabricFriendlyName {get; set; } /// /// Gets or sets the fabric specific settings. /// - [JsonProperty(PropertyName = "fabricSpecificSettings")] - public NetworkMappingFabricSpecificSettings FabricSpecificSettings { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricSpecificSettings")] + public NetworkMappingFabricSpecificSettings FabricSpecificSettings {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkProperties.cs index 48d27b395a4b..ffe2f7cf61d5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NetworkProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,16 +23,25 @@ public NetworkProperties() /// /// Initializes a new instance of the NetworkProperties class. /// - /// The Fabric Type. - /// The List of subnets. - /// The Friendly Name. - /// The Network Type. - public NetworkProperties(string fabricType = default(string), IList subnets = default(IList), string friendlyName = default(string), string networkType = default(string)) + + /// The Fabric Type. + /// + + /// The List of subnets. + /// + + /// The Friendly Name. + /// + + /// The Network Type. + /// + public NetworkProperties(string fabricType = default(string), System.Collections.Generic.IList subnets = default(System.Collections.Generic.IList), string friendlyName = default(string), string networkType = default(string)) + { - FabricType = fabricType; - Subnets = subnets; - FriendlyName = friendlyName; - NetworkType = networkType; + this.FabricType = fabricType; + this.Subnets = subnets; + this.FriendlyName = friendlyName; + this.NetworkType = networkType; CustomInit(); } @@ -49,29 +50,29 @@ public NetworkProperties() /// partial void CustomInit(); + /// /// Gets or sets the Fabric Type. /// - [JsonProperty(PropertyName = "fabricType")] - public string FabricType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricType")] + public string FabricType {get; set; } /// /// Gets or sets the List of subnets. /// - [JsonProperty(PropertyName = "subnets")] - public IList Subnets { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "subnets")] + public System.Collections.Generic.IList Subnets {get; set; } /// /// Gets or sets the Friendly Name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the Network Type. /// - [JsonProperty(PropertyName = "networkType")] - public string NetworkType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "networkType")] + public string NetworkType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NewProtectionProfile.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NewProtectionProfile.cs index 2d5e73be690f..394b053c52fb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NewProtectionProfile.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NewProtectionProfile.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -31,23 +24,30 @@ public NewProtectionProfile() /// /// Initializes a new instance of the NewProtectionProfile class. /// - /// The protection profile input. - /// A value indicating whether multi-VM - /// sync has to be enabled. Value should be 'Enabled' or 'Disabled'. + + /// The protection profile input. + /// + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The crash consistent snapshot frequency (in minutes). + /// + + /// The app consistent snapshot frequency (in minutes). + /// + + /// A value indicating whether multi-VM sync has to be enabled. Value should be + /// 'Enabled' or 'Disabled'. /// Possible values include: 'Enable', 'Disable' - /// The duration in minutes until - /// which the recovery points need to be stored. - /// The crash - /// consistent snapshot frequency (in minutes). - /// The app consistent - /// snapshot frequency (in minutes). - public NewProtectionProfile(string policyName, string multiVmSyncStatus, int? recoveryPointHistory = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + public NewProtectionProfile(string policyName, string multiVMSyncStatus, int? recoveryPointHistory = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + { - PolicyName = policyName; - RecoveryPointHistory = recoveryPointHistory; - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - MultiVmSyncStatus = multiVmSyncStatus; + this.PolicyName = policyName; + this.RecoveryPointHistory = recoveryPointHistory; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.MultiVMSyncStatus = multiVMSyncStatus; CustomInit(); } @@ -56,55 +56,56 @@ public NewProtectionProfile() /// partial void CustomInit(); + /// /// Gets or sets the protection profile input. /// - [JsonProperty(PropertyName = "policyName")] - public string PolicyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyName")] + public string PolicyName {get; set; } /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistory")] - public int? RecoveryPointHistory { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory {get; set; } /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the app consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// - /// Gets or sets a value indicating whether multi-VM sync has to be - /// enabled. Value should be 'Enabled' or 'Disabled'. Possible values - /// include: 'Enable', 'Disable' + /// Gets or sets a value indicating whether multi-VM sync has to be enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' /// - [JsonProperty(PropertyName = "multiVmSyncStatus")] - public string MultiVmSyncStatus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVMSyncStatus {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PolicyName == null) + if (this.PolicyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PolicyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PolicyName"); } - if (MultiVmSyncStatus == null) + if (this.MultiVMSyncStatus == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MultiVmSyncStatus"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MultiVMSyncStatus"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NewRecoveryVirtualNetwork.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NewRecoveryVirtualNetwork.cs index 02da59bfd702..4e6b0fd70dcd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NewRecoveryVirtualNetwork.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/NewRecoveryVirtualNetwork.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -31,16 +25,19 @@ public NewRecoveryVirtualNetwork() /// /// Initializes a new instance of the NewRecoveryVirtualNetwork class. /// - /// The name of - /// the resource group to be used to create the recovery virtual - /// network. If absent, target network would be created in the same - /// resource group as target VM. - /// The recovery virtual - /// network name. + + /// The name of the resource group to be used to create the recovery virtual + /// network. If absent, target network would be created in the same resource + /// group as target VM. + /// + + /// The recovery virtual network name. + /// public NewRecoveryVirtualNetwork(string recoveryVirtualNetworkResourceGroupName = default(string), string recoveryVirtualNetworkName = default(string)) + { - RecoveryVirtualNetworkResourceGroupName = recoveryVirtualNetworkResourceGroupName; - RecoveryVirtualNetworkName = recoveryVirtualNetworkName; + this.RecoveryVirtualNetworkResourceGroupName = recoveryVirtualNetworkResourceGroupName; + this.RecoveryVirtualNetworkName = recoveryVirtualNetworkName; CustomInit(); } @@ -49,19 +46,19 @@ public NewRecoveryVirtualNetwork() /// partial void CustomInit(); + /// - /// Gets or sets the name of the resource group to be used to create - /// the recovery virtual network. If absent, target network would be - /// created in the same resource group as target VM. + /// Gets or sets the name of the resource group to be used to create the + /// recovery virtual network. If absent, target network would be created in the + /// same resource group as target VM. /// - [JsonProperty(PropertyName = "recoveryVirtualNetworkResourceGroupName")] - public string RecoveryVirtualNetworkResourceGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVirtualNetworkResourceGroupName")] + public string RecoveryVirtualNetworkResourceGroupName {get; set; } /// /// Gets or sets the recovery virtual network name. /// - [JsonProperty(PropertyName = "recoveryVirtualNetworkName")] - public string RecoveryVirtualNetworkName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVirtualNetworkName")] + public string RecoveryVirtualNetworkName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSDetails.cs index 7b21fa0c7038..d22fc87035e5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,20 +23,33 @@ public OSDetails() /// /// Initializes a new instance of the OSDetails class. /// - /// VM Disk details. - /// Product type. - /// The OSEdition. - /// The OS Version. - /// The OS Major Version. - /// The OS Minor Version. - public OSDetails(string osType = default(string), string productType = default(string), string osEdition = default(string), string oSVersion = default(string), string oSMajorVersion = default(string), string oSMinorVersion = default(string)) + + /// VM Disk details. + /// + + /// Product type. + /// + + /// The OSEdition. + /// + + /// The OS Version. + /// + + /// The OS Major Version. + /// + + /// The OS Minor Version. + /// + public OSDetails(string osType = default(string), string productType = default(string), string osEdition = default(string), string osVersion = default(string), string osMajorVersion = default(string), string osMinorVersion = default(string)) + { - OsType = osType; - ProductType = productType; - OsEdition = osEdition; - OSVersion = oSVersion; - OSMajorVersion = oSMajorVersion; - OSMinorVersion = oSMinorVersion; + this.OSType = osType; + this.ProductType = productType; + this.OSEdition = osEdition; + this.OSVersion = osVersion; + this.OSMajorVersion = osMajorVersion; + this.OSMinorVersion = osMinorVersion; CustomInit(); } @@ -51,41 +58,41 @@ public OSDetails() /// partial void CustomInit(); + /// - /// Gets or sets VM Disk details. + /// Gets or sets vM Disk details. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets product type. /// - [JsonProperty(PropertyName = "productType")] - public string ProductType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "productType")] + public string ProductType {get; set; } /// /// Gets or sets the OSEdition. /// - [JsonProperty(PropertyName = "osEdition")] - public string OsEdition { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osEdition")] + public string OSEdition {get; set; } /// /// Gets or sets the OS Version. /// - [JsonProperty(PropertyName = "oSVersion")] - public string OSVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oSVersion")] + public string OSVersion {get; set; } /// /// Gets or sets the OS Major Version. /// - [JsonProperty(PropertyName = "oSMajorVersion")] - public string OSMajorVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "oSMajorVersion")] + public string OSMajorVersion {get; set; } /// /// Gets or sets the OS Minor Version. /// - [JsonProperty(PropertyName = "oSMinorVersion")] - public string OSMinorVersion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "oSMinorVersion")] + public string OSMinorVersion {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSDiskDetails.cs index 38c0689e7fc2..c32a2561b22c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,21 @@ public OSDiskDetails() /// /// Initializes a new instance of the OSDiskDetails class. /// - /// The id of the disk containing the OS. - /// The type of the OS on the VM. - /// The OS disk VHD name. + + /// The id of the disk containing the OS. + /// + + /// The type of the OS on the VM. + /// + + /// The OS disk VHD name. + /// public OSDiskDetails(string osVhdId = default(string), string osType = default(string), string vhdName = default(string)) + { - OsVhdId = osVhdId; - OsType = osType; - VhdName = vhdName; + this.OSVhdId = osVhdId; + this.OSType = osType; + this.VhdName = vhdName; CustomInit(); } @@ -45,23 +46,23 @@ public OSDiskDetails() /// partial void CustomInit(); + /// /// Gets or sets the id of the disk containing the OS. /// - [JsonProperty(PropertyName = "osVhdId")] - public string OsVhdId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osVhdId")] + public string OSVhdId {get; set; } /// /// Gets or sets the type of the OS on the VM. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the OS disk VHD name. /// - [JsonProperty(PropertyName = "vhdName")] - public string VhdName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vhdName")] + public string VhdName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSVersionWrapper.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSVersionWrapper.cs index cb4ba753ab71..0c61bb491e86 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSVersionWrapper.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OSVersionWrapper.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public OSVersionWrapper() /// /// Initializes a new instance of the OSVersionWrapper class. /// - /// The version. - /// The service pack. + + /// The version. + /// + + /// The service pack. + /// public OSVersionWrapper(string version = default(string), string servicePack = default(string)) + { - Version = version; - ServicePack = servicePack; + this.Version = version; + this.ServicePack = servicePack; CustomInit(); } @@ -43,17 +42,17 @@ public OSVersionWrapper() /// partial void CustomInit(); + /// /// Gets or sets the version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; set; } /// /// Gets or sets the service pack. /// - [JsonProperty(PropertyName = "servicePack")] - public string ServicePack { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "servicePack")] + public string ServicePack {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OperationsDiscovery.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OperationsDiscovery.cs index 0d3b3dd0b01d..b3885472a719 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OperationsDiscovery.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/OperationsDiscovery.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,39 +23,44 @@ public OperationsDiscovery() /// /// Initializes a new instance of the OperationsDiscovery class. /// - /// Name of the API. The name of the operation being - /// performed on this particular object. It should match the action - /// name that appears in RBAC / the event service. Examples of - /// operations include: * + + /// Name of the API. The name of the operation being performed on this + /// particular object. It should match the action name that appears in RBAC / + /// the event service. Examples of operations include: * /// Microsoft.Compute/virtualMachine/capture/action * /// Microsoft.Compute/virtualMachine/restart/action * /// Microsoft.Compute/virtualMachine/write * /// Microsoft.Compute/virtualMachine/read * - /// Microsoft.Compute/virtualMachine/delete Each action should include, - /// in order: (1) Resource Provider Namespace (2) Type hierarchy for - /// which the action applies (e.g. server/databases for a SQL Azure - /// database) (3) Read, Write, Action or Delete indicating which type - /// applies. If it is a PUT/PATCH on a collection or named value, Write - /// should be used. If it is a GET, Read should be used. If it is a - /// DELETE, Delete should be used. If it is a POST, Action should be - /// used. As a note: all resource providers would need to include the - /// "{Resource Provider Namespace}/register/action" operation in their - /// response. This API is used to register for their service, and - /// should include details about the operation (e.g. a localized name - /// for the resource provider + any special considerations like PII - /// release). - /// Object type. - /// Origin. The intended executor of the - /// operation; governs the display of the operation in the RBAC UX and - /// the audit logs UX. Default value is "user,system". - /// Properties. Reserved for future - /// use. + /// Microsoft.Compute/virtualMachine/delete Each action should include, in + /// order: (1) Resource Provider Namespace (2) Type hierarchy for which the + /// action applies (e.g. server/databases for a SQL Azure database) (3) Read, + /// Write, Action or Delete indicating which type applies. If it is a PUT/PATCH + /// on a collection or named value, Write should be used. If it is a GET, Read + /// should be used. If it is a DELETE, Delete should be used. If it is a POST, + /// Action should be used. As a note: all resource providers would need to + /// include the "{Resource Provider Namespace}/register/action" operation in + /// their response. This API is used to register for their service, and should + /// include details about the operation (e.g. a localized name for the resource + /// provider + any special considerations like PII release). + /// + + /// Object type. + /// + + /// Origin. The intended executor of the operation; governs the display of the + /// operation in the RBAC UX and the audit logs UX. Default value is + /// "user,system". + /// + + /// Properties. Reserved for future use. + /// public OperationsDiscovery(string name = default(string), Display display = default(Display), string origin = default(string), object properties = default(object)) + { - Name = name; - Display = display; - Origin = origin; - Properties = properties; + this.Name = name; + this.Display = display; + this.Origin = origin; + this.Properties = properties; CustomInit(); } @@ -70,51 +69,48 @@ public OperationsDiscovery() /// partial void CustomInit(); + /// - /// Gets or sets name of the API. The name of the operation being - /// performed on this particular object. It should match the action - /// name that appears in RBAC / the event service. Examples of - /// operations include: * + /// Gets or sets name of the API. The name of the operation being performed on + /// this particular object. It should match the action name that appears in + /// RBAC / the event service. Examples of operations include: * /// Microsoft.Compute/virtualMachine/capture/action * /// Microsoft.Compute/virtualMachine/restart/action * /// Microsoft.Compute/virtualMachine/write * /// Microsoft.Compute/virtualMachine/read * - /// Microsoft.Compute/virtualMachine/delete Each action should include, - /// in order: (1) Resource Provider Namespace (2) Type hierarchy for - /// which the action applies (e.g. server/databases for a SQL Azure - /// database) (3) Read, Write, Action or Delete indicating which type - /// applies. If it is a PUT/PATCH on a collection or named value, Write - /// should be used. If it is a GET, Read should be used. If it is a - /// DELETE, Delete should be used. If it is a POST, Action should be - /// used. As a note: all resource providers would need to include the - /// "{Resource Provider Namespace}/register/action" operation in their - /// response. This API is used to register for their service, and - /// should include details about the operation (e.g. a localized name - /// for the resource provider + any special considerations like PII - /// release). + /// Microsoft.Compute/virtualMachine/delete Each action should include, in + /// order: (1) Resource Provider Namespace (2) Type hierarchy for which the + /// action applies (e.g. server/databases for a SQL Azure database) (3) Read, + /// Write, Action or Delete indicating which type applies. If it is a PUT/PATCH + /// on a collection or named value, Write should be used. If it is a GET, Read + /// should be used. If it is a DELETE, Delete should be used. If it is a POST, + /// Action should be used. As a note: all resource providers would need to + /// include the "{Resource Provider Namespace}/register/action" operation in + /// their response. This API is used to register for their service, and should + /// include details about the operation (e.g. a localized name for the resource + /// provider + any special considerations like PII release). /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets object type. /// - [JsonProperty(PropertyName = "display")] - public Display Display { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "display")] + public Display Display {get; set; } /// - /// Gets or sets origin. The intended executor of the operation; - /// governs the display of the operation in the RBAC UX and the audit - /// logs UX. Default value is "user,system". + /// Gets or sets origin. The intended executor of the operation; governs the + /// display of the operation in the RBAC UX and the audit logs UX. Default + /// value is "user,system". /// - [JsonProperty(PropertyName = "origin")] - public string Origin { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "origin")] + public string Origin {get; set; } /// /// Gets or sets properties. Reserved for future use. /// - [JsonProperty(PropertyName = "properties")] - public object Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public object Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Page.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Page.cs index f9dfe190a61c..7dfa9bcb8565 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Page.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Page.cs @@ -1,53 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; /// /// Defines a page in Azure responses. /// /// Type of the page content items - [JsonObject] - public class Page : IPage + [Newtonsoft.Json.JsonObject] + public class Page : Microsoft.Rest.Azure.IPage { - /// - /// Gets the link to the next page. - /// - [JsonProperty("nextLink")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("nextLink")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PauseReplicationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PauseReplicationInput.cs index eb0256cb5088..3e082182abec 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PauseReplicationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PauseReplicationInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public PauseReplicationInput() /// /// Initializes a new instance of the PauseReplicationInput class. /// - /// Pause replication input - /// properties. + + /// Pause replication input properties. + /// public PauseReplicationInput(PauseReplicationInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,28 +38,28 @@ public PauseReplicationInput(PauseReplicationInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets pause replication input properties. /// - [JsonProperty(PropertyName = "properties")] - public PauseReplicationInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public PauseReplicationInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PauseReplicationInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PauseReplicationInputProperties.cs index ff72451fe3b4..fcbf426d8c45 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PauseReplicationInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PauseReplicationInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class PauseReplicationInputProperties { /// - /// Initializes a new instance of the PauseReplicationInputProperties - /// class. + /// Initializes a new instance of the PauseReplicationInputProperties class. /// public PauseReplicationInputProperties() { @@ -29,13 +21,15 @@ public PauseReplicationInputProperties() } /// - /// Initializes a new instance of the PauseReplicationInputProperties - /// class. + /// Initializes a new instance of the PauseReplicationInputProperties class. /// - /// The class type. + + /// The class type. + /// public PauseReplicationInputProperties(string instanceType) + { - InstanceType = instanceType; + this.InstanceType = instanceType; CustomInit(); } @@ -44,24 +38,25 @@ public PauseReplicationInputProperties(string instanceType) /// partial void CustomInit(); + /// /// Gets or sets the class type. /// - [JsonProperty(PropertyName = "instanceType")] - public string InstanceType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "instanceType")] + public string InstanceType {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (InstanceType == null) + if (this.InstanceType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "InstanceType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "InstanceType"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverInput.cs index a53ea0c28374..df319ee97bb7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public PlannedFailoverInput() /// /// Initializes a new instance of the PlannedFailoverInput class. /// - /// Planned failover input properties. + + /// Planned failover input properties. + /// public PlannedFailoverInput(PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public PlannedFailoverInput() /// partial void CustomInit(); + /// /// Gets or sets planned failover input properties. /// - [JsonProperty(PropertyName = "properties")] - public PlannedFailoverInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public PlannedFailoverInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverInputProperties.cs index 4bf0b3f79957..03cba7d5d7f0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class PlannedFailoverInputProperties { /// - /// Initializes a new instance of the PlannedFailoverInputProperties - /// class. + /// Initializes a new instance of the PlannedFailoverInputProperties class. /// public PlannedFailoverInputProperties() { @@ -28,16 +21,19 @@ public PlannedFailoverInputProperties() } /// - /// Initializes a new instance of the PlannedFailoverInputProperties - /// class. + /// Initializes a new instance of the PlannedFailoverInputProperties class. /// - /// Failover direction. - /// Provider specific - /// settings. + + /// Failover direction. + /// + + /// Provider specific settings. + /// public PlannedFailoverInputProperties(string failoverDirection = default(string), PlannedFailoverProviderSpecificFailoverInput providerSpecificDetails = default(PlannedFailoverProviderSpecificFailoverInput)) + { - FailoverDirection = failoverDirection; - ProviderSpecificDetails = providerSpecificDetails; + this.FailoverDirection = failoverDirection; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -46,17 +42,17 @@ public PlannedFailoverInputProperties() /// partial void CustomInit(); + /// /// Gets or sets failover direction. /// - [JsonProperty(PropertyName = "failoverDirection")] - public string FailoverDirection { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection {get; set; } /// /// Gets or sets provider specific settings. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public PlannedFailoverProviderSpecificFailoverInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public PlannedFailoverProviderSpecificFailoverInput ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverProviderSpecificFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverProviderSpecificFailoverInput.cs index a986b5ce5cf1..cf03892ebc95 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverProviderSpecificFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverProviderSpecificFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class PlannedFailoverProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// PlannedFailoverProviderSpecificFailoverInput class. + /// Initializes a new instance of the PlannedFailoverProviderSpecificFailoverInput class. /// public PlannedFailoverProviderSpecificFailoverInput() { @@ -35,4 +28,4 @@ public PlannedFailoverProviderSpecificFailoverInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverStatus.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverStatus.cs index ae42afc1aa89..2f8d25cf2a1a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverStatus.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PlannedFailoverStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for PlannedFailoverStatus. /// + + public static class PlannedFailoverStatus { public const string Succeeded = "Succeeded"; @@ -21,4 +18,4 @@ public static class PlannedFailoverStatus public const string Cancelled = "Cancelled"; public const string Unknown = "Unknown"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Policy.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Policy.cs index c7ebd92fe607..40f9193ea4ee 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Policy.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Policy.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public Policy() /// /// Initializes a new instance of the Policy class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The custom data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The custom data. + /// public Policy(string id = default(string), string name = default(string), string type = default(string), string location = default(string), PolicyProperties properties = default(PolicyProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public Policy() /// partial void CustomInit(); + /// /// Gets or sets the custom data. /// - [JsonProperty(PropertyName = "properties")] - public PolicyProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public PolicyProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProperties.cs index 3bc101065ac3..4644fbb0791e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public PolicyProperties() /// /// Initializes a new instance of the PolicyProperties class. /// - /// The FriendlyName. - /// The - /// ReplicationChannelSetting. + + /// The FriendlyName. + /// + + /// The ReplicationChannelSetting. + /// public PolicyProperties(string friendlyName = default(string), PolicyProviderSpecificDetails providerSpecificDetails = default(PolicyProviderSpecificDetails)) + { - FriendlyName = friendlyName; - ProviderSpecificDetails = providerSpecificDetails; + this.FriendlyName = friendlyName; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -44,17 +42,17 @@ public PolicyProperties() /// partial void CustomInit(); + /// /// Gets or sets the FriendlyName. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the ReplicationChannelSetting. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public PolicyProviderSpecificDetails ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public PolicyProviderSpecificDetails ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProviderSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProviderSpecificDetails.cs index 8bddcff89bf0..1a7743d94c85 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProviderSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProviderSpecificDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class PolicyProviderSpecificDetails { /// - /// Initializes a new instance of the PolicyProviderSpecificDetails - /// class. + /// Initializes a new instance of the PolicyProviderSpecificDetails class. /// public PolicyProviderSpecificDetails() { @@ -35,4 +28,4 @@ public PolicyProviderSpecificDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProviderSpecificInput.cs index 5295935c0f31..0a27ea92155f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PolicyProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class PolicyProviderSpecificInput { /// - /// Initializes a new instance of the PolicyProviderSpecificInput - /// class. + /// Initializes a new instance of the PolicyProviderSpecificInput class. /// public PolicyProviderSpecificInput() { @@ -35,4 +28,4 @@ public PolicyProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PossibleOperationsDirections.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PossibleOperationsDirections.cs index 643ed418a72c..b6e30909d039 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PossibleOperationsDirections.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PossibleOperationsDirections.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for PossibleOperationsDirections. /// + + public static class PossibleOperationsDirections { public const string PrimaryToRecovery = "PrimaryToRecovery"; public const string RecoveryToPrimary = "RecoveryToPrimary"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PresenceStatus.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PresenceStatus.cs index 9acd2e6eede2..09885beed6ad 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PresenceStatus.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PresenceStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for PresenceStatus. /// + + public static class PresenceStatus { public const string Unknown = "Unknown"; public const string Present = "Present"; public const string NotPresent = "NotPresent"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProcessServer.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProcessServer.cs index 88bc38dad8ad..5c962c098423 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProcessServer.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProcessServer.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,96 +23,154 @@ public ProcessServer() /// /// Initializes a new instance of the ProcessServer class. /// - /// The Process Server's friendly - /// name. - /// The Process Server Id. - /// The IP address of the server. - /// The OS type of the server. - /// The version of the scout component on - /// the server. - /// The last heartbeat received from the - /// server. - /// Version status. - /// The list of the mobility - /// service updates available on the Process Server. - /// The agent generated Id. - /// The servers configured with this - /// PS. - /// The number of replication pairs - /// configured in this PS. - /// The percentage of the system load. - /// The system load status. - /// The percentage of the CPU load. - /// The CPU load status. - /// The total memory. - /// The available memory. - /// The memory usage status. - /// The total space. - /// The available space. - /// The space usage status. - /// The PS service status. - /// The PS SSL cert expiry - /// date. - /// CS SSL cert expiry - /// date. - /// OS Version of the process server. Note: - /// This will get populated if user has CS version greater than - /// 9.12.0.0. - /// Health errors. - /// Agent expiry date. - /// The agent version - /// details. - /// The health of Process Server. Possible values - /// include: 'None', 'Normal', 'Warning', 'Critical' - /// The process server stats refresh - /// time. - /// The uploading - /// pending data in bytes. - /// The throughput in MBps. - /// The throughput in bytes. - /// The throughput status. - /// The MARS communication - /// status. - /// The MARS registration - /// status. - public ProcessServer(string friendlyName = default(string), string id = default(string), string ipAddress = default(string), string osType = default(string), string agentVersion = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), IList mobilityServiceUpdates = default(IList), string hostId = default(string), string machineCount = default(string), string replicationPairCount = default(string), string systemLoad = default(string), string systemLoadStatus = default(string), string cpuLoad = default(string), string cpuLoadStatus = default(string), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), string memoryUsageStatus = default(string), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), string spaceUsageStatus = default(string), string psServiceStatus = default(string), System.DateTime? sslCertExpiryDate = default(System.DateTime?), int? sslCertExpiryRemainingDays = default(int?), string osVersion = default(string), IList healthErrors = default(IList), System.DateTime? agentExpiryDate = default(System.DateTime?), VersionDetails agentVersionDetails = default(VersionDetails), string health = default(string), System.DateTime? psStatsRefreshTime = default(System.DateTime?), long? throughputUploadPendingDataInBytes = default(long?), long? throughputInMBps = default(long?), long? throughputInBytes = default(long?), string throughputStatus = default(string), string marsCommunicationStatus = default(string), string marsRegistrationStatus = default(string)) + + /// The Process Server's friendly name. + /// + + /// The Process Server Id. + /// + + /// The IP address of the server. + /// + + /// The OS type of the server. + /// + + /// The version of the scout component on the server. + /// + + /// The last heartbeat received from the server. + /// + + /// Version status. + /// + + /// The list of the mobility service updates available on the Process Server. + /// + + /// The agent generated Id. + /// + + /// The servers configured with this PS. + /// + + /// The number of replication pairs configured in this PS. + /// + + /// The percentage of the system load. + /// + + /// The system load status. + /// + + /// The percentage of the CPU load. + /// + + /// The CPU load status. + /// + + /// The total memory. + /// + + /// The available memory. + /// + + /// The memory usage status. + /// + + /// The total space. + /// + + /// The available space. + /// + + /// The space usage status. + /// + + /// The PS service status. + /// + + /// The PS SSL cert expiry date. + /// + + /// CS SSL cert expiry date. + /// + + /// OS Version of the process server. Note: This will get populated if user has + /// CS version greater than 9.12.0.0. + /// + + /// Health errors. + /// + + /// Agent expiry date. + /// + + /// The agent version details. + /// + + /// The health of Process Server. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + + /// The process server stats refresh time. + /// + + /// The uploading pending data in bytes. + /// + + /// The throughput in MBps. + /// + + /// The throughput in bytes. + /// + + /// The throughput status. + /// + + /// The MARS communication status. + /// + + /// The MARS registration status. + /// + public ProcessServer(string friendlyName = default(string), string id = default(string), string ipAddress = default(string), string osType = default(string), string agentVersion = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), System.Collections.Generic.IList mobilityServiceUpdates = default(System.Collections.Generic.IList), string hostId = default(string), string machineCount = default(string), string replicationPairCount = default(string), string systemLoad = default(string), string systemLoadStatus = default(string), string cpuLoad = default(string), string cpuLoadStatus = default(string), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), string memoryUsageStatus = default(string), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), string spaceUsageStatus = default(string), string psServiceStatus = default(string), System.DateTime? sslCertExpiryDate = default(System.DateTime?), int? sslCertExpiryRemainingDays = default(int?), string osVersion = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList), System.DateTime? agentExpiryDate = default(System.DateTime?), VersionDetails agentVersionDetails = default(VersionDetails), string health = default(string), System.DateTime? psStatsRefreshTime = default(System.DateTime?), long? throughputUploadPendingDataInBytes = default(long?), long? throughputInMBps = default(long?), long? throughputInBytes = default(long?), string throughputStatus = default(string), string marsCommunicationStatus = default(string), string marsRegistrationStatus = default(string)) + { - FriendlyName = friendlyName; - Id = id; - IpAddress = ipAddress; - OsType = osType; - AgentVersion = agentVersion; - LastHeartbeat = lastHeartbeat; - VersionStatus = versionStatus; - MobilityServiceUpdates = mobilityServiceUpdates; - HostId = hostId; - MachineCount = machineCount; - ReplicationPairCount = replicationPairCount; - SystemLoad = systemLoad; - SystemLoadStatus = systemLoadStatus; - CpuLoad = cpuLoad; - CpuLoadStatus = cpuLoadStatus; - TotalMemoryInBytes = totalMemoryInBytes; - AvailableMemoryInBytes = availableMemoryInBytes; - MemoryUsageStatus = memoryUsageStatus; - TotalSpaceInBytes = totalSpaceInBytes; - AvailableSpaceInBytes = availableSpaceInBytes; - SpaceUsageStatus = spaceUsageStatus; - PsServiceStatus = psServiceStatus; - SslCertExpiryDate = sslCertExpiryDate; - SslCertExpiryRemainingDays = sslCertExpiryRemainingDays; - OsVersion = osVersion; - HealthErrors = healthErrors; - AgentExpiryDate = agentExpiryDate; - AgentVersionDetails = agentVersionDetails; - Health = health; - PsStatsRefreshTime = psStatsRefreshTime; - ThroughputUploadPendingDataInBytes = throughputUploadPendingDataInBytes; - ThroughputInMBps = throughputInMBps; - ThroughputInBytes = throughputInBytes; - ThroughputStatus = throughputStatus; - MarsCommunicationStatus = marsCommunicationStatus; - MarsRegistrationStatus = marsRegistrationStatus; + this.FriendlyName = friendlyName; + this.Id = id; + this.IPAddress = ipAddress; + this.OSType = osType; + this.AgentVersion = agentVersion; + this.LastHeartbeat = lastHeartbeat; + this.VersionStatus = versionStatus; + this.MobilityServiceUpdates = mobilityServiceUpdates; + this.HostId = hostId; + this.MachineCount = machineCount; + this.ReplicationPairCount = replicationPairCount; + this.SystemLoad = systemLoad; + this.SystemLoadStatus = systemLoadStatus; + this.CpuLoad = cpuLoad; + this.CpuLoadStatus = cpuLoadStatus; + this.TotalMemoryInBytes = totalMemoryInBytes; + this.AvailableMemoryInBytes = availableMemoryInBytes; + this.MemoryUsageStatus = memoryUsageStatus; + this.TotalSpaceInBytes = totalSpaceInBytes; + this.AvailableSpaceInBytes = availableSpaceInBytes; + this.SpaceUsageStatus = spaceUsageStatus; + this.PsServiceStatus = psServiceStatus; + this.SslCertExpiryDate = sslCertExpiryDate; + this.SslCertExpiryRemainingDays = sslCertExpiryRemainingDays; + this.OSVersion = osVersion; + this.HealthErrors = healthErrors; + this.AgentExpiryDate = agentExpiryDate; + this.AgentVersionDetails = agentVersionDetails; + this.Health = health; + this.PsStatsRefreshTime = psStatsRefreshTime; + this.ThroughputUploadPendingDataInBytes = throughputUploadPendingDataInBytes; + this.ThroughputInMBps = throughputInMBps; + this.ThroughputInBytes = throughputInBytes; + this.ThroughputStatus = throughputStatus; + this.MarsCommunicationStatus = marsCommunicationStatus; + this.MarsRegistrationStatus = marsRegistrationStatus; CustomInit(); } @@ -129,224 +179,223 @@ public ProcessServer() /// partial void CustomInit(); + /// - /// Gets or sets the Process Server's friendly name. + /// Gets or sets the Process Server's friendly name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the Process Server Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the IP address of the server. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the OS type of the server. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the version of the scout component on the server. /// - [JsonProperty(PropertyName = "agentVersion")] - public string AgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion {get; set; } /// /// Gets or sets the last heartbeat received from the server. /// - [JsonProperty(PropertyName = "lastHeartbeat")] - public System.DateTime? LastHeartbeat { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat {get; set; } /// /// Gets or sets version status. /// - [JsonProperty(PropertyName = "versionStatus")] - public string VersionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "versionStatus")] + public string VersionStatus {get; set; } /// - /// Gets or sets the list of the mobility service updates available on - /// the Process Server. + /// Gets or sets the list of the mobility service updates available on the + /// Process Server. /// - [JsonProperty(PropertyName = "mobilityServiceUpdates")] - public IList MobilityServiceUpdates { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mobilityServiceUpdates")] + public System.Collections.Generic.IList MobilityServiceUpdates {get; set; } /// /// Gets or sets the agent generated Id. /// - [JsonProperty(PropertyName = "hostId")] - public string HostId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hostId")] + public string HostId {get; set; } /// /// Gets or sets the servers configured with this PS. /// - [JsonProperty(PropertyName = "machineCount")] - public string MachineCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "machineCount")] + public string MachineCount {get; set; } /// /// Gets or sets the number of replication pairs configured in this PS. /// - [JsonProperty(PropertyName = "replicationPairCount")] - public string ReplicationPairCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationPairCount")] + public string ReplicationPairCount {get; set; } /// /// Gets or sets the percentage of the system load. /// - [JsonProperty(PropertyName = "systemLoad")] - public string SystemLoad { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "systemLoad")] + public string SystemLoad {get; set; } /// /// Gets or sets the system load status. /// - [JsonProperty(PropertyName = "systemLoadStatus")] - public string SystemLoadStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "systemLoadStatus")] + public string SystemLoadStatus {get; set; } /// /// Gets or sets the percentage of the CPU load. /// - [JsonProperty(PropertyName = "cpuLoad")] - public string CpuLoad { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cpuLoad")] + public string CpuLoad {get; set; } /// /// Gets or sets the CPU load status. /// - [JsonProperty(PropertyName = "cpuLoadStatus")] - public string CpuLoadStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cpuLoadStatus")] + public string CpuLoadStatus {get; set; } /// /// Gets or sets the total memory. /// - [JsonProperty(PropertyName = "totalMemoryInBytes")] - public long? TotalMemoryInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "totalMemoryInBytes")] + public long? TotalMemoryInBytes {get; set; } /// /// Gets or sets the available memory. /// - [JsonProperty(PropertyName = "availableMemoryInBytes")] - public long? AvailableMemoryInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "availableMemoryInBytes")] + public long? AvailableMemoryInBytes {get; set; } /// /// Gets or sets the memory usage status. /// - [JsonProperty(PropertyName = "memoryUsageStatus")] - public string MemoryUsageStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "memoryUsageStatus")] + public string MemoryUsageStatus {get; set; } /// /// Gets or sets the total space. /// - [JsonProperty(PropertyName = "totalSpaceInBytes")] - public long? TotalSpaceInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "totalSpaceInBytes")] + public long? TotalSpaceInBytes {get; set; } /// /// Gets or sets the available space. /// - [JsonProperty(PropertyName = "availableSpaceInBytes")] - public long? AvailableSpaceInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "availableSpaceInBytes")] + public long? AvailableSpaceInBytes {get; set; } /// /// Gets or sets the space usage status. /// - [JsonProperty(PropertyName = "spaceUsageStatus")] - public string SpaceUsageStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "spaceUsageStatus")] + public string SpaceUsageStatus {get; set; } /// /// Gets or sets the PS service status. /// - [JsonProperty(PropertyName = "psServiceStatus")] - public string PsServiceStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "psServiceStatus")] + public string PsServiceStatus {get; set; } /// /// Gets or sets the PS SSL cert expiry date. /// - [JsonProperty(PropertyName = "sslCertExpiryDate")] - public System.DateTime? SslCertExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sslCertExpiryDate")] + public System.DateTime? SslCertExpiryDate {get; set; } /// - /// Gets or sets CS SSL cert expiry date. + /// Gets or sets cS SSL cert expiry date. /// - [JsonProperty(PropertyName = "sslCertExpiryRemainingDays")] - public int? SslCertExpiryRemainingDays { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sslCertExpiryRemainingDays")] + public int? SslCertExpiryRemainingDays {get; set; } /// - /// Gets or sets OS Version of the process server. Note: This will get + /// Gets or sets oS Version of the process server. Note: This will get /// populated if user has CS version greater than 9.12.0.0. /// - [JsonProperty(PropertyName = "osVersion")] - public string OsVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osVersion")] + public string OSVersion {get; set; } /// /// Gets or sets health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; set; } /// /// Gets or sets agent expiry date. /// - [JsonProperty(PropertyName = "agentExpiryDate")] - public System.DateTime? AgentExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentExpiryDate")] + public System.DateTime? AgentExpiryDate {get; set; } /// /// Gets or sets the agent version details. /// - [JsonProperty(PropertyName = "agentVersionDetails")] - public VersionDetails AgentVersionDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersionDetails")] + public VersionDetails AgentVersionDetails {get; set; } /// - /// Gets the health of Process Server. Possible values include: 'None', - /// 'Normal', 'Warning', 'Critical' + /// Gets the health of Process Server. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "health")] - public string Health { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; private set; } /// /// Gets the process server stats refresh time. /// - [JsonProperty(PropertyName = "psStatsRefreshTime")] - public System.DateTime? PsStatsRefreshTime { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "psStatsRefreshTime")] + public System.DateTime? PsStatsRefreshTime {get; private set; } /// /// Gets the uploading pending data in bytes. /// - [JsonProperty(PropertyName = "throughputUploadPendingDataInBytes")] - public long? ThroughputUploadPendingDataInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "throughputUploadPendingDataInBytes")] + public long? ThroughputUploadPendingDataInBytes {get; private set; } /// /// Gets the throughput in MBps. /// - [JsonProperty(PropertyName = "throughputInMBps")] - public long? ThroughputInMBps { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "throughputInMBps")] + public long? ThroughputInMBps {get; private set; } /// /// Gets the throughput in bytes. /// - [JsonProperty(PropertyName = "throughputInBytes")] - public long? ThroughputInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "throughputInBytes")] + public long? ThroughputInBytes {get; private set; } /// /// Gets the throughput status. /// - [JsonProperty(PropertyName = "throughputStatus")] - public string ThroughputStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "throughputStatus")] + public string ThroughputStatus {get; private set; } /// /// Gets the MARS communication status. /// - [JsonProperty(PropertyName = "marsCommunicationStatus")] - public string MarsCommunicationStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "marsCommunicationStatus")] + public string MarsCommunicationStatus {get; private set; } /// /// Gets the MARS registration status. /// - [JsonProperty(PropertyName = "marsRegistrationStatus")] - public string MarsRegistrationStatus { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "marsRegistrationStatus")] + public string MarsRegistrationStatus {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProcessServerDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProcessServerDetails.cs index c34358095b79..bccb7b7462d8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProcessServerDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProcessServerDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,82 +23,126 @@ public ProcessServerDetails() /// /// Initializes a new instance of the ProcessServerDetails class. /// - /// The process server Id. - /// The process server name. - /// The process server Bios Id. - /// The fabric object Id. - /// The process server Fqdn. - /// The list of IP addresses for - /// communicating with the RCM component. - /// The version. - /// The last heartbeat received from the - /// process server. - /// The total memory. - /// The available memory. - /// The used memory. - /// The memory usage - /// percentage. - /// The total disk space. - /// The available disk - /// space. - /// The used disk space. - /// The free disk space - /// percentage. - /// The uploading - /// pending data in bytes. - /// The throughput in bytes. - /// The processor usage - /// percentage. - /// The throughput status. Possible - /// values include: 'Healthy', 'Warning', 'Critical', 'Unknown' - /// The system load. - /// The system load status. Possible - /// values include: 'Healthy', 'Warning', 'Critical', 'Unknown' - /// The disk usage status. Possible - /// values include: 'Healthy', 'Warning', 'Critical', 'Unknown' - /// The memory usage status. Possible - /// values include: 'Healthy', 'Warning', 'Critical', 'Unknown' + + /// The process server Id. + /// + + /// The process server name. + /// + + /// The process server Bios Id. + /// + + /// The fabric object Id. + /// + + /// The process server Fqdn. + /// + + /// The list of IP addresses for communicating with the RCM component. + /// + + /// The version. + /// + + /// The last heartbeat received from the process server. + /// + + /// The total memory. + /// + + /// The available memory. + /// + + /// The used memory. + /// + + /// The memory usage percentage. + /// + + /// The total disk space. + /// + + /// The available disk space. + /// + + /// The used disk space. + /// + + /// The free disk space percentage. + /// + + /// The uploading pending data in bytes. + /// + + /// The throughput in bytes. + /// + + /// The processor usage percentage. + /// + + /// The throughput status. + /// Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' + + /// The system load. + /// + + /// The system load status. + /// Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' + + /// The disk usage status. + /// Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' + + /// The memory usage status. + /// Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' + /// The processor usage status. - /// Possible values include: 'Healthy', 'Warning', 'Critical', - /// 'Unknown' - /// The health of the process server. Possible - /// values include: 'None', 'Normal', 'Warning', 'Critical' - /// The health errors. - /// The protected item count. - /// The historic health of the process - /// server based on the health in last 24 hours. Possible values - /// include: 'None', 'Normal', 'Warning', 'Critical' - public ProcessServerDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), IList ipAddresses = default(IList), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), long? usedMemoryInBytes = default(long?), double? memoryUsagePercentage = default(double?), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), long? usedSpaceInBytes = default(long?), double? freeSpacePercentage = default(double?), long? throughputUploadPendingDataInBytes = default(long?), long? throughputInBytes = default(long?), double? processorUsagePercentage = default(double?), string throughputStatus = default(string), long? systemLoad = default(long?), string systemLoadStatus = default(string), string diskUsageStatus = default(string), string memoryUsageStatus = default(string), string processorUsageStatus = default(string), string health = default(string), IList healthErrors = default(IList), int? protectedItemCount = default(int?), string historicHealth = default(string)) + /// Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' + + /// The health of the process server. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + + /// The health errors. + /// + + /// The protected item count. + /// + + /// The historic health of the process server based on the health in last 24 + /// hours. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + public ProcessServerDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), System.Collections.Generic.IList ipAddresses = default(System.Collections.Generic.IList), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), long? usedMemoryInBytes = default(long?), double? memoryUsagePercentage = default(double?), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), long? usedSpaceInBytes = default(long?), double? freeSpacePercentage = default(double?), long? throughputUploadPendingDataInBytes = default(long?), long? throughputInBytes = default(long?), double? processorUsagePercentage = default(double?), string throughputStatus = default(string), long? systemLoad = default(long?), string systemLoadStatus = default(string), string diskUsageStatus = default(string), string memoryUsageStatus = default(string), string processorUsageStatus = default(string), string health = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList), int? protectedItemCount = default(int?), string historicHealth = default(string)) + { - Id = id; - Name = name; - BiosId = biosId; - FabricObjectId = fabricObjectId; - Fqdn = fqdn; - IpAddresses = ipAddresses; - Version = version; - LastHeartbeatUtc = lastHeartbeatUtc; - TotalMemoryInBytes = totalMemoryInBytes; - AvailableMemoryInBytes = availableMemoryInBytes; - UsedMemoryInBytes = usedMemoryInBytes; - MemoryUsagePercentage = memoryUsagePercentage; - TotalSpaceInBytes = totalSpaceInBytes; - AvailableSpaceInBytes = availableSpaceInBytes; - UsedSpaceInBytes = usedSpaceInBytes; - FreeSpacePercentage = freeSpacePercentage; - ThroughputUploadPendingDataInBytes = throughputUploadPendingDataInBytes; - ThroughputInBytes = throughputInBytes; - ProcessorUsagePercentage = processorUsagePercentage; - ThroughputStatus = throughputStatus; - SystemLoad = systemLoad; - SystemLoadStatus = systemLoadStatus; - DiskUsageStatus = diskUsageStatus; - MemoryUsageStatus = memoryUsageStatus; - ProcessorUsageStatus = processorUsageStatus; - Health = health; - HealthErrors = healthErrors; - ProtectedItemCount = protectedItemCount; - HistoricHealth = historicHealth; + this.Id = id; + this.Name = name; + this.BiosId = biosId; + this.FabricObjectId = fabricObjectId; + this.Fqdn = fqdn; + this.IPAddresses = ipAddresses; + this.Version = version; + this.LastHeartbeatUtc = lastHeartbeatUtc; + this.TotalMemoryInBytes = totalMemoryInBytes; + this.AvailableMemoryInBytes = availableMemoryInBytes; + this.UsedMemoryInBytes = usedMemoryInBytes; + this.MemoryUsagePercentage = memoryUsagePercentage; + this.TotalSpaceInBytes = totalSpaceInBytes; + this.AvailableSpaceInBytes = availableSpaceInBytes; + this.UsedSpaceInBytes = usedSpaceInBytes; + this.FreeSpacePercentage = freeSpacePercentage; + this.ThroughputUploadPendingDataInBytes = throughputUploadPendingDataInBytes; + this.ThroughputInBytes = throughputInBytes; + this.ProcessorUsagePercentage = processorUsagePercentage; + this.ThroughputStatus = throughputStatus; + this.SystemLoad = systemLoad; + this.SystemLoadStatus = systemLoadStatus; + this.DiskUsageStatus = diskUsageStatus; + this.MemoryUsageStatus = memoryUsageStatus; + this.ProcessorUsageStatus = processorUsageStatus; + this.Health = health; + this.HealthErrors = healthErrors; + this.ProtectedItemCount = protectedItemCount; + this.HistoricHealth = historicHealth; CustomInit(); } @@ -115,188 +151,180 @@ public ProcessServerDetails() /// partial void CustomInit(); + /// /// Gets the process server Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the process server name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the process server Bios Id. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; private set; } /// /// Gets the fabric object Id. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; private set; } /// /// Gets the process server Fqdn. /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdn")] + public string Fqdn {get; private set; } /// - /// Gets the list of IP addresses for communicating with the RCM - /// component. + /// Gets the list of IP addresses for communicating with the RCM component. /// - [JsonProperty(PropertyName = "ipAddresses")] - public IList IpAddresses { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddresses")] + public System.Collections.Generic.IList IPAddresses {get; private set; } /// /// Gets the version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } /// /// Gets the last heartbeat received from the process server. /// - [JsonProperty(PropertyName = "lastHeartbeatUtc")] - public System.DateTime? LastHeartbeatUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeatUtc")] + public System.DateTime? LastHeartbeatUtc {get; private set; } /// /// Gets the total memory. /// - [JsonProperty(PropertyName = "totalMemoryInBytes")] - public long? TotalMemoryInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "totalMemoryInBytes")] + public long? TotalMemoryInBytes {get; private set; } /// /// Gets the available memory. /// - [JsonProperty(PropertyName = "availableMemoryInBytes")] - public long? AvailableMemoryInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "availableMemoryInBytes")] + public long? AvailableMemoryInBytes {get; private set; } /// /// Gets the used memory. /// - [JsonProperty(PropertyName = "usedMemoryInBytes")] - public long? UsedMemoryInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "usedMemoryInBytes")] + public long? UsedMemoryInBytes {get; private set; } /// /// Gets the memory usage percentage. /// - [JsonProperty(PropertyName = "memoryUsagePercentage")] - public double? MemoryUsagePercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "memoryUsagePercentage")] + public double? MemoryUsagePercentage {get; private set; } /// /// Gets the total disk space. /// - [JsonProperty(PropertyName = "totalSpaceInBytes")] - public long? TotalSpaceInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "totalSpaceInBytes")] + public long? TotalSpaceInBytes {get; private set; } /// /// Gets the available disk space. /// - [JsonProperty(PropertyName = "availableSpaceInBytes")] - public long? AvailableSpaceInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "availableSpaceInBytes")] + public long? AvailableSpaceInBytes {get; private set; } /// /// Gets the used disk space. /// - [JsonProperty(PropertyName = "usedSpaceInBytes")] - public long? UsedSpaceInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "usedSpaceInBytes")] + public long? UsedSpaceInBytes {get; private set; } /// /// Gets the free disk space percentage. /// - [JsonProperty(PropertyName = "freeSpacePercentage")] - public double? FreeSpacePercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "freeSpacePercentage")] + public double? FreeSpacePercentage {get; private set; } /// /// Gets the uploading pending data in bytes. /// - [JsonProperty(PropertyName = "throughputUploadPendingDataInBytes")] - public long? ThroughputUploadPendingDataInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "throughputUploadPendingDataInBytes")] + public long? ThroughputUploadPendingDataInBytes {get; private set; } /// /// Gets the throughput in bytes. /// - [JsonProperty(PropertyName = "throughputInBytes")] - public long? ThroughputInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "throughputInBytes")] + public long? ThroughputInBytes {get; private set; } /// /// Gets the processor usage percentage. /// - [JsonProperty(PropertyName = "processorUsagePercentage")] - public double? ProcessorUsagePercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processorUsagePercentage")] + public double? ProcessorUsagePercentage {get; private set; } /// - /// Gets the throughput status. Possible values include: 'Healthy', - /// 'Warning', 'Critical', 'Unknown' + /// Gets the throughput status. Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' /// - [JsonProperty(PropertyName = "throughputStatus")] - public string ThroughputStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "throughputStatus")] + public string ThroughputStatus {get; private set; } /// /// Gets the system load. /// - [JsonProperty(PropertyName = "systemLoad")] - public long? SystemLoad { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "systemLoad")] + public long? SystemLoad {get; private set; } /// - /// Gets the system load status. Possible values include: 'Healthy', - /// 'Warning', 'Critical', 'Unknown' + /// Gets the system load status. Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' /// - [JsonProperty(PropertyName = "systemLoadStatus")] - public string SystemLoadStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "systemLoadStatus")] + public string SystemLoadStatus {get; private set; } /// - /// Gets the disk usage status. Possible values include: 'Healthy', - /// 'Warning', 'Critical', 'Unknown' + /// Gets the disk usage status. Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' /// - [JsonProperty(PropertyName = "diskUsageStatus")] - public string DiskUsageStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskUsageStatus")] + public string DiskUsageStatus {get; private set; } /// - /// Gets the memory usage status. Possible values include: 'Healthy', - /// 'Warning', 'Critical', 'Unknown' + /// Gets the memory usage status. Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' /// - [JsonProperty(PropertyName = "memoryUsageStatus")] - public string MemoryUsageStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "memoryUsageStatus")] + public string MemoryUsageStatus {get; private set; } /// - /// Gets the processor usage status. Possible values include: - /// 'Healthy', 'Warning', 'Critical', 'Unknown' + /// Gets the processor usage status. Possible values include: 'Healthy', 'Warning', 'Critical', 'Unknown' /// - [JsonProperty(PropertyName = "processorUsageStatus")] - public string ProcessorUsageStatus { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processorUsageStatus")] + public string ProcessorUsageStatus {get; private set; } /// - /// Gets the health of the process server. Possible values include: - /// 'None', 'Normal', 'Warning', 'Critical' + /// Gets the health of the process server. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "health")] - public string Health { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; private set; } /// /// Gets the health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; private set; } /// /// Gets the protected item count. /// - [JsonProperty(PropertyName = "protectedItemCount")] - public int? ProtectedItemCount { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemCount")] + public int? ProtectedItemCount {get; private set; } /// - /// Gets the historic health of the process server based on the health - /// in last 24 hours. Possible values include: 'None', 'Normal', - /// 'Warning', 'Critical' + /// Gets the historic health of the process server based on the health in last + /// 24 hours. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "historicHealth")] - public string HistoricHealth { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "historicHealth")] + public string HistoricHealth {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItem.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItem.cs index e140f5b84365..7a3161facfc5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public ProtectableItem() /// /// Initializes a new instance of the ProtectableItem class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The custom data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The custom data. + /// public ProtectableItem(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ProtectableItemProperties properties = default(ProtectableItemProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public ProtectableItem() /// partial void CustomInit(); + /// /// Gets or sets the custom data. /// - [JsonProperty(PropertyName = "properties")] - public ProtectableItemProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ProtectableItemProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItemProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItemProperties.cs index 1fafd0b68f03..5f0ad1d5922f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItemProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItemProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,27 +23,37 @@ public ProtectableItemProperties() /// /// Initializes a new instance of the ProtectableItemProperties class. /// - /// The name. - /// The protection status. - /// The ARM resource of - /// protected items. - /// The recovery provider ARM - /// Id. - /// The Current protection - /// readiness errors. - /// The list of replication - /// providers supported for the protectable item. - /// The Replication provider custom - /// settings. - public ProtectableItemProperties(string friendlyName = default(string), string protectionStatus = default(string), string replicationProtectedItemId = default(string), string recoveryServicesProviderId = default(string), IList protectionReadinessErrors = default(IList), IList supportedReplicationProviders = default(IList), ConfigurationSettings customDetails = default(ConfigurationSettings)) + + /// The name. + /// + + /// The protection status. + /// + + /// The ARM resource of protected items. + /// + + /// The recovery provider ARM Id. + /// + + /// The Current protection readiness errors. + /// + + /// The list of replication providers supported for the protectable item. + /// + + /// The Replication provider custom settings. + /// + public ProtectableItemProperties(string friendlyName = default(string), string protectionStatus = default(string), string replicationProtectedItemId = default(string), string recoveryServicesProviderId = default(string), System.Collections.Generic.IList protectionReadinessErrors = default(System.Collections.Generic.IList), System.Collections.Generic.IList supportedReplicationProviders = default(System.Collections.Generic.IList), ConfigurationSettings customDetails = default(ConfigurationSettings)) + { - FriendlyName = friendlyName; - ProtectionStatus = protectionStatus; - ReplicationProtectedItemId = replicationProtectedItemId; - RecoveryServicesProviderId = recoveryServicesProviderId; - ProtectionReadinessErrors = protectionReadinessErrors; - SupportedReplicationProviders = supportedReplicationProviders; - CustomDetails = customDetails; + this.FriendlyName = friendlyName; + this.ProtectionStatus = protectionStatus; + this.ReplicationProtectedItemId = replicationProtectedItemId; + this.RecoveryServicesProviderId = recoveryServicesProviderId; + this.ProtectionReadinessErrors = protectionReadinessErrors; + this.SupportedReplicationProviders = supportedReplicationProviders; + this.CustomDetails = customDetails; CustomInit(); } @@ -60,48 +62,48 @@ public ProtectableItemProperties() /// partial void CustomInit(); + /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the protection status. /// - [JsonProperty(PropertyName = "protectionStatus")] - public string ProtectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus {get; set; } /// /// Gets or sets the ARM resource of protected items. /// - [JsonProperty(PropertyName = "replicationProtectedItemId")] - public string ReplicationProtectedItemId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationProtectedItemId")] + public string ReplicationProtectedItemId {get; set; } /// /// Gets or sets the recovery provider ARM Id. /// - [JsonProperty(PropertyName = "recoveryServicesProviderId")] - public string RecoveryServicesProviderId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryServicesProviderId")] + public string RecoveryServicesProviderId {get; set; } /// /// Gets or sets the Current protection readiness errors. /// - [JsonProperty(PropertyName = "protectionReadinessErrors")] - public IList ProtectionReadinessErrors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionReadinessErrors")] + public System.Collections.Generic.IList ProtectionReadinessErrors {get; set; } /// /// Gets or sets the list of replication providers supported for the /// protectable item. /// - [JsonProperty(PropertyName = "supportedReplicationProviders")] - public IList SupportedReplicationProviders { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "supportedReplicationProviders")] + public System.Collections.Generic.IList SupportedReplicationProviders {get; set; } /// /// Gets or sets the Replication provider custom settings. /// - [JsonProperty(PropertyName = "customDetails")] - public ConfigurationSettings CustomDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "customDetails")] + public ConfigurationSettings CustomDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItemQueryParameter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItemQueryParameter.cs index 0db22b85a415..89708bcf18d8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItemQueryParameter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectableItemQueryParameter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ProtectableItemQueryParameter { /// - /// Initializes a new instance of the ProtectableItemQueryParameter - /// class. + /// Initializes a new instance of the ProtectableItemQueryParameter class. /// public ProtectableItemQueryParameter() { @@ -28,14 +21,15 @@ public ProtectableItemQueryParameter() } /// - /// Initializes a new instance of the ProtectableItemQueryParameter - /// class. + /// Initializes a new instance of the ProtectableItemQueryParameter class. /// - /// State of the Protectable item query - /// filter. + + /// State of the Protectable item query filter. + /// public ProtectableItemQueryParameter(string state = default(string)) + { - State = state; + this.State = state; CustomInit(); } @@ -44,11 +38,11 @@ public ProtectableItemQueryParameter() /// partial void CustomInit(); + /// /// Gets or sets state of the Protectable item query filter. /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectedItemsQueryParameter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectedItemsQueryParameter.cs index 3048174a57ea..099099a1cadd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectedItemsQueryParameter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectedItemsQueryParameter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ProtectedItemsQueryParameter { /// - /// Initializes a new instance of the ProtectedItemsQueryParameter - /// class. + /// Initializes a new instance of the ProtectedItemsQueryParameter class. /// public ProtectedItemsQueryParameter() { @@ -28,31 +21,43 @@ public ProtectedItemsQueryParameter() } /// - /// Initializes a new instance of the ProtectedItemsQueryParameter - /// class. + /// Initializes a new instance of the ProtectedItemsQueryParameter class. /// - /// The source fabric name - /// filter. - /// The recovery plan filter. - /// The source fabric location - /// filter. - /// The fabric object Id filter. - /// The vCenter name filter. - /// The replication provider type. - /// Whether Multi VM group is - /// auto created or specified by user. Possible values include: - /// 'AutoCreated', 'UserSpecified' - /// The process server Id filter. - public ProtectedItemsQueryParameter(string sourceFabricName = default(string), string recoveryPlanName = default(string), string sourceFabricLocation = default(string), string fabricObjectId = default(string), string vCenterName = default(string), string instanceType = default(string), string multiVmGroupCreateOption = default(string), string processServerId = default(string)) + + /// The source fabric name filter. + /// + + /// The recovery plan filter. + /// + + /// The source fabric location filter. + /// + + /// The fabric object Id filter. + /// + + /// The vCenter name filter. + /// + + /// The replication provider type. + /// + + /// Whether Multi VM group is auto created or specified by user. + /// Possible values include: 'AutoCreated', 'UserSpecified' + + /// The process server Id filter. + /// + public ProtectedItemsQueryParameter(string sourceFabricName = default(string), string recoveryPlanName = default(string), string sourceFabricLocation = default(string), string fabricObjectId = default(string), string vCenterName = default(string), string instanceType = default(string), string multiVMGroupCreateOption = default(string), string processServerId = default(string)) + { - SourceFabricName = sourceFabricName; - RecoveryPlanName = recoveryPlanName; - SourceFabricLocation = sourceFabricLocation; - FabricObjectId = fabricObjectId; - VCenterName = vCenterName; - InstanceType = instanceType; - MultiVmGroupCreateOption = multiVmGroupCreateOption; - ProcessServerId = processServerId; + this.SourceFabricName = sourceFabricName; + this.RecoveryPlanName = recoveryPlanName; + this.SourceFabricLocation = sourceFabricLocation; + this.FabricObjectId = fabricObjectId; + this.VCenterName = vCenterName; + this.InstanceType = instanceType; + this.MultiVMGroupCreateOption = multiVMGroupCreateOption; + this.ProcessServerId = processServerId; CustomInit(); } @@ -61,54 +66,53 @@ public ProtectedItemsQueryParameter() /// partial void CustomInit(); + /// /// Gets or sets the source fabric name filter. /// - [JsonProperty(PropertyName = "sourceFabricName")] - public string SourceFabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceFabricName")] + public string SourceFabricName {get; set; } /// /// Gets or sets the recovery plan filter. /// - [JsonProperty(PropertyName = "recoveryPlanName")] - public string RecoveryPlanName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPlanName")] + public string RecoveryPlanName {get; set; } /// /// Gets or sets the source fabric location filter. /// - [JsonProperty(PropertyName = "sourceFabricLocation")] - public string SourceFabricLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceFabricLocation")] + public string SourceFabricLocation {get; set; } /// /// Gets or sets the fabric object Id filter. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; set; } /// /// Gets or sets the vCenter name filter. /// - [JsonProperty(PropertyName = "vCenterName")] - public string VCenterName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vCenterName")] + public string VCenterName {get; set; } /// /// Gets or sets the replication provider type. /// - [JsonProperty(PropertyName = "instanceType")] - public string InstanceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "instanceType")] + public string InstanceType {get; set; } /// - /// Gets or sets whether Multi VM group is auto created or specified by - /// user. Possible values include: 'AutoCreated', 'UserSpecified' + /// Gets or sets whether Multi VM group is auto created or specified by user. Possible values include: 'AutoCreated', 'UserSpecified' /// - [JsonProperty(PropertyName = "multiVmGroupCreateOption")] - public string MultiVmGroupCreateOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmGroupCreateOption")] + public string MultiVMGroupCreateOption {get; set; } /// /// Gets or sets the process server Id filter. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainer.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainer.cs index b057ff40cad2..208241932fbf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainer.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainer.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public ProtectionContainer() /// /// Initializes a new instance of the ProtectionContainer class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The custom data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The custom data. + /// public ProtectionContainer(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ProtectionContainerProperties properties = default(ProtectionContainerProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public ProtectionContainer() /// partial void CustomInit(); + /// /// Gets or sets the custom data. /// - [JsonProperty(PropertyName = "properties")] - public ProtectionContainerProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ProtectionContainerProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerFabricSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerFabricSpecificDetails.cs index f8645123cd73..0d3ca856583d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerFabricSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerFabricSpecificDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ProtectionContainerFabricSpecificDetails { /// - /// Initializes a new instance of the - /// ProtectionContainerFabricSpecificDetails class. + /// Initializes a new instance of the ProtectionContainerFabricSpecificDetails class. /// public ProtectionContainerFabricSpecificDetails() { @@ -28,14 +21,15 @@ public ProtectionContainerFabricSpecificDetails() } /// - /// Initializes a new instance of the - /// ProtectionContainerFabricSpecificDetails class. + /// Initializes a new instance of the ProtectionContainerFabricSpecificDetails class. /// - /// Gets the class type. Overridden in - /// derived classes. + + /// Gets the class type. Overridden in derived classes. + /// public ProtectionContainerFabricSpecificDetails(string instanceType = default(string)) + { - InstanceType = instanceType; + this.InstanceType = instanceType; CustomInit(); } @@ -44,11 +38,11 @@ public ProtectionContainerFabricSpecificDetails() /// partial void CustomInit(); + /// - /// Gets the class type. Overridden in derived classes. + /// Gets gets the class type. Overridden in derived classes. /// - [JsonProperty(PropertyName = "instanceType")] - public string InstanceType { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "instanceType")] + public string InstanceType {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMapping.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMapping.cs index 5870b364b92d..836be2f63988 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMapping.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMapping.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public ProtectionContainerMapping() /// /// Initializes a new instance of the ProtectionContainerMapping class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The custom data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The custom data. + /// public ProtectionContainerMapping(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ProtectionContainerMappingProperties properties = default(ProtectionContainerMappingProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public ProtectionContainerMapping() /// partial void CustomInit(); + /// /// Gets or sets the custom data. /// - [JsonProperty(PropertyName = "properties")] - public ProtectionContainerMappingProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ProtectionContainerMappingProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMappingProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMappingProperties.cs index 275c772c0330..3a99f4752806 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMappingProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMappingProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ProtectionContainerMappingProperties { /// - /// Initializes a new instance of the - /// ProtectionContainerMappingProperties class. + /// Initializes a new instance of the ProtectionContainerMappingProperties class. /// public ProtectionContainerMappingProperties() { @@ -30,40 +21,55 @@ public ProtectionContainerMappingProperties() } /// - /// Initializes a new instance of the - /// ProtectionContainerMappingProperties class. + /// Initializes a new instance of the ProtectionContainerMappingProperties class. /// - /// Paired protection - /// container ARM ID. - /// Friendly name - /// of paired container. - /// Provider specific provider - /// details. - /// Health of pairing. - /// Health error. - /// Policy ARM Id. - /// Association Status. - /// Friendly name - /// of source protection container. - /// Friendly name of source - /// fabric. - /// Friendly name of target - /// fabric. - /// Friendly name of replication - /// policy. - public ProtectionContainerMappingProperties(string targetProtectionContainerId = default(string), string targetProtectionContainerFriendlyName = default(string), ProtectionContainerMappingProviderSpecificDetails providerSpecificDetails = default(ProtectionContainerMappingProviderSpecificDetails), string health = default(string), IList healthErrorDetails = default(IList), string policyId = default(string), string state = default(string), string sourceProtectionContainerFriendlyName = default(string), string sourceFabricFriendlyName = default(string), string targetFabricFriendlyName = default(string), string policyFriendlyName = default(string)) + + /// Paired protection container ARM ID. + /// + + /// Friendly name of paired container. + /// + + /// Provider specific provider details. + /// + + /// Health of pairing. + /// + + /// Health error. + /// + + /// Policy ARM Id. + /// + + /// Association Status. + /// + + /// Friendly name of source protection container. + /// + + /// Friendly name of source fabric. + /// + + /// Friendly name of target fabric. + /// + + /// Friendly name of replication policy. + /// + public ProtectionContainerMappingProperties(string targetProtectionContainerId = default(string), string targetProtectionContainerFriendlyName = default(string), ProtectionContainerMappingProviderSpecificDetails providerSpecificDetails = default(ProtectionContainerMappingProviderSpecificDetails), string health = default(string), System.Collections.Generic.IList healthErrorDetails = default(System.Collections.Generic.IList), string policyId = default(string), string state = default(string), string sourceProtectionContainerFriendlyName = default(string), string sourceFabricFriendlyName = default(string), string targetFabricFriendlyName = default(string), string policyFriendlyName = default(string)) + { - TargetProtectionContainerId = targetProtectionContainerId; - TargetProtectionContainerFriendlyName = targetProtectionContainerFriendlyName; - ProviderSpecificDetails = providerSpecificDetails; - Health = health; - HealthErrorDetails = healthErrorDetails; - PolicyId = policyId; - State = state; - SourceProtectionContainerFriendlyName = sourceProtectionContainerFriendlyName; - SourceFabricFriendlyName = sourceFabricFriendlyName; - TargetFabricFriendlyName = targetFabricFriendlyName; - PolicyFriendlyName = policyFriendlyName; + this.TargetProtectionContainerId = targetProtectionContainerId; + this.TargetProtectionContainerFriendlyName = targetProtectionContainerFriendlyName; + this.ProviderSpecificDetails = providerSpecificDetails; + this.Health = health; + this.HealthErrorDetails = healthErrorDetails; + this.PolicyId = policyId; + this.State = state; + this.SourceProtectionContainerFriendlyName = sourceProtectionContainerFriendlyName; + this.SourceFabricFriendlyName = sourceFabricFriendlyName; + this.TargetFabricFriendlyName = targetFabricFriendlyName; + this.PolicyFriendlyName = policyFriendlyName; CustomInit(); } @@ -72,71 +78,71 @@ public ProtectionContainerMappingProperties() /// partial void CustomInit(); + /// /// Gets or sets paired protection container ARM ID. /// - [JsonProperty(PropertyName = "targetProtectionContainerId")] - public string TargetProtectionContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProtectionContainerId")] + public string TargetProtectionContainerId {get; set; } /// /// Gets or sets friendly name of paired container. /// - [JsonProperty(PropertyName = "targetProtectionContainerFriendlyName")] - public string TargetProtectionContainerFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProtectionContainerFriendlyName")] + public string TargetProtectionContainerFriendlyName {get; set; } /// /// Gets or sets provider specific provider details. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public ProtectionContainerMappingProviderSpecificDetails ProviderSpecificDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public ProtectionContainerMappingProviderSpecificDetails ProviderSpecificDetails {get; set; } /// /// Gets or sets health of pairing. /// - [JsonProperty(PropertyName = "health")] - public string Health { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; set; } /// /// Gets or sets health error. /// - [JsonProperty(PropertyName = "healthErrorDetails")] - public IList HealthErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrorDetails")] + public System.Collections.Generic.IList HealthErrorDetails {get; set; } /// /// Gets or sets policy ARM Id. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// /// Gets or sets association Status. /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } /// /// Gets or sets friendly name of source protection container. /// - [JsonProperty(PropertyName = "sourceProtectionContainerFriendlyName")] - public string SourceProtectionContainerFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceProtectionContainerFriendlyName")] + public string SourceProtectionContainerFriendlyName {get; set; } /// /// Gets or sets friendly name of source fabric. /// - [JsonProperty(PropertyName = "sourceFabricFriendlyName")] - public string SourceFabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceFabricFriendlyName")] + public string SourceFabricFriendlyName {get; set; } /// /// Gets or sets friendly name of target fabric. /// - [JsonProperty(PropertyName = "targetFabricFriendlyName")] - public string TargetFabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetFabricFriendlyName")] + public string TargetFabricFriendlyName {get; set; } /// /// Gets or sets friendly name of replication policy. /// - [JsonProperty(PropertyName = "policyFriendlyName")] - public string PolicyFriendlyName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "policyFriendlyName")] + public string PolicyFriendlyName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMappingProviderSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMappingProviderSpecificDetails.cs index 00fc43753cc9..585d4d50deca 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMappingProviderSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerMappingProviderSpecificDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ProtectionContainerMappingProviderSpecificDetails { /// - /// Initializes a new instance of the - /// ProtectionContainerMappingProviderSpecificDetails class. + /// Initializes a new instance of the ProtectionContainerMappingProviderSpecificDetails class. /// public ProtectionContainerMappingProviderSpecificDetails() { @@ -35,4 +28,4 @@ public ProtectionContainerMappingProviderSpecificDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerProperties.cs index f07b8a43d557..d5278daaa609 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionContainerProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ProtectionContainerProperties { /// - /// Initializes a new instance of the ProtectionContainerProperties - /// class. + /// Initializes a new instance of the ProtectionContainerProperties class. /// public ProtectionContainerProperties() { @@ -28,27 +21,39 @@ public ProtectionContainerProperties() } /// - /// Initializes a new instance of the ProtectionContainerProperties - /// class. + /// Initializes a new instance of the ProtectionContainerProperties class. /// - /// Fabric friendly name. - /// The name. - /// The fabric type. - /// Number of protected PEs. - /// The pairing status of this - /// cloud. - /// The role of this cloud. - /// Fabric specific - /// details. + + /// Fabric friendly name. + /// + + /// The name. + /// + + /// The fabric type. + /// + + /// Number of protected PEs. + /// + + /// The pairing status of this cloud. + /// + + /// The role of this cloud. + /// + + /// Fabric specific details. + /// public ProtectionContainerProperties(string fabricFriendlyName = default(string), string friendlyName = default(string), string fabricType = default(string), int? protectedItemCount = default(int?), string pairingStatus = default(string), string role = default(string), ProtectionContainerFabricSpecificDetails fabricSpecificDetails = default(ProtectionContainerFabricSpecificDetails)) + { - FabricFriendlyName = fabricFriendlyName; - FriendlyName = friendlyName; - FabricType = fabricType; - ProtectedItemCount = protectedItemCount; - PairingStatus = pairingStatus; - Role = role; - FabricSpecificDetails = fabricSpecificDetails; + this.FabricFriendlyName = fabricFriendlyName; + this.FriendlyName = friendlyName; + this.FabricType = fabricType; + this.ProtectedItemCount = protectedItemCount; + this.PairingStatus = pairingStatus; + this.Role = role; + this.FabricSpecificDetails = fabricSpecificDetails; CustomInit(); } @@ -57,47 +62,47 @@ public ProtectionContainerProperties() /// partial void CustomInit(); + /// /// Gets or sets fabric friendly name. /// - [JsonProperty(PropertyName = "fabricFriendlyName")] - public string FabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricFriendlyName")] + public string FabricFriendlyName {get; set; } /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the fabric type. /// - [JsonProperty(PropertyName = "fabricType")] - public string FabricType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricType")] + public string FabricType {get; set; } /// /// Gets or sets number of protected PEs. /// - [JsonProperty(PropertyName = "protectedItemCount")] - public int? ProtectedItemCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemCount")] + public int? ProtectedItemCount {get; set; } /// /// Gets or sets the pairing status of this cloud. /// - [JsonProperty(PropertyName = "pairingStatus")] - public string PairingStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "pairingStatus")] + public string PairingStatus {get; set; } /// /// Gets or sets the role of this cloud. /// - [JsonProperty(PropertyName = "role")] - public string Role { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "role")] + public string Role {get; set; } /// /// Gets or sets fabric specific details. /// - [JsonProperty(PropertyName = "fabricSpecificDetails")] - public ProtectionContainerFabricSpecificDetails FabricSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricSpecificDetails")] + public ProtectionContainerFabricSpecificDetails FabricSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionHealth.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionHealth.cs index ac28e93b78b5..822984d0befb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionHealth.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionHealth.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for ProtectionHealth. /// + + public static class ProtectionHealth { public const string None = "None"; @@ -21,4 +18,4 @@ public static class ProtectionHealth public const string Warning = "Warning"; public const string Critical = "Critical"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionProfileCustomDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionProfileCustomDetails.cs index 9545d3380566..9b93972c5156 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionProfileCustomDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProtectionProfileCustomDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ProtectionProfileCustomDetails { /// - /// Initializes a new instance of the ProtectionProfileCustomDetails - /// class. + /// Initializes a new instance of the ProtectionProfileCustomDetails class. /// public ProtectionProfileCustomDetails() { @@ -35,4 +28,4 @@ public ProtectionProfileCustomDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProviderError.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProviderError.cs index ded111750d60..31bf0aa47ff3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProviderError.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProviderError.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,20 +23,29 @@ public ProviderError() /// /// Initializes a new instance of the ProviderError class. /// - /// The Error code. - /// The Error message. - /// The Provider error Id. - /// The possible causes for the - /// error. - /// The recommended action to resolve - /// the error. + + /// The Error code. + /// + + /// The Error message. + /// + + /// The Provider error Id. + /// + + /// The possible causes for the error. + /// + + /// The recommended action to resolve the error. + /// public ProviderError(int? errorCode = default(int?), string errorMessage = default(string), string errorId = default(string), string possibleCauses = default(string), string recommendedAction = default(string)) + { - ErrorCode = errorCode; - ErrorMessage = errorMessage; - ErrorId = errorId; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; + this.ErrorCode = errorCode; + this.ErrorMessage = errorMessage; + this.ErrorId = errorId; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; CustomInit(); } @@ -51,35 +54,35 @@ public ProviderError() /// partial void CustomInit(); + /// /// Gets or sets the Error code. /// - [JsonProperty(PropertyName = "errorCode")] - public int? ErrorCode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode {get; set; } /// /// Gets or sets the Error message. /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage {get; set; } /// /// Gets or sets the Provider error Id. /// - [JsonProperty(PropertyName = "errorId")] - public string ErrorId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errorId")] + public string ErrorId {get; set; } /// /// Gets or sets the possible causes for the error. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; set; } /// /// Gets or sets the recommended action to resolve the error. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProviderSpecificRecoveryPointDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProviderSpecificRecoveryPointDetails.cs index 0e922527ba6c..ba124f3fb78a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProviderSpecificRecoveryPointDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ProviderSpecificRecoveryPointDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ProviderSpecificRecoveryPointDetails { /// - /// Initializes a new instance of the - /// ProviderSpecificRecoveryPointDetails class. + /// Initializes a new instance of the ProviderSpecificRecoveryPointDetails class. /// public ProviderSpecificRecoveryPointDetails() { @@ -35,4 +28,4 @@ public ProviderSpecificRecoveryPointDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PushInstallerDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PushInstallerDetails.cs index 474d21c42efc..c36ffc7bb031 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PushInstallerDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/PushInstallerDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,28 +23,45 @@ public PushInstallerDetails() /// /// Initializes a new instance of the PushInstallerDetails class. /// - /// The push installer Id. - /// The push installer name. - /// The push installer Bios Id. - /// The fabric object Id. - /// The push installer Fqdn. - /// The version. - /// The last heartbeat received from the - /// push installer. - /// The health of the push installer. Possible - /// values include: 'None', 'Normal', 'Warning', 'Critical' - /// The health errors. - public PushInstallerDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), IList healthErrors = default(IList)) + + /// The push installer Id. + /// + + /// The push installer name. + /// + + /// The push installer Bios Id. + /// + + /// The fabric object Id. + /// + + /// The push installer Fqdn. + /// + + /// The version. + /// + + /// The last heartbeat received from the push installer. + /// + + /// The health of the push installer. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + + /// The health errors. + /// + public PushInstallerDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList)) + { - Id = id; - Name = name; - BiosId = biosId; - FabricObjectId = fabricObjectId; - Fqdn = fqdn; - Version = version; - LastHeartbeatUtc = lastHeartbeatUtc; - Health = health; - HealthErrors = healthErrors; + this.Id = id; + this.Name = name; + this.BiosId = biosId; + this.FabricObjectId = fabricObjectId; + this.Fqdn = fqdn; + this.Version = version; + this.LastHeartbeatUtc = lastHeartbeatUtc; + this.Health = health; + this.HealthErrors = healthErrors; CustomInit(); } @@ -61,60 +70,59 @@ public PushInstallerDetails() /// partial void CustomInit(); + /// /// Gets the push installer Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the push installer name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the push installer Bios Id. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; private set; } /// /// Gets the fabric object Id. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; private set; } /// /// Gets the push installer Fqdn. /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdn")] + public string Fqdn {get; private set; } /// /// Gets the version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } /// /// Gets the last heartbeat received from the push installer. /// - [JsonProperty(PropertyName = "lastHeartbeatUtc")] - public System.DateTime? LastHeartbeatUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeatUtc")] + public System.DateTime? LastHeartbeatUtc {get; private set; } /// - /// Gets the health of the push installer. Possible values include: - /// 'None', 'Normal', 'Warning', 'Critical' + /// Gets the health of the push installer. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "health")] - public string Health { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; private set; } /// /// Gets the health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RcmComponentStatus.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RcmComponentStatus.cs index ad47bb065310..26d3ce0e34cd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RcmComponentStatus.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RcmComponentStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for RcmComponentStatus. /// + + public static class RcmComponentStatus { public const string Healthy = "Healthy"; @@ -21,4 +18,4 @@ public static class RcmComponentStatus public const string Critical = "Critical"; public const string Unknown = "Unknown"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RcmProxyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RcmProxyDetails.cs index 55b82b7dfcb5..3aae146b062c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RcmProxyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RcmProxyDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,31 +23,49 @@ public RcmProxyDetails() /// /// Initializes a new instance of the RcmProxyDetails class. /// - /// The RCM proxy Id. - /// The RCM proxy name. - /// The RCM proxy Bios Id. - /// The fabric object Id. - /// The RCM proxy Fqdn. - /// The client authentication - /// type. - /// The version. - /// The last heartbeat received from the - /// RCM proxy. - /// The health of the RCM proxy. Possible values - /// include: 'None', 'Normal', 'Warning', 'Critical' - /// The health errors. - public RcmProxyDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string clientAuthenticationType = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), IList healthErrors = default(IList)) + + /// The RCM proxy Id. + /// + + /// The RCM proxy name. + /// + + /// The RCM proxy Bios Id. + /// + + /// The fabric object Id. + /// + + /// The RCM proxy Fqdn. + /// + + /// The client authentication type. + /// + + /// The version. + /// + + /// The last heartbeat received from the RCM proxy. + /// + + /// The health of the RCM proxy. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + + /// The health errors. + /// + public RcmProxyDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string clientAuthenticationType = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList)) + { - Id = id; - Name = name; - BiosId = biosId; - FabricObjectId = fabricObjectId; - Fqdn = fqdn; - ClientAuthenticationType = clientAuthenticationType; - Version = version; - LastHeartbeatUtc = lastHeartbeatUtc; - Health = health; - HealthErrors = healthErrors; + this.Id = id; + this.Name = name; + this.BiosId = biosId; + this.FabricObjectId = fabricObjectId; + this.Fqdn = fqdn; + this.ClientAuthenticationType = clientAuthenticationType; + this.Version = version; + this.LastHeartbeatUtc = lastHeartbeatUtc; + this.Health = health; + this.HealthErrors = healthErrors; CustomInit(); } @@ -64,66 +74,65 @@ public RcmProxyDetails() /// partial void CustomInit(); + /// /// Gets the RCM proxy Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the RCM proxy name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the RCM proxy Bios Id. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; private set; } /// /// Gets the fabric object Id. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; private set; } /// /// Gets the RCM proxy Fqdn. /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdn")] + public string Fqdn {get; private set; } /// /// Gets the client authentication type. /// - [JsonProperty(PropertyName = "clientAuthenticationType")] - public string ClientAuthenticationType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "clientAuthenticationType")] + public string ClientAuthenticationType {get; private set; } /// /// Gets the version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } /// /// Gets the last heartbeat received from the RCM proxy. /// - [JsonProperty(PropertyName = "lastHeartbeatUtc")] - public System.DateTime? LastHeartbeatUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeatUtc")] + public System.DateTime? LastHeartbeatUtc {get; private set; } /// - /// Gets the health of the RCM proxy. Possible values include: 'None', - /// 'Normal', 'Warning', 'Critical' + /// Gets the health of the RCM proxy. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "health")] - public string Health { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; private set; } /// /// Gets the health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryAvailabilitySetCustomDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryAvailabilitySetCustomDetails.cs index 6bf8fa46dd66..0fc7690dc62a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryAvailabilitySetCustomDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryAvailabilitySetCustomDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryAvailabilitySetCustomDetails { /// - /// Initializes a new instance of the - /// RecoveryAvailabilitySetCustomDetails class. + /// Initializes a new instance of the RecoveryAvailabilitySetCustomDetails class. /// public RecoveryAvailabilitySetCustomDetails() { @@ -35,4 +28,4 @@ public RecoveryAvailabilitySetCustomDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlan.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlan.cs index 2858c623f549..65c32b0b73cf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlan.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlan.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public RecoveryPlan() /// /// Initializes a new instance of the RecoveryPlan class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The custom details. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The custom details. + /// public RecoveryPlan(string id = default(string), string name = default(string), string type = default(string), string location = default(string), RecoveryPlanProperties properties = default(RecoveryPlanProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public RecoveryPlan() /// partial void CustomInit(); + /// /// Gets or sets the custom details. /// - [JsonProperty(PropertyName = "properties")] - public RecoveryPlanProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RecoveryPlanProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2ADetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2ADetails.cs index 250751da6024..4c6f11552733 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2ADetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2ADetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,18 +24,25 @@ public RecoveryPlanA2ADetails() /// /// Initializes a new instance of the RecoveryPlanA2ADetails class. /// - /// The primary zone. - /// The recovery zone. - /// The primary extended - /// location. - /// The recovery extended - /// location. + + /// The primary zone. + /// + + /// The recovery zone. + /// + + /// The primary extended location. + /// + + /// The recovery extended location. + /// public RecoveryPlanA2ADetails(string primaryZone = default(string), string recoveryZone = default(string), ExtendedLocation primaryExtendedLocation = default(ExtendedLocation), ExtendedLocation recoveryExtendedLocation = default(ExtendedLocation)) + { - PrimaryZone = primaryZone; - RecoveryZone = recoveryZone; - PrimaryExtendedLocation = primaryExtendedLocation; - RecoveryExtendedLocation = recoveryExtendedLocation; + this.PrimaryZone = primaryZone; + this.RecoveryZone = recoveryZone; + this.PrimaryExtendedLocation = primaryExtendedLocation; + this.RecoveryExtendedLocation = recoveryExtendedLocation; CustomInit(); } @@ -50,46 +51,48 @@ public RecoveryPlanA2ADetails() /// partial void CustomInit(); + /// /// Gets or sets the primary zone. /// - [JsonProperty(PropertyName = "primaryZone")] - public string PrimaryZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryZone")] + public string PrimaryZone {get; set; } /// /// Gets or sets the recovery zone. /// - [JsonProperty(PropertyName = "recoveryZone")] - public string RecoveryZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryZone")] + public string RecoveryZone {get; set; } /// /// Gets or sets the primary extended location. /// - [JsonProperty(PropertyName = "primaryExtendedLocation")] - public ExtendedLocation PrimaryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryExtendedLocation")] + public ExtendedLocation PrimaryExtendedLocation {get; set; } /// /// Gets or sets the recovery extended location. /// - [JsonProperty(PropertyName = "recoveryExtendedLocation")] - public ExtendedLocation RecoveryExtendedLocation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryExtendedLocation")] + public ExtendedLocation RecoveryExtendedLocation {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PrimaryExtendedLocation != null) + + + if (this.PrimaryExtendedLocation != null) { - PrimaryExtendedLocation.Validate(); + this.PrimaryExtendedLocation.Validate(); } - if (RecoveryExtendedLocation != null) + if (this.RecoveryExtendedLocation != null) { - RecoveryExtendedLocation.Validate(); + this.RecoveryExtendedLocation.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2AFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2AFailoverInput.cs index 1cac4e82af97..860ae58db5df 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2AFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2AFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanA2AFailoverInput : RecoveryPlanProviderSpecificFailoverInput { /// - /// Initializes a new instance of the RecoveryPlanA2AFailoverInput - /// class. + /// Initializes a new instance of the RecoveryPlanA2AFailoverInput class. /// public RecoveryPlanA2AFailoverInput() { @@ -30,23 +22,26 @@ public RecoveryPlanA2AFailoverInput() } /// - /// Initializes a new instance of the RecoveryPlanA2AFailoverInput - /// class. + /// Initializes a new instance of the RecoveryPlanA2AFailoverInput class. /// - /// The recovery point type. Possible - /// values include: 'Latest', 'LatestApplicationConsistent', + + /// The recovery point type. + /// Possible values include: 'Latest', 'LatestApplicationConsistent', /// 'LatestCrashConsistent', 'LatestProcessed' - /// A value indicating whether - /// to use recovery cloud service for TFO or not. - /// A value indicating whether - /// multi VM sync enabled VMs should use multi VM sync points for - /// failover. Possible values include: 'UseMultiVmSyncRecoveryPoint', + + /// A value indicating whether to use recovery cloud service for TFO or not. + /// + + /// A value indicating whether multi VM sync enabled VMs should use multi VM + /// sync points for failover. + /// Possible values include: 'UseMultiVmSyncRecoveryPoint', /// 'UsePerVmRecoveryPoint' - public RecoveryPlanA2AFailoverInput(string recoveryPointType, string cloudServiceCreationOption = default(string), string multiVmSyncPointOption = default(string)) + public RecoveryPlanA2AFailoverInput(string recoveryPointType, string cloudServiceCreationOption = default(string), string multiVMSyncPointOption = default(string)) + { - RecoveryPointType = recoveryPointType; - CloudServiceCreationOption = cloudServiceCreationOption; - MultiVmSyncPointOption = multiVmSyncPointOption; + this.RecoveryPointType = recoveryPointType; + this.CloudServiceCreationOption = cloudServiceCreationOption; + this.MultiVMSyncPointOption = multiVMSyncPointOption; CustomInit(); } @@ -55,41 +50,41 @@ public RecoveryPlanA2AFailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point type. Possible values include: - /// 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', - /// 'LatestProcessed' + /// Gets or sets the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// - /// Gets or sets a value indicating whether to use recovery cloud - /// service for TFO or not. + /// Gets or sets a value indicating whether to use recovery cloud service for + /// TFO or not. /// - [JsonProperty(PropertyName = "cloudServiceCreationOption")] - public string CloudServiceCreationOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cloudServiceCreationOption")] + public string CloudServiceCreationOption {get; set; } /// - /// Gets or sets a value indicating whether multi VM sync enabled VMs - /// should use multi VM sync points for failover. Possible values - /// include: 'UseMultiVmSyncRecoveryPoint', 'UsePerVmRecoveryPoint' + /// Gets or sets a value indicating whether multi VM sync enabled VMs should + /// use multi VM sync points for failover. Possible values include: 'UseMultiVmSyncRecoveryPoint', 'UsePerVmRecoveryPoint' /// - [JsonProperty(PropertyName = "multiVmSyncPointOption")] - public string MultiVmSyncPointOption { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "multiVmSyncPointOption")] + public string MultiVMSyncPointOption {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryPointType == null) + if (this.RecoveryPointType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryPointType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryPointType"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2AInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2AInput.cs index f7c17f0a7aaa..395e5533549f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2AInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanA2AInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,18 +24,25 @@ public RecoveryPlanA2AInput() /// /// Initializes a new instance of the RecoveryPlanA2AInput class. /// - /// The primary zone. - /// The recovery zone. - /// The primary extended - /// location. - /// The recovery extended - /// location. + + /// The primary zone. + /// + + /// The recovery zone. + /// + + /// The primary extended location. + /// + + /// The recovery extended location. + /// public RecoveryPlanA2AInput(string primaryZone = default(string), string recoveryZone = default(string), ExtendedLocation primaryExtendedLocation = default(ExtendedLocation), ExtendedLocation recoveryExtendedLocation = default(ExtendedLocation)) + { - PrimaryZone = primaryZone; - RecoveryZone = recoveryZone; - PrimaryExtendedLocation = primaryExtendedLocation; - RecoveryExtendedLocation = recoveryExtendedLocation; + this.PrimaryZone = primaryZone; + this.RecoveryZone = recoveryZone; + this.PrimaryExtendedLocation = primaryExtendedLocation; + this.RecoveryExtendedLocation = recoveryExtendedLocation; CustomInit(); } @@ -50,46 +51,48 @@ public RecoveryPlanA2AInput() /// partial void CustomInit(); + /// /// Gets or sets the primary zone. /// - [JsonProperty(PropertyName = "primaryZone")] - public string PrimaryZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryZone")] + public string PrimaryZone {get; set; } /// /// Gets or sets the recovery zone. /// - [JsonProperty(PropertyName = "recoveryZone")] - public string RecoveryZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryZone")] + public string RecoveryZone {get; set; } /// /// Gets or sets the primary extended location. /// - [JsonProperty(PropertyName = "primaryExtendedLocation")] - public ExtendedLocation PrimaryExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryExtendedLocation")] + public ExtendedLocation PrimaryExtendedLocation {get; set; } /// /// Gets or sets the recovery extended location. /// - [JsonProperty(PropertyName = "recoveryExtendedLocation")] - public ExtendedLocation RecoveryExtendedLocation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryExtendedLocation")] + public ExtendedLocation RecoveryExtendedLocation {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PrimaryExtendedLocation != null) + + + if (this.PrimaryExtendedLocation != null) { - PrimaryExtendedLocation.Validate(); + this.PrimaryExtendedLocation.Validate(); } - if (RecoveryExtendedLocation != null) + if (this.RecoveryExtendedLocation != null) { - RecoveryExtendedLocation.Validate(); + this.RecoveryExtendedLocation.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanAction.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanAction.cs index 6e958edaee0b..078fd3a140af 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanAction.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanAction.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,17 +23,25 @@ public RecoveryPlanAction() /// /// Initializes a new instance of the RecoveryPlanAction class. /// - /// The action name. - /// The list of failover types. - /// The list of failover - /// directions. - /// The custom details. - public RecoveryPlanAction(string actionName, IList failoverTypes, IList failoverDirections, RecoveryPlanActionDetails customDetails) + + /// The action name. + /// + + /// The list of failover types. + /// + + /// The list of failover directions. + /// + + /// The custom details. + /// + public RecoveryPlanAction(string actionName, System.Collections.Generic.IList failoverTypes, System.Collections.Generic.IList failoverDirections, RecoveryPlanActionDetails customDetails) + { - ActionName = actionName; - FailoverTypes = failoverTypes; - FailoverDirections = failoverDirections; - CustomDetails = customDetails; + this.ActionName = actionName; + this.FailoverTypes = failoverTypes; + this.FailoverDirections = failoverDirections; + this.CustomDetails = customDetails; CustomInit(); } @@ -51,54 +50,58 @@ public RecoveryPlanAction(string actionName, IList failoverTypes, IList< /// partial void CustomInit(); + /// /// Gets or sets the action name. /// - [JsonProperty(PropertyName = "actionName")] - public string ActionName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "actionName")] + public string ActionName {get; set; } /// /// Gets or sets the list of failover types. /// - [JsonProperty(PropertyName = "failoverTypes")] - public IList FailoverTypes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverTypes")] + public System.Collections.Generic.IList FailoverTypes {get; set; } /// /// Gets or sets the list of failover directions. /// - [JsonProperty(PropertyName = "failoverDirections")] - public IList FailoverDirections { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDirections")] + public System.Collections.Generic.IList FailoverDirections {get; set; } /// /// Gets or sets the custom details. /// - [JsonProperty(PropertyName = "customDetails")] - public RecoveryPlanActionDetails CustomDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "customDetails")] + public RecoveryPlanActionDetails CustomDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ActionName == null) + if (this.ActionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ActionName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ActionName"); } - if (FailoverTypes == null) + if (this.FailoverTypes == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FailoverTypes"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FailoverTypes"); } - if (FailoverDirections == null) + if (this.FailoverDirections == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FailoverDirections"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FailoverDirections"); } - if (CustomDetails == null) + if (this.CustomDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "CustomDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "CustomDetails"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanActionDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanActionDetails.cs index 52e481f717ab..796d8ee0ea9a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanActionDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanActionDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public RecoveryPlanActionDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanActionLocation.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanActionLocation.cs index fc8e53718aff..5375f8197d63 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanActionLocation.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanActionLocation.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for RecoveryPlanActionLocation. /// + + public static class RecoveryPlanActionLocation { public const string Primary = "Primary"; public const string Recovery = "Recovery"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanAutomationRunbookActionDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanAutomationRunbookActionDetails.cs index 277a27760616..07cfeeddbcc5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanAutomationRunbookActionDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanAutomationRunbookActionDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanAutomationRunbookActionDetails : RecoveryPlanActionDetails { /// - /// Initializes a new instance of the - /// RecoveryPlanAutomationRunbookActionDetails class. + /// Initializes a new instance of the RecoveryPlanAutomationRunbookActionDetails class. /// public RecoveryPlanAutomationRunbookActionDetails() { @@ -30,18 +22,23 @@ public RecoveryPlanAutomationRunbookActionDetails() } /// - /// Initializes a new instance of the - /// RecoveryPlanAutomationRunbookActionDetails class. + /// Initializes a new instance of the RecoveryPlanAutomationRunbookActionDetails class. /// - /// The fabric location. Possible values - /// include: 'Primary', 'Recovery' - /// The runbook ARM Id. - /// The runbook timeout. + + /// The runbook ARM Id. + /// + + /// The runbook timeout. + /// + + /// The fabric location. + /// Possible values include: 'Primary', 'Recovery' public RecoveryPlanAutomationRunbookActionDetails(string fabricLocation, string runbookId = default(string), string timeout = default(string)) + { - RunbookId = runbookId; - Timeout = timeout; - FabricLocation = fabricLocation; + this.RunbookId = runbookId; + this.Timeout = timeout; + this.FabricLocation = fabricLocation; CustomInit(); } @@ -50,37 +47,39 @@ public RecoveryPlanAutomationRunbookActionDetails() /// partial void CustomInit(); + /// /// Gets or sets the runbook ARM Id. /// - [JsonProperty(PropertyName = "runbookId")] - public string RunbookId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runbookId")] + public string RunbookId {get; set; } /// /// Gets or sets the runbook timeout. /// - [JsonProperty(PropertyName = "timeout")] - public string Timeout { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "timeout")] + public string Timeout {get; set; } /// - /// Gets or sets the fabric location. Possible values include: - /// 'Primary', 'Recovery' + /// Gets or sets the fabric location. Possible values include: 'Primary', 'Recovery' /// - [JsonProperty(PropertyName = "fabricLocation")] - public string FabricLocation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricLocation")] + public string FabricLocation {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (FabricLocation == null) + if (this.FabricLocation == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FabricLocation"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FabricLocation"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroup.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroup.cs index 4c19863a2e95..f935e3855287 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroup.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroup.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,18 +23,25 @@ public RecoveryPlanGroup() /// /// Initializes a new instance of the RecoveryPlanGroup class. /// - /// The group type. Possible values include: - /// 'Shutdown', 'Boot', 'Failover' - /// The list of protected - /// items. - /// The start group actions. - /// The end group actions. - public RecoveryPlanGroup(string groupType, IList replicationProtectedItems = default(IList), IList startGroupActions = default(IList), IList endGroupActions = default(IList)) + + /// The group type. + /// Possible values include: 'Shutdown', 'Boot', 'Failover' + + /// The list of protected items. + /// + + /// The start group actions. + /// + + /// The end group actions. + /// + public RecoveryPlanGroup(string groupType, System.Collections.Generic.IList replicationProtectedItems = default(System.Collections.Generic.IList), System.Collections.Generic.IList startGroupActions = default(System.Collections.Generic.IList), System.Collections.Generic.IList endGroupActions = default(System.Collections.Generic.IList)) + { - GroupType = groupType; - ReplicationProtectedItems = replicationProtectedItems; - StartGroupActions = startGroupActions; - EndGroupActions = endGroupActions; + this.GroupType = groupType; + this.ReplicationProtectedItems = replicationProtectedItems; + this.StartGroupActions = startGroupActions; + this.EndGroupActions = endGroupActions; CustomInit(); } @@ -52,46 +50,47 @@ public RecoveryPlanGroup() /// partial void CustomInit(); + /// - /// Gets or sets the group type. Possible values include: 'Shutdown', - /// 'Boot', 'Failover' + /// Gets or sets the group type. Possible values include: 'Shutdown', 'Boot', 'Failover' /// - [JsonProperty(PropertyName = "groupType")] - public string GroupType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "groupType")] + public string GroupType {get; set; } /// /// Gets or sets the list of protected items. /// - [JsonProperty(PropertyName = "replicationProtectedItems")] - public IList ReplicationProtectedItems { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationProtectedItems")] + public System.Collections.Generic.IList ReplicationProtectedItems {get; set; } /// /// Gets or sets the start group actions. /// - [JsonProperty(PropertyName = "startGroupActions")] - public IList StartGroupActions { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "startGroupActions")] + public System.Collections.Generic.IList StartGroupActions {get; set; } /// /// Gets or sets the end group actions. /// - [JsonProperty(PropertyName = "endGroupActions")] - public IList EndGroupActions { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "endGroupActions")] + public System.Collections.Generic.IList EndGroupActions {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (GroupType == null) + if (this.GroupType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "GroupType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GroupType"); } - if (StartGroupActions != null) + + + if (this.StartGroupActions != null) { - foreach (var element in StartGroupActions) + foreach (var element in this.StartGroupActions) { if (element != null) { @@ -99,16 +98,16 @@ public virtual void Validate() } } } - if (EndGroupActions != null) + if (this.EndGroupActions != null) { - foreach (var element1 in EndGroupActions) + foreach (var element in this.EndGroupActions) { - if (element1 != null) + if (element != null) { - element1.Validate(); + element.Validate(); } } } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroupTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroupTaskDetails.cs index 5795b8ab9733..13a28255b35e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroupTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroupTaskDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanGroupTaskDetails : GroupTaskDetails { /// - /// Initializes a new instance of the RecoveryPlanGroupTaskDetails - /// class. + /// Initializes a new instance of the RecoveryPlanGroupTaskDetails class. /// public RecoveryPlanGroupTaskDetails() { @@ -31,19 +22,27 @@ public RecoveryPlanGroupTaskDetails() } /// - /// Initializes a new instance of the RecoveryPlanGroupTaskDetails - /// class. + /// Initializes a new instance of the RecoveryPlanGroupTaskDetails class. /// - /// The child tasks. - /// The name. - /// The group identifier. - /// The group type. - public RecoveryPlanGroupTaskDetails(IList childTasks = default(IList), string name = default(string), string groupId = default(string), string rpGroupType = default(string)) - : base(childTasks) + + /// The child tasks. + /// + + /// The name. + /// + + /// The group identifier. + /// + + /// The group type. + /// + public RecoveryPlanGroupTaskDetails(System.Collections.Generic.IList childTasks = default(System.Collections.Generic.IList), string name = default(string), string groupId = default(string), string rpGroupType = default(string)) + + : base(childTasks) { - Name = name; - GroupId = groupId; - RpGroupType = rpGroupType; + this.Name = name; + this.GroupId = groupId; + this.RpGroupType = rpGroupType; CustomInit(); } @@ -52,23 +51,23 @@ public RecoveryPlanGroupTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the group identifier. /// - [JsonProperty(PropertyName = "groupId")] - public string GroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "groupId")] + public string GroupId {get; set; } /// /// Gets or sets the group type. /// - [JsonProperty(PropertyName = "rpGroupType")] - public string RpGroupType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "rpGroupType")] + public string RpGroupType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroupType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroupType.cs index 30f913052052..1b196494db90 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroupType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanGroupType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for RecoveryPlanGroupType. /// + + public static class RecoveryPlanGroupType { public const string Shutdown = "Shutdown"; public const string Boot = "Boot"; public const string Failover = "Failover"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanHyperVReplicaAzureFailbackInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanHyperVReplicaAzureFailbackInput.cs index 803e39e7f87f..79206674ffd8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanHyperVReplicaAzureFailbackInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanHyperVReplicaAzureFailbackInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanHyperVReplicaAzureFailbackInput : RecoveryPlanProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// RecoveryPlanHyperVReplicaAzureFailbackInput class. + /// Initializes a new instance of the RecoveryPlanHyperVReplicaAzureFailbackInput class. /// public RecoveryPlanHyperVReplicaAzureFailbackInput() { @@ -30,17 +22,19 @@ public RecoveryPlanHyperVReplicaAzureFailbackInput() } /// - /// Initializes a new instance of the - /// RecoveryPlanHyperVReplicaAzureFailbackInput class. + /// Initializes a new instance of the RecoveryPlanHyperVReplicaAzureFailbackInput class. /// - /// The data sync option. Possible values - /// include: 'ForDownTime', 'ForSynchronization' - /// The ALR option. Possible - /// values include: 'CreateVmIfNotFound', 'NoAction' - public RecoveryPlanHyperVReplicaAzureFailbackInput(string dataSyncOption, string recoveryVmCreationOption) + + /// The data sync option. + /// Possible values include: 'ForDownTime', 'ForSynchronization' + + /// The ALR option. + /// Possible values include: 'CreateVmIfNotFound', 'NoAction' + public RecoveryPlanHyperVReplicaAzureFailbackInput(string dataSyncOption, string recoveryVMCreationOption) + { - DataSyncOption = dataSyncOption; - RecoveryVmCreationOption = recoveryVmCreationOption; + this.DataSyncOption = dataSyncOption; + this.RecoveryVMCreationOption = recoveryVMCreationOption; CustomInit(); } @@ -49,36 +43,36 @@ public RecoveryPlanHyperVReplicaAzureFailbackInput(string dataSyncOption, string /// partial void CustomInit(); + /// - /// Gets or sets the data sync option. Possible values include: - /// 'ForDownTime', 'ForSynchronization' + /// Gets or sets the data sync option. Possible values include: 'ForDownTime', 'ForSynchronization' /// - [JsonProperty(PropertyName = "dataSyncOption")] - public string DataSyncOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataSyncOption")] + public string DataSyncOption {get; set; } /// - /// Gets or sets the ALR option. Possible values include: - /// 'CreateVmIfNotFound', 'NoAction' + /// Gets or sets the ALR option. Possible values include: 'CreateVmIfNotFound', 'NoAction' /// - [JsonProperty(PropertyName = "recoveryVmCreationOption")] - public string RecoveryVmCreationOption { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVmCreationOption")] + public string RecoveryVMCreationOption {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (DataSyncOption == null) + if (this.DataSyncOption == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DataSyncOption"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DataSyncOption"); } - if (RecoveryVmCreationOption == null) + if (this.RecoveryVMCreationOption == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryVmCreationOption"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryVMCreationOption"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanHyperVReplicaAzureFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanHyperVReplicaAzureFailoverInput.cs index 08dd4c256a1e..24930c9e254c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanHyperVReplicaAzureFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanHyperVReplicaAzureFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanHyperVReplicaAzureFailoverInput : RecoveryPlanProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// RecoveryPlanHyperVReplicaAzureFailoverInput class. + /// Initializes a new instance of the RecoveryPlanHyperVReplicaAzureFailoverInput class. /// public RecoveryPlanHyperVReplicaAzureFailoverInput() { @@ -29,21 +22,24 @@ public RecoveryPlanHyperVReplicaAzureFailoverInput() } /// - /// Initializes a new instance of the - /// RecoveryPlanHyperVReplicaAzureFailoverInput class. + /// Initializes a new instance of the RecoveryPlanHyperVReplicaAzureFailoverInput class. /// - /// The primary KEK certificate - /// PFX. - /// The secondary KEK - /// certificate PFX. - /// The recovery point type. Possible - /// values include: 'Latest', 'LatestApplicationConsistent', + + /// The primary KEK certificate PFX. + /// + + /// The secondary KEK certificate PFX. + /// + + /// The recovery point type. + /// Possible values include: 'Latest', 'LatestApplicationConsistent', /// 'LatestProcessed' public RecoveryPlanHyperVReplicaAzureFailoverInput(string primaryKekCertificatePfx = default(string), string secondaryKekCertificatePfx = default(string), string recoveryPointType = default(string)) + { - PrimaryKekCertificatePfx = primaryKekCertificatePfx; - SecondaryKekCertificatePfx = secondaryKekCertificatePfx; - RecoveryPointType = recoveryPointType; + this.PrimaryKekCertificatePfx = primaryKekCertificatePfx; + this.SecondaryKekCertificatePfx = secondaryKekCertificatePfx; + this.RecoveryPointType = recoveryPointType; CustomInit(); } @@ -52,24 +48,23 @@ public RecoveryPlanHyperVReplicaAzureFailoverInput() /// partial void CustomInit(); + /// /// Gets or sets the primary KEK certificate PFX. /// - [JsonProperty(PropertyName = "primaryKekCertificatePfx")] - public string PrimaryKekCertificatePfx { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryKekCertificatePfx")] + public string PrimaryKekCertificatePfx {get; set; } /// /// Gets or sets the secondary KEK certificate PFX. /// - [JsonProperty(PropertyName = "secondaryKekCertificatePfx")] - public string SecondaryKekCertificatePfx { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "secondaryKekCertificatePfx")] + public string SecondaryKekCertificatePfx {get; set; } /// - /// Gets or sets the recovery point type. Possible values include: - /// 'Latest', 'LatestApplicationConsistent', 'LatestProcessed' + /// Gets or sets the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestProcessed' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageAzureV2FailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageAzureV2FailoverInput.cs index 8063a4a24c90..c93e25068b3e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageAzureV2FailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageAzureV2FailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanInMageAzureV2FailoverInput : RecoveryPlanProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// RecoveryPlanInMageAzureV2FailoverInput class. + /// Initializes a new instance of the RecoveryPlanInMageAzureV2FailoverInput class. /// public RecoveryPlanInMageAzureV2FailoverInput() { @@ -30,19 +22,21 @@ public RecoveryPlanInMageAzureV2FailoverInput() } /// - /// Initializes a new instance of the - /// RecoveryPlanInMageAzureV2FailoverInput class. + /// Initializes a new instance of the RecoveryPlanInMageAzureV2FailoverInput class. /// - /// The recovery point type. Possible - /// values include: 'Latest', 'LatestApplicationConsistent', + + /// The recovery point type. + /// Possible values include: 'Latest', 'LatestApplicationConsistent', /// 'LatestCrashConsistent', 'LatestProcessed' - /// A value indicating whether multi - /// VM sync enabled VMs should use multi VM sync points for - /// failover. - public RecoveryPlanInMageAzureV2FailoverInput(string recoveryPointType, string useMultiVmSyncPoint = default(string)) + + /// A value indicating whether multi VM sync enabled VMs should use multi VM + /// sync points for failover. + /// + public RecoveryPlanInMageAzureV2FailoverInput(string recoveryPointType, string useMultiVMSyncPoint = default(string)) + { - RecoveryPointType = recoveryPointType; - UseMultiVmSyncPoint = useMultiVmSyncPoint; + this.RecoveryPointType = recoveryPointType; + this.UseMultiVMSyncPoint = useMultiVMSyncPoint; CustomInit(); } @@ -51,33 +45,33 @@ public RecoveryPlanInMageAzureV2FailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point type. Possible values include: - /// 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', - /// 'LatestProcessed' + /// Gets or sets the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// - /// Gets or sets a value indicating whether multi VM sync enabled VMs - /// should use multi VM sync points for failover. + /// Gets or sets a value indicating whether multi VM sync enabled VMs should + /// use multi VM sync points for failover. /// - [JsonProperty(PropertyName = "useMultiVmSyncPoint")] - public string UseMultiVmSyncPoint { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "useMultiVmSyncPoint")] + public string UseMultiVMSyncPoint {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryPointType == null) + if (this.RecoveryPointType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryPointType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryPointType"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageFailoverInput.cs index 8f4eafda0f6b..2609b22f805d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanInMageFailoverInput : RecoveryPlanProviderSpecificFailoverInput { /// - /// Initializes a new instance of the RecoveryPlanInMageFailoverInput - /// class. + /// Initializes a new instance of the RecoveryPlanInMageFailoverInput class. /// public RecoveryPlanInMageFailoverInput() { @@ -30,14 +22,15 @@ public RecoveryPlanInMageFailoverInput() } /// - /// Initializes a new instance of the RecoveryPlanInMageFailoverInput - /// class. + /// Initializes a new instance of the RecoveryPlanInMageFailoverInput class. /// - /// The recovery point type. Possible - /// values include: 'LatestTime', 'LatestTag', 'Custom' + + /// The recovery point type. + /// Possible values include: 'LatestTime', 'LatestTag', 'Custom' public RecoveryPlanInMageFailoverInput(string recoveryPointType) + { - RecoveryPointType = recoveryPointType; + this.RecoveryPointType = recoveryPointType; CustomInit(); } @@ -46,25 +39,25 @@ public RecoveryPlanInMageFailoverInput(string recoveryPointType) /// partial void CustomInit(); + /// - /// Gets or sets the recovery point type. Possible values include: - /// 'LatestTime', 'LatestTag', 'Custom' + /// Gets or sets the recovery point type. Possible values include: 'LatestTime', 'LatestTag', 'Custom' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryPointType == null) + if (this.RecoveryPointType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryPointType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryPointType"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageRcmFailbackFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageRcmFailbackFailoverInput.cs index 795dbf7b1a39..62d0b6e1c20c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageRcmFailbackFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageRcmFailbackFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanInMageRcmFailbackFailoverInput : RecoveryPlanProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// RecoveryPlanInMageRcmFailbackFailoverInput class. + /// Initializes a new instance of the RecoveryPlanInMageRcmFailbackFailoverInput class. /// public RecoveryPlanInMageRcmFailbackFailoverInput() { @@ -30,18 +22,20 @@ public RecoveryPlanInMageRcmFailbackFailoverInput() } /// - /// Initializes a new instance of the - /// RecoveryPlanInMageRcmFailbackFailoverInput class. + /// Initializes a new instance of the RecoveryPlanInMageRcmFailbackFailoverInput class. /// - /// The recovery point type. Possible - /// values include: 'ApplicationConsistent', 'CrashConsistent' - /// A value indicating whether multi - /// VM sync enabled VMs should use multi VM sync points for - /// failover. - public RecoveryPlanInMageRcmFailbackFailoverInput(string recoveryPointType, string useMultiVmSyncPoint = default(string)) + + /// The recovery point type. + /// Possible values include: 'ApplicationConsistent', 'CrashConsistent' + + /// A value indicating whether multi VM sync enabled VMs should use multi VM + /// sync points for failover. + /// + public RecoveryPlanInMageRcmFailbackFailoverInput(string recoveryPointType, string useMultiVMSyncPoint = default(string)) + { - RecoveryPointType = recoveryPointType; - UseMultiVmSyncPoint = useMultiVmSyncPoint; + this.RecoveryPointType = recoveryPointType; + this.UseMultiVMSyncPoint = useMultiVMSyncPoint; CustomInit(); } @@ -50,32 +44,33 @@ public RecoveryPlanInMageRcmFailbackFailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point type. Possible values include: - /// 'ApplicationConsistent', 'CrashConsistent' + /// Gets or sets the recovery point type. Possible values include: 'ApplicationConsistent', 'CrashConsistent' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// - /// Gets or sets a value indicating whether multi VM sync enabled VMs - /// should use multi VM sync points for failover. + /// Gets or sets a value indicating whether multi VM sync enabled VMs should + /// use multi VM sync points for failover. /// - [JsonProperty(PropertyName = "useMultiVmSyncPoint")] - public string UseMultiVmSyncPoint { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "useMultiVmSyncPoint")] + public string UseMultiVMSyncPoint {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryPointType == null) + if (this.RecoveryPointType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryPointType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryPointType"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageRcmFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageRcmFailoverInput.cs index 3797aba59bc1..7823532f29ed 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageRcmFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanInMageRcmFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanInMageRcmFailoverInput : RecoveryPlanProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// RecoveryPlanInMageRcmFailoverInput class. + /// Initializes a new instance of the RecoveryPlanInMageRcmFailoverInput class. /// public RecoveryPlanInMageRcmFailoverInput() { @@ -30,19 +22,21 @@ public RecoveryPlanInMageRcmFailoverInput() } /// - /// Initializes a new instance of the - /// RecoveryPlanInMageRcmFailoverInput class. + /// Initializes a new instance of the RecoveryPlanInMageRcmFailoverInput class. /// - /// The recovery point type. Possible - /// values include: 'Latest', 'LatestApplicationConsistent', + + /// The recovery point type. + /// Possible values include: 'Latest', 'LatestApplicationConsistent', /// 'LatestCrashConsistent', 'LatestProcessed' - /// A value indicating whether multi - /// VM sync enabled VMs should use multi VM sync points for - /// failover. - public RecoveryPlanInMageRcmFailoverInput(string recoveryPointType, string useMultiVmSyncPoint = default(string)) + + /// A value indicating whether multi VM sync enabled VMs should use multi VM + /// sync points for failover. + /// + public RecoveryPlanInMageRcmFailoverInput(string recoveryPointType, string useMultiVMSyncPoint = default(string)) + { - RecoveryPointType = recoveryPointType; - UseMultiVmSyncPoint = useMultiVmSyncPoint; + this.RecoveryPointType = recoveryPointType; + this.UseMultiVMSyncPoint = useMultiVMSyncPoint; CustomInit(); } @@ -51,33 +45,33 @@ public RecoveryPlanInMageRcmFailoverInput() /// partial void CustomInit(); + /// - /// Gets or sets the recovery point type. Possible values include: - /// 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', - /// 'LatestProcessed' + /// Gets or sets the recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed' /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// - /// Gets or sets a value indicating whether multi VM sync enabled VMs - /// should use multi VM sync points for failover. + /// Gets or sets a value indicating whether multi VM sync enabled VMs should + /// use multi VM sync points for failover. /// - [JsonProperty(PropertyName = "useMultiVmSyncPoint")] - public string UseMultiVmSyncPoint { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "useMultiVmSyncPoint")] + public string UseMultiVMSyncPoint {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryPointType == null) + if (this.RecoveryPointType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryPointType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryPointType"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanManualActionDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanManualActionDetails.cs index 68fbc8cd5f51..fb6a01e39121 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanManualActionDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanManualActionDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanManualActionDetails : RecoveryPlanActionDetails { /// - /// Initializes a new instance of the RecoveryPlanManualActionDetails - /// class. + /// Initializes a new instance of the RecoveryPlanManualActionDetails class. /// public RecoveryPlanManualActionDetails() { @@ -29,13 +22,15 @@ public RecoveryPlanManualActionDetails() } /// - /// Initializes a new instance of the RecoveryPlanManualActionDetails - /// class. + /// Initializes a new instance of the RecoveryPlanManualActionDetails class. /// - /// The manual action description. + + /// The manual action description. + /// public RecoveryPlanManualActionDetails(string description = default(string)) + { - Description = description; + this.Description = description; CustomInit(); } @@ -44,11 +39,11 @@ public RecoveryPlanManualActionDetails() /// partial void CustomInit(); + /// /// Gets or sets the manual action description. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPlannedFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPlannedFailoverInput.cs index 12c5f7d71176..298d74cd282e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPlannedFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPlannedFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanPlannedFailoverInput { /// - /// Initializes a new instance of the RecoveryPlanPlannedFailoverInput - /// class. + /// Initializes a new instance of the RecoveryPlanPlannedFailoverInput class. /// public RecoveryPlanPlannedFailoverInput() { @@ -29,14 +21,15 @@ public RecoveryPlanPlannedFailoverInput() } /// - /// Initializes a new instance of the RecoveryPlanPlannedFailoverInput - /// class. + /// Initializes a new instance of the RecoveryPlanPlannedFailoverInput class. /// - /// The recovery plan planned failover input - /// properties. + + /// The recovery plan planned failover input properties. + /// public RecoveryPlanPlannedFailoverInput(RecoveryPlanPlannedFailoverInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -45,28 +38,28 @@ public RecoveryPlanPlannedFailoverInput(RecoveryPlanPlannedFailoverInputProperti /// partial void CustomInit(); + /// /// Gets or sets the recovery plan planned failover input properties. /// - [JsonProperty(PropertyName = "properties")] - public RecoveryPlanPlannedFailoverInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RecoveryPlanPlannedFailoverInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPlannedFailoverInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPlannedFailoverInputProperties.cs index 94b303a20299..8b674c190e46 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPlannedFailoverInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPlannedFailoverInputProperties.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanPlannedFailoverInputProperties { /// - /// Initializes a new instance of the - /// RecoveryPlanPlannedFailoverInputProperties class. + /// Initializes a new instance of the RecoveryPlanPlannedFailoverInputProperties class. /// public RecoveryPlanPlannedFailoverInputProperties() { @@ -31,17 +21,19 @@ public RecoveryPlanPlannedFailoverInputProperties() } /// - /// Initializes a new instance of the - /// RecoveryPlanPlannedFailoverInputProperties class. + /// Initializes a new instance of the RecoveryPlanPlannedFailoverInputProperties class. /// - /// The failover direction. Possible - /// values include: 'PrimaryToRecovery', 'RecoveryToPrimary' - /// The provider specific - /// properties. - public RecoveryPlanPlannedFailoverInputProperties(string failoverDirection, IList providerSpecificDetails = default(IList)) + + /// The failover direction. + /// Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + + /// The provider specific properties. + /// + public RecoveryPlanPlannedFailoverInputProperties(string failoverDirection, System.Collections.Generic.IList providerSpecificDetails = default(System.Collections.Generic.IList)) + { - FailoverDirection = failoverDirection; - ProviderSpecificDetails = providerSpecificDetails; + this.FailoverDirection = failoverDirection; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -50,31 +42,32 @@ public RecoveryPlanPlannedFailoverInputProperties() /// partial void CustomInit(); + /// - /// Gets or sets the failover direction. Possible values include: - /// 'PrimaryToRecovery', 'RecoveryToPrimary' + /// Gets or sets the failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' /// - [JsonProperty(PropertyName = "failoverDirection")] - public string FailoverDirection { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection {get; set; } /// /// Gets or sets the provider specific properties. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public IList ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public System.Collections.Generic.IList ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (FailoverDirection == null) + if (this.FailoverDirection == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FailoverDirection"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FailoverDirection"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPointType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPointType.cs index e7b13f67add2..edf27d749e3e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPointType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanPointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for RecoveryPlanPointType. /// + + public static class RecoveryPlanPointType { public const string Latest = "Latest"; @@ -21,4 +18,4 @@ public static class RecoveryPlanPointType public const string LatestCrashConsistent = "LatestCrashConsistent"; public const string LatestProcessed = "LatestProcessed"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProperties.cs index 1e9342e7f996..3da5da98ea71 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,51 +23,73 @@ public RecoveryPlanProperties() /// /// Initializes a new instance of the RecoveryPlanProperties class. /// - /// The friendly name. - /// The primary fabric Id. - /// The primary fabric friendly - /// name. - /// The recovery fabric Id. - /// The recovery fabric - /// friendly name. - /// The failover deployment - /// model. - /// The list of replication - /// providers. - /// The list of allowed - /// operations. - /// The start time of the last - /// planned failover. - /// The start time of the last - /// unplanned failover. - /// The start time of the last test - /// failover. - /// The current scenario details. - /// The recovery plan - /// status. - /// The recovery plan - /// status description. - /// The recovery plan groups. - /// The provider id and provider - /// specific details. - public RecoveryPlanProperties(string friendlyName = default(string), string primaryFabricId = default(string), string primaryFabricFriendlyName = default(string), string recoveryFabricId = default(string), string recoveryFabricFriendlyName = default(string), string failoverDeploymentModel = default(string), IList replicationProviders = default(IList), IList allowedOperations = default(IList), System.DateTime? lastPlannedFailoverTime = default(System.DateTime?), System.DateTime? lastUnplannedFailoverTime = default(System.DateTime?), System.DateTime? lastTestFailoverTime = default(System.DateTime?), CurrentScenarioDetails currentScenario = default(CurrentScenarioDetails), string currentScenarioStatus = default(string), string currentScenarioStatusDescription = default(string), IList groups = default(IList), IList providerSpecificDetails = default(IList)) + + /// The friendly name. + /// + + /// The primary fabric Id. + /// + + /// The primary fabric friendly name. + /// + + /// The recovery fabric Id. + /// + + /// The recovery fabric friendly name. + /// + + /// The failover deployment model. + /// + + /// The list of replication providers. + /// + + /// The list of allowed operations. + /// + + /// The start time of the last planned failover. + /// + + /// The start time of the last unplanned failover. + /// + + /// The start time of the last test failover. + /// + + /// The current scenario details. + /// + + /// The recovery plan status. + /// + + /// The recovery plan status description. + /// + + /// The recovery plan groups. + /// + + /// The provider id and provider specific details. + /// + public RecoveryPlanProperties(string friendlyName = default(string), string primaryFabricId = default(string), string primaryFabricFriendlyName = default(string), string recoveryFabricId = default(string), string recoveryFabricFriendlyName = default(string), string failoverDeploymentModel = default(string), System.Collections.Generic.IList replicationProviders = default(System.Collections.Generic.IList), System.Collections.Generic.IList allowedOperations = default(System.Collections.Generic.IList), System.DateTime? lastPlannedFailoverTime = default(System.DateTime?), System.DateTime? lastUnplannedFailoverTime = default(System.DateTime?), System.DateTime? lastTestFailoverTime = default(System.DateTime?), CurrentScenarioDetails currentScenario = default(CurrentScenarioDetails), string currentScenarioStatus = default(string), string currentScenarioStatusDescription = default(string), System.Collections.Generic.IList groups = default(System.Collections.Generic.IList), System.Collections.Generic.IList providerSpecificDetails = default(System.Collections.Generic.IList)) + { - FriendlyName = friendlyName; - PrimaryFabricId = primaryFabricId; - PrimaryFabricFriendlyName = primaryFabricFriendlyName; - RecoveryFabricId = recoveryFabricId; - RecoveryFabricFriendlyName = recoveryFabricFriendlyName; - FailoverDeploymentModel = failoverDeploymentModel; - ReplicationProviders = replicationProviders; - AllowedOperations = allowedOperations; - LastPlannedFailoverTime = lastPlannedFailoverTime; - LastUnplannedFailoverTime = lastUnplannedFailoverTime; - LastTestFailoverTime = lastTestFailoverTime; - CurrentScenario = currentScenario; - CurrentScenarioStatus = currentScenarioStatus; - CurrentScenarioStatusDescription = currentScenarioStatusDescription; - Groups = groups; - ProviderSpecificDetails = providerSpecificDetails; + this.FriendlyName = friendlyName; + this.PrimaryFabricId = primaryFabricId; + this.PrimaryFabricFriendlyName = primaryFabricFriendlyName; + this.RecoveryFabricId = recoveryFabricId; + this.RecoveryFabricFriendlyName = recoveryFabricFriendlyName; + this.FailoverDeploymentModel = failoverDeploymentModel; + this.ReplicationProviders = replicationProviders; + this.AllowedOperations = allowedOperations; + this.LastPlannedFailoverTime = lastPlannedFailoverTime; + this.LastUnplannedFailoverTime = lastUnplannedFailoverTime; + this.LastTestFailoverTime = lastTestFailoverTime; + this.CurrentScenario = currentScenario; + this.CurrentScenarioStatus = currentScenarioStatus; + this.CurrentScenarioStatusDescription = currentScenarioStatusDescription; + this.Groups = groups; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -84,101 +98,101 @@ public RecoveryPlanProperties() /// partial void CustomInit(); + /// /// Gets or sets the friendly name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the primary fabric Id. /// - [JsonProperty(PropertyName = "primaryFabricId")] - public string PrimaryFabricId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricId")] + public string PrimaryFabricId {get; set; } /// /// Gets or sets the primary fabric friendly name. /// - [JsonProperty(PropertyName = "primaryFabricFriendlyName")] - public string PrimaryFabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricFriendlyName")] + public string PrimaryFabricFriendlyName {get; set; } /// /// Gets or sets the recovery fabric Id. /// - [JsonProperty(PropertyName = "recoveryFabricId")] - public string RecoveryFabricId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricId")] + public string RecoveryFabricId {get; set; } /// /// Gets or sets the recovery fabric friendly name. /// - [JsonProperty(PropertyName = "recoveryFabricFriendlyName")] - public string RecoveryFabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricFriendlyName")] + public string RecoveryFabricFriendlyName {get; set; } /// /// Gets or sets the failover deployment model. /// - [JsonProperty(PropertyName = "failoverDeploymentModel")] - public string FailoverDeploymentModel { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDeploymentModel")] + public string FailoverDeploymentModel {get; set; } /// /// Gets or sets the list of replication providers. /// - [JsonProperty(PropertyName = "replicationProviders")] - public IList ReplicationProviders { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationProviders")] + public System.Collections.Generic.IList ReplicationProviders {get; set; } /// /// Gets or sets the list of allowed operations. /// - [JsonProperty(PropertyName = "allowedOperations")] - public IList AllowedOperations { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedOperations")] + public System.Collections.Generic.IList AllowedOperations {get; set; } /// /// Gets or sets the start time of the last planned failover. /// - [JsonProperty(PropertyName = "lastPlannedFailoverTime")] - public System.DateTime? LastPlannedFailoverTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastPlannedFailoverTime")] + public System.DateTime? LastPlannedFailoverTime {get; set; } /// /// Gets or sets the start time of the last unplanned failover. /// - [JsonProperty(PropertyName = "lastUnplannedFailoverTime")] - public System.DateTime? LastUnplannedFailoverTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastUnplannedFailoverTime")] + public System.DateTime? LastUnplannedFailoverTime {get; set; } /// /// Gets or sets the start time of the last test failover. /// - [JsonProperty(PropertyName = "lastTestFailoverTime")] - public System.DateTime? LastTestFailoverTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastTestFailoverTime")] + public System.DateTime? LastTestFailoverTime {get; set; } /// /// Gets or sets the current scenario details. /// - [JsonProperty(PropertyName = "currentScenario")] - public CurrentScenarioDetails CurrentScenario { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "currentScenario")] + public CurrentScenarioDetails CurrentScenario {get; set; } /// /// Gets or sets the recovery plan status. /// - [JsonProperty(PropertyName = "currentScenarioStatus")] - public string CurrentScenarioStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "currentScenarioStatus")] + public string CurrentScenarioStatus {get; set; } /// /// Gets or sets the recovery plan status description. /// - [JsonProperty(PropertyName = "currentScenarioStatusDescription")] - public string CurrentScenarioStatusDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "currentScenarioStatusDescription")] + public string CurrentScenarioStatusDescription {get; set; } /// /// Gets or sets the recovery plan groups. /// - [JsonProperty(PropertyName = "groups")] - public IList Groups { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "groups")] + public System.Collections.Generic.IList Groups {get; set; } /// /// Gets or sets the provider id and provider specific details. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public IList ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public System.Collections.Generic.IList ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProtectedItem.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProtectedItem.cs index adf2468185de..2ed700ea8960 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProtectedItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public RecoveryPlanProtectedItem() /// /// Initializes a new instance of the RecoveryPlanProtectedItem class. /// - /// The ARM Id of the recovery plan protected - /// item. - /// The virtual machine Id. + + /// The ARM Id of the recovery plan protected item. + /// + + /// The virtual machine Id. + /// public RecoveryPlanProtectedItem(string id = default(string), string virtualMachineId = default(string)) + { - Id = id; - VirtualMachineId = virtualMachineId; + this.Id = id; + this.VirtualMachineId = virtualMachineId; CustomInit(); } @@ -44,17 +42,17 @@ public RecoveryPlanProtectedItem() /// partial void CustomInit(); + /// /// Gets or sets the ARM Id of the recovery plan protected item. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the virtual machine Id. /// - [JsonProperty(PropertyName = "virtualMachineId")] - public string VirtualMachineId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachineId")] + public string VirtualMachineId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificDetails.cs index 32eb9f0bd3bf..ee5a4fb139b8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanProviderSpecificDetails { /// - /// Initializes a new instance of the - /// RecoveryPlanProviderSpecificDetails class. + /// Initializes a new instance of the RecoveryPlanProviderSpecificDetails class. /// public RecoveryPlanProviderSpecificDetails() { @@ -35,4 +28,4 @@ public RecoveryPlanProviderSpecificDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificFailoverInput.cs index 58974c56862e..03e7d0eab60b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificFailoverInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanProviderSpecificFailoverInput { /// - /// Initializes a new instance of the - /// RecoveryPlanProviderSpecificFailoverInput class. + /// Initializes a new instance of the RecoveryPlanProviderSpecificFailoverInput class. /// public RecoveryPlanProviderSpecificFailoverInput() { @@ -35,4 +28,4 @@ public RecoveryPlanProviderSpecificFailoverInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificInput.cs index bb49c3e1595d..46f954e684b1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanProviderSpecificInput { /// - /// Initializes a new instance of the RecoveryPlanProviderSpecificInput - /// class. + /// Initializes a new instance of the RecoveryPlanProviderSpecificInput class. /// public RecoveryPlanProviderSpecificInput() { @@ -35,4 +28,4 @@ public RecoveryPlanProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanScriptActionDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanScriptActionDetails.cs index b3d264e9cb0b..e203e7b38890 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanScriptActionDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanScriptActionDetails.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanScriptActionDetails : RecoveryPlanActionDetails { /// - /// Initializes a new instance of the RecoveryPlanScriptActionDetails - /// class. + /// Initializes a new instance of the RecoveryPlanScriptActionDetails class. /// public RecoveryPlanScriptActionDetails() { @@ -30,18 +22,23 @@ public RecoveryPlanScriptActionDetails() } /// - /// Initializes a new instance of the RecoveryPlanScriptActionDetails - /// class. + /// Initializes a new instance of the RecoveryPlanScriptActionDetails class. /// - /// The script path. - /// The fabric location. Possible values - /// include: 'Primary', 'Recovery' - /// The script timeout. + + /// The script path. + /// + + /// The script timeout. + /// + + /// The fabric location. + /// Possible values include: 'Primary', 'Recovery' public RecoveryPlanScriptActionDetails(string path, string fabricLocation, string timeout = default(string)) + { - Path = path; - Timeout = timeout; - FabricLocation = fabricLocation; + this.Path = path; + this.Timeout = timeout; + this.FabricLocation = fabricLocation; CustomInit(); } @@ -50,41 +47,43 @@ public RecoveryPlanScriptActionDetails() /// partial void CustomInit(); + /// /// Gets or sets the script path. /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } /// /// Gets or sets the script timeout. /// - [JsonProperty(PropertyName = "timeout")] - public string Timeout { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "timeout")] + public string Timeout {get; set; } /// - /// Gets or sets the fabric location. Possible values include: - /// 'Primary', 'Recovery' + /// Gets or sets the fabric location. Possible values include: 'Primary', 'Recovery' /// - [JsonProperty(PropertyName = "fabricLocation")] - public string FabricLocation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricLocation")] + public string FabricLocation {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Path == null) + if (this.Path == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Path"); } - if (FabricLocation == null) + if (this.FabricLocation == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FabricLocation"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FabricLocation"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanShutdownGroupTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanShutdownGroupTaskDetails.cs index 646779cff7e6..068a16df97aa 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanShutdownGroupTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanShutdownGroupTaskDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanShutdownGroupTaskDetails : RecoveryPlanGroupTaskDetails { /// - /// Initializes a new instance of the - /// RecoveryPlanShutdownGroupTaskDetails class. + /// Initializes a new instance of the RecoveryPlanShutdownGroupTaskDetails class. /// public RecoveryPlanShutdownGroupTaskDetails() { @@ -31,15 +22,23 @@ public RecoveryPlanShutdownGroupTaskDetails() } /// - /// Initializes a new instance of the - /// RecoveryPlanShutdownGroupTaskDetails class. + /// Initializes a new instance of the RecoveryPlanShutdownGroupTaskDetails class. /// - /// The child tasks. - /// The name. - /// The group identifier. - /// The group type. - public RecoveryPlanShutdownGroupTaskDetails(IList childTasks = default(IList), string name = default(string), string groupId = default(string), string rpGroupType = default(string)) - : base(childTasks, name, groupId, rpGroupType) + + /// The child tasks. + /// + + /// The name. + /// + + /// The group identifier. + /// + + /// The group type. + /// + public RecoveryPlanShutdownGroupTaskDetails(System.Collections.Generic.IList childTasks = default(System.Collections.Generic.IList), string name = default(string), string groupId = default(string), string rpGroupType = default(string)) + + : base(childTasks, name, groupId, rpGroupType) { CustomInit(); } @@ -50,4 +49,4 @@ public RecoveryPlanShutdownGroupTaskDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverCleanupInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverCleanupInput.cs index 201391cc4c1f..2b7ff57f901f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverCleanupInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverCleanupInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanTestFailoverCleanupInput { /// - /// Initializes a new instance of the - /// RecoveryPlanTestFailoverCleanupInput class. + /// Initializes a new instance of the RecoveryPlanTestFailoverCleanupInput class. /// public RecoveryPlanTestFailoverCleanupInput() { @@ -29,14 +21,15 @@ public RecoveryPlanTestFailoverCleanupInput() } /// - /// Initializes a new instance of the - /// RecoveryPlanTestFailoverCleanupInput class. + /// Initializes a new instance of the RecoveryPlanTestFailoverCleanupInput class. /// - /// The recovery plan test failover cleanup - /// input properties. + + /// The recovery plan test failover cleanup input properties. + /// public RecoveryPlanTestFailoverCleanupInput(RecoveryPlanTestFailoverCleanupInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -45,29 +38,28 @@ public RecoveryPlanTestFailoverCleanupInput(RecoveryPlanTestFailoverCleanupInput /// partial void CustomInit(); + /// - /// Gets or sets the recovery plan test failover cleanup input - /// properties. + /// Gets or sets the recovery plan test failover cleanup input properties. /// - [JsonProperty(PropertyName = "properties")] - public RecoveryPlanTestFailoverCleanupInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RecoveryPlanTestFailoverCleanupInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverCleanupInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverCleanupInputProperties.cs index 6bb27f969f09..16ed076d6650 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverCleanupInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverCleanupInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanTestFailoverCleanupInputProperties { /// - /// Initializes a new instance of the - /// RecoveryPlanTestFailoverCleanupInputProperties class. + /// Initializes a new instance of the RecoveryPlanTestFailoverCleanupInputProperties class. /// public RecoveryPlanTestFailoverCleanupInputProperties() { @@ -29,13 +21,15 @@ public RecoveryPlanTestFailoverCleanupInputProperties() } /// - /// Initializes a new instance of the - /// RecoveryPlanTestFailoverCleanupInputProperties class. + /// Initializes a new instance of the RecoveryPlanTestFailoverCleanupInputProperties class. /// - /// The test failover cleanup comments. + + /// The test failover cleanup comments. + /// public RecoveryPlanTestFailoverCleanupInputProperties(string comments = default(string)) + { - Comments = comments; + this.Comments = comments; CustomInit(); } @@ -44,27 +38,27 @@ public RecoveryPlanTestFailoverCleanupInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the test failover cleanup comments. /// - [JsonProperty(PropertyName = "comments")] - public string Comments { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "comments")] + public string Comments {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Comments != null) + if (this.Comments != null) { - if (Comments.Length > 1024) + if (this.Comments.Length > 1024) { - throw new ValidationException(ValidationRules.MaxLength, "Comments", 1024); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Comments", 1024); } } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverInput.cs index 1546c5731b54..d0fecbbbea4c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanTestFailoverInput { /// - /// Initializes a new instance of the RecoveryPlanTestFailoverInput - /// class. + /// Initializes a new instance of the RecoveryPlanTestFailoverInput class. /// public RecoveryPlanTestFailoverInput() { @@ -29,14 +21,15 @@ public RecoveryPlanTestFailoverInput() } /// - /// Initializes a new instance of the RecoveryPlanTestFailoverInput - /// class. + /// Initializes a new instance of the RecoveryPlanTestFailoverInput class. /// - /// The recovery plan test failover input - /// properties. + + /// The recovery plan test failover input properties. + /// public RecoveryPlanTestFailoverInput(RecoveryPlanTestFailoverInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -45,28 +38,28 @@ public RecoveryPlanTestFailoverInput(RecoveryPlanTestFailoverInputProperties pro /// partial void CustomInit(); + /// /// Gets or sets the recovery plan test failover input properties. /// - [JsonProperty(PropertyName = "properties")] - public RecoveryPlanTestFailoverInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RecoveryPlanTestFailoverInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverInputProperties.cs index e6ff95beaf83..db7d3a1839b8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanTestFailoverInputProperties.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanTestFailoverInputProperties { /// - /// Initializes a new instance of the - /// RecoveryPlanTestFailoverInputProperties class. + /// Initializes a new instance of the RecoveryPlanTestFailoverInputProperties class. /// public RecoveryPlanTestFailoverInputProperties() { @@ -31,23 +21,27 @@ public RecoveryPlanTestFailoverInputProperties() } /// - /// Initializes a new instance of the - /// RecoveryPlanTestFailoverInputProperties class. + /// Initializes a new instance of the RecoveryPlanTestFailoverInputProperties class. /// - /// The failover direction. Possible - /// values include: 'PrimaryToRecovery', 'RecoveryToPrimary' - /// The network type to be used for test - /// failover. - /// The Id of the network to be used for test - /// failover. - /// The provider specific - /// properties. - public RecoveryPlanTestFailoverInputProperties(string failoverDirection, string networkType, string networkId = default(string), IList providerSpecificDetails = default(IList)) + + /// The failover direction. + /// Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + + /// The network type to be used for test failover. + /// + + /// The Id of the network to be used for test failover. + /// + + /// The provider specific properties. + /// + public RecoveryPlanTestFailoverInputProperties(string failoverDirection, string networkType, string networkId = default(string), System.Collections.Generic.IList providerSpecificDetails = default(System.Collections.Generic.IList)) + { - FailoverDirection = failoverDirection; - NetworkType = networkType; - NetworkId = networkId; - ProviderSpecificDetails = providerSpecificDetails; + this.FailoverDirection = failoverDirection; + this.NetworkType = networkType; + this.NetworkId = networkId; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -56,47 +50,50 @@ public RecoveryPlanTestFailoverInputProperties() /// partial void CustomInit(); + /// - /// Gets or sets the failover direction. Possible values include: - /// 'PrimaryToRecovery', 'RecoveryToPrimary' + /// Gets or sets the failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' /// - [JsonProperty(PropertyName = "failoverDirection")] - public string FailoverDirection { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection {get; set; } /// /// Gets or sets the network type to be used for test failover. /// - [JsonProperty(PropertyName = "networkType")] - public string NetworkType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkType")] + public string NetworkType {get; set; } /// /// Gets or sets the Id of the network to be used for test failover. /// - [JsonProperty(PropertyName = "networkId")] - public string NetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkId")] + public string NetworkId {get; set; } /// /// Gets or sets the provider specific properties. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public IList ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public System.Collections.Generic.IList ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (FailoverDirection == null) + if (this.FailoverDirection == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FailoverDirection"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FailoverDirection"); } - if (NetworkType == null) + if (this.NetworkType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "NetworkType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "NetworkType"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanUnplannedFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanUnplannedFailoverInput.cs index 4166d5d9d7d5..8c894448a8de 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanUnplannedFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanUnplannedFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanUnplannedFailoverInput { /// - /// Initializes a new instance of the - /// RecoveryPlanUnplannedFailoverInput class. + /// Initializes a new instance of the RecoveryPlanUnplannedFailoverInput class. /// public RecoveryPlanUnplannedFailoverInput() { @@ -29,14 +21,15 @@ public RecoveryPlanUnplannedFailoverInput() } /// - /// Initializes a new instance of the - /// RecoveryPlanUnplannedFailoverInput class. + /// Initializes a new instance of the RecoveryPlanUnplannedFailoverInput class. /// - /// The recovery plan unplanned failover input - /// properties. + + /// The recovery plan unplanned failover input properties. + /// public RecoveryPlanUnplannedFailoverInput(RecoveryPlanUnplannedFailoverInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -45,28 +38,28 @@ public RecoveryPlanUnplannedFailoverInput(RecoveryPlanUnplannedFailoverInputProp /// partial void CustomInit(); + /// /// Gets or sets the recovery plan unplanned failover input properties. /// - [JsonProperty(PropertyName = "properties")] - public RecoveryPlanUnplannedFailoverInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RecoveryPlanUnplannedFailoverInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanUnplannedFailoverInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanUnplannedFailoverInputProperties.cs index 065549926d9e..fab7f5786b28 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanUnplannedFailoverInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPlanUnplannedFailoverInputProperties.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryPlanUnplannedFailoverInputProperties { /// - /// Initializes a new instance of the - /// RecoveryPlanUnplannedFailoverInputProperties class. + /// Initializes a new instance of the RecoveryPlanUnplannedFailoverInputProperties class. /// public RecoveryPlanUnplannedFailoverInputProperties() { @@ -31,21 +21,23 @@ public RecoveryPlanUnplannedFailoverInputProperties() } /// - /// Initializes a new instance of the - /// RecoveryPlanUnplannedFailoverInputProperties class. + /// Initializes a new instance of the RecoveryPlanUnplannedFailoverInputProperties class. /// - /// The failover direction. Possible - /// values include: 'PrimaryToRecovery', 'RecoveryToPrimary' - /// A value indicating whether - /// source site operations are required. Possible values include: - /// 'Required', 'NotRequired' - /// The provider specific - /// properties. - public RecoveryPlanUnplannedFailoverInputProperties(string failoverDirection, string sourceSiteOperations, IList providerSpecificDetails = default(IList)) + + /// The failover direction. + /// Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + + /// A value indicating whether source site operations are required. + /// Possible values include: 'Required', 'NotRequired' + + /// The provider specific properties. + /// + public RecoveryPlanUnplannedFailoverInputProperties(string failoverDirection, string sourceSiteOperations, System.Collections.Generic.IList providerSpecificDetails = default(System.Collections.Generic.IList)) + { - FailoverDirection = failoverDirection; - SourceSiteOperations = sourceSiteOperations; - ProviderSpecificDetails = providerSpecificDetails; + this.FailoverDirection = failoverDirection; + this.SourceSiteOperations = sourceSiteOperations; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -54,42 +46,44 @@ public RecoveryPlanUnplannedFailoverInputProperties() /// partial void CustomInit(); + /// - /// Gets or sets the failover direction. Possible values include: - /// 'PrimaryToRecovery', 'RecoveryToPrimary' + /// Gets or sets the failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' /// - [JsonProperty(PropertyName = "failoverDirection")] - public string FailoverDirection { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection {get; set; } /// /// Gets or sets a value indicating whether source site operations are - /// required. Possible values include: 'Required', 'NotRequired' + /// required. Possible values include: 'Required', 'NotRequired' /// - [JsonProperty(PropertyName = "sourceSiteOperations")] - public string SourceSiteOperations { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceSiteOperations")] + public string SourceSiteOperations {get; set; } /// /// Gets or sets the provider specific properties. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public IList ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public System.Collections.Generic.IList ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (FailoverDirection == null) + if (this.FailoverDirection == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "FailoverDirection"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FailoverDirection"); } - if (SourceSiteOperations == null) + if (this.SourceSiteOperations == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "SourceSiteOperations"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SourceSiteOperations"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPoint.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPoint.cs index 6aea1e61c6a9..e31f4c271b27 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPoint.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public RecoveryPoint() /// /// Initializes a new instance of the RecoveryPoint class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The recovery point properties. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The recovery point properties. + /// public RecoveryPoint(string id = default(string), string name = default(string), string type = default(string), string location = default(string), RecoveryPointProperties properties = default(RecoveryPointProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public RecoveryPoint() /// partial void CustomInit(); + /// /// Gets or sets the recovery point properties. /// - [JsonProperty(PropertyName = "properties")] - public RecoveryPointProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RecoveryPointProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointProperties.cs index 6b80e86e7aab..59066e8d4e63 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,21 @@ public RecoveryPointProperties() /// /// Initializes a new instance of the RecoveryPointProperties class. /// - /// The recovery point time. - /// The recovery point type: - /// ApplicationConsistent, CrashConsistent. - /// The provider specific details - /// for the recovery point. + + /// The recovery point time. + /// + + /// The recovery point type: ApplicationConsistent, CrashConsistent. + /// + + /// The provider specific details for the recovery point. + /// public RecoveryPointProperties(System.DateTime? recoveryPointTime = default(System.DateTime?), string recoveryPointType = default(string), ProviderSpecificRecoveryPointDetails providerSpecificDetails = default(ProviderSpecificRecoveryPointDetails)) + { - RecoveryPointTime = recoveryPointTime; - RecoveryPointType = recoveryPointType; - ProviderSpecificDetails = providerSpecificDetails; + this.RecoveryPointTime = recoveryPointTime; + this.RecoveryPointType = recoveryPointType; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -47,24 +46,24 @@ public RecoveryPointProperties() /// partial void CustomInit(); + /// /// Gets or sets the recovery point time. /// - [JsonProperty(PropertyName = "recoveryPointTime")] - public System.DateTime? RecoveryPointTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime {get; set; } /// /// Gets or sets the recovery point type: ApplicationConsistent, /// CrashConsistent. /// - [JsonProperty(PropertyName = "recoveryPointType")] - public string RecoveryPointType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType {get; set; } /// /// Gets or sets the provider specific details for the recovery point. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public ProviderSpecificRecoveryPointDetails ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public ProviderSpecificRecoveryPointDetails ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointSyncType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointSyncType.cs index cc1011323f10..a141d03c1834 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointSyncType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointSyncType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for RecoveryPointSyncType. /// + + public static class RecoveryPointSyncType { public const string MultiVmSyncRecoveryPoint = "MultiVmSyncRecoveryPoint"; public const string PerVmRecoveryPoint = "PerVmRecoveryPoint"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointType.cs index 776b6d9b4081..d2f71817de64 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryPointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for RecoveryPointType. /// + + public static class RecoveryPointType { public const string LatestTime = "LatestTime"; public const string LatestTag = "LatestTag"; public const string Custom = "Custom"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryProximityPlacementGroupCustomDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryProximityPlacementGroupCustomDetails.cs index e89a5372612c..ddbb76baefdc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryProximityPlacementGroupCustomDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryProximityPlacementGroupCustomDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryProximityPlacementGroupCustomDetails { /// - /// Initializes a new instance of the - /// RecoveryProximityPlacementGroupCustomDetails class. + /// Initializes a new instance of the RecoveryProximityPlacementGroupCustomDetails class. /// public RecoveryProximityPlacementGroupCustomDetails() { @@ -35,4 +28,4 @@ public RecoveryProximityPlacementGroupCustomDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryResourceGroupCustomDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryResourceGroupCustomDetails.cs index ee14147f6101..d723147df57a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryResourceGroupCustomDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryResourceGroupCustomDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryResourceGroupCustomDetails { /// - /// Initializes a new instance of the - /// RecoveryResourceGroupCustomDetails class. + /// Initializes a new instance of the RecoveryResourceGroupCustomDetails class. /// public RecoveryResourceGroupCustomDetails() { @@ -35,4 +28,4 @@ public RecoveryResourceGroupCustomDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryServicesProvider.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryServicesProvider.cs index c9b817b864b8..f935f101ed9b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryServicesProvider.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryServicesProvider.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public RecoveryServicesProvider() /// /// Initializes a new instance of the RecoveryServicesProvider class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// Provider properties. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// Provider properties. + /// public RecoveryServicesProvider(string id = default(string), string name = default(string), string type = default(string), string location = default(string), RecoveryServicesProviderProperties properties = default(RecoveryServicesProviderProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public RecoveryServicesProvider() /// partial void CustomInit(); + /// /// Gets or sets provider properties. /// - [JsonProperty(PropertyName = "properties")] - public RecoveryServicesProviderProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RecoveryServicesProviderProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryServicesProviderProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryServicesProviderProperties.cs index 350857e29cd1..30911c113761 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryServicesProviderProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryServicesProviderProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryServicesProviderProperties { /// - /// Initializes a new instance of the - /// RecoveryServicesProviderProperties class. + /// Initializes a new instance of the RecoveryServicesProviderProperties class. /// public RecoveryServicesProviderProperties() { @@ -30,61 +21,91 @@ public RecoveryServicesProviderProperties() } /// - /// Initializes a new instance of the - /// RecoveryServicesProviderProperties class. - /// - /// Type of the site. - /// Friendly name of the DRA. - /// The provider version. - /// The fabric provider. - /// DRA version status. - /// Expiry date of the - /// version. - /// The fabric friendly name. - /// Time when last heartbeat was sent by - /// the DRA. - /// A value indicating whether DRA is - /// responsive. - /// Number of protected VMs currently - /// managed by the DRA. - /// The scenarios allowed on this - /// provider. - /// The recovery services provider - /// health error details. - /// The DRA Id. - /// The machine Id. - /// The machine name. - /// The Bios Id. - /// The authentication - /// identity details. - /// The resource access - /// identity details. - /// The data plane - /// authentication identity details. - /// The provider version - /// details. - public RecoveryServicesProviderProperties(string fabricType = default(string), string friendlyName = default(string), string providerVersion = default(string), string serverVersion = default(string), string providerVersionState = default(string), System.DateTime? providerVersionExpiryDate = default(System.DateTime?), string fabricFriendlyName = default(string), System.DateTime? lastHeartBeat = default(System.DateTime?), string connectionStatus = default(string), int? protectedItemCount = default(int?), IList allowedScenarios = default(IList), IList healthErrorDetails = default(IList), string draIdentifier = default(string), string machineId = default(string), string machineName = default(string), string biosId = default(string), IdentityProviderDetails authenticationIdentityDetails = default(IdentityProviderDetails), IdentityProviderDetails resourceAccessIdentityDetails = default(IdentityProviderDetails), IdentityProviderDetails dataPlaneAuthenticationIdentityDetails = default(IdentityProviderDetails), VersionDetails providerVersionDetails = default(VersionDetails)) + /// Initializes a new instance of the RecoveryServicesProviderProperties class. + /// + + /// Type of the site. + /// + + /// Friendly name of the DRA. + /// + + /// The provider version. + /// + + /// The fabric provider. + /// + + /// DRA version status. + /// + + /// Expiry date of the version. + /// + + /// The fabric friendly name. + /// + + /// Time when last heartbeat was sent by the DRA. + /// + + /// A value indicating whether DRA is responsive. + /// + + /// Number of protected VMs currently managed by the DRA. + /// + + /// The scenarios allowed on this provider. + /// + + /// The recovery services provider health error details. + /// + + /// The DRA Id. + /// + + /// The machine Id. + /// + + /// The machine name. + /// + + /// The Bios Id. + /// + + /// The authentication identity details. + /// + + /// The resource access identity details. + /// + + /// The data plane authentication identity details. + /// + + /// The provider version details. + /// + public RecoveryServicesProviderProperties(string fabricType = default(string), string friendlyName = default(string), string providerVersion = default(string), string serverVersion = default(string), string providerVersionState = default(string), System.DateTime? providerVersionExpiryDate = default(System.DateTime?), string fabricFriendlyName = default(string), System.DateTime? lastHeartBeat = default(System.DateTime?), string connectionStatus = default(string), int? protectedItemCount = default(int?), System.Collections.Generic.IList allowedScenarios = default(System.Collections.Generic.IList), System.Collections.Generic.IList healthErrorDetails = default(System.Collections.Generic.IList), string draIdentifier = default(string), string machineId = default(string), string machineName = default(string), string biosId = default(string), IdentityProviderDetails authenticationIdentityDetails = default(IdentityProviderDetails), IdentityProviderDetails resourceAccessIdentityDetails = default(IdentityProviderDetails), IdentityProviderDetails dataPlaneAuthenticationIdentityDetails = default(IdentityProviderDetails), VersionDetails providerVersionDetails = default(VersionDetails)) + { - FabricType = fabricType; - FriendlyName = friendlyName; - ProviderVersion = providerVersion; - ServerVersion = serverVersion; - ProviderVersionState = providerVersionState; - ProviderVersionExpiryDate = providerVersionExpiryDate; - FabricFriendlyName = fabricFriendlyName; - LastHeartBeat = lastHeartBeat; - ConnectionStatus = connectionStatus; - ProtectedItemCount = protectedItemCount; - AllowedScenarios = allowedScenarios; - HealthErrorDetails = healthErrorDetails; - DraIdentifier = draIdentifier; - MachineId = machineId; - MachineName = machineName; - BiosId = biosId; - AuthenticationIdentityDetails = authenticationIdentityDetails; - ResourceAccessIdentityDetails = resourceAccessIdentityDetails; - DataPlaneAuthenticationIdentityDetails = dataPlaneAuthenticationIdentityDetails; - ProviderVersionDetails = providerVersionDetails; + this.FabricType = fabricType; + this.FriendlyName = friendlyName; + this.ProviderVersion = providerVersion; + this.ServerVersion = serverVersion; + this.ProviderVersionState = providerVersionState; + this.ProviderVersionExpiryDate = providerVersionExpiryDate; + this.FabricFriendlyName = fabricFriendlyName; + this.LastHeartBeat = lastHeartBeat; + this.ConnectionStatus = connectionStatus; + this.ProtectedItemCount = protectedItemCount; + this.AllowedScenarios = allowedScenarios; + this.HealthErrorDetails = healthErrorDetails; + this.DraIdentifier = draIdentifier; + this.MachineId = machineId; + this.MachineName = machineName; + this.BiosId = biosId; + this.AuthenticationIdentityDetails = authenticationIdentityDetails; + this.ResourceAccessIdentityDetails = resourceAccessIdentityDetails; + this.DataPlaneAuthenticationIdentityDetails = dataPlaneAuthenticationIdentityDetails; + this.ProviderVersionDetails = providerVersionDetails; CustomInit(); } @@ -93,125 +114,125 @@ public RecoveryServicesProviderProperties() /// partial void CustomInit(); + /// /// Gets or sets type of the site. /// - [JsonProperty(PropertyName = "fabricType")] - public string FabricType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricType")] + public string FabricType {get; set; } /// /// Gets or sets friendly name of the DRA. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the provider version. /// - [JsonProperty(PropertyName = "providerVersion")] - public string ProviderVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "providerVersion")] + public string ProviderVersion {get; set; } /// /// Gets or sets the fabric provider. /// - [JsonProperty(PropertyName = "serverVersion")] - public string ServerVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serverVersion")] + public string ServerVersion {get; set; } /// - /// Gets or sets DRA version status. + /// Gets or sets dRA version status. /// - [JsonProperty(PropertyName = "providerVersionState")] - public string ProviderVersionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "providerVersionState")] + public string ProviderVersionState {get; set; } /// /// Gets or sets expiry date of the version. /// - [JsonProperty(PropertyName = "providerVersionExpiryDate")] - public System.DateTime? ProviderVersionExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "providerVersionExpiryDate")] + public System.DateTime? ProviderVersionExpiryDate {get; set; } /// /// Gets or sets the fabric friendly name. /// - [JsonProperty(PropertyName = "fabricFriendlyName")] - public string FabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricFriendlyName")] + public string FabricFriendlyName {get; set; } /// /// Gets or sets time when last heartbeat was sent by the DRA. /// - [JsonProperty(PropertyName = "lastHeartBeat")] - public System.DateTime? LastHeartBeat { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartBeat")] + public System.DateTime? LastHeartBeat {get; set; } /// /// Gets or sets a value indicating whether DRA is responsive. /// - [JsonProperty(PropertyName = "connectionStatus")] - public string ConnectionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "connectionStatus")] + public string ConnectionStatus {get; set; } /// /// Gets or sets number of protected VMs currently managed by the DRA. /// - [JsonProperty(PropertyName = "protectedItemCount")] - public int? ProtectedItemCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemCount")] + public int? ProtectedItemCount {get; set; } /// /// Gets or sets the scenarios allowed on this provider. /// - [JsonProperty(PropertyName = "allowedScenarios")] - public IList AllowedScenarios { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedScenarios")] + public System.Collections.Generic.IList AllowedScenarios {get; set; } /// /// Gets or sets the recovery services provider health error details. /// - [JsonProperty(PropertyName = "healthErrorDetails")] - public IList HealthErrorDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrorDetails")] + public System.Collections.Generic.IList HealthErrorDetails {get; set; } /// /// Gets or sets the DRA Id. /// - [JsonProperty(PropertyName = "draIdentifier")] - public string DraIdentifier { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "draIdentifier")] + public string DraIdentifier {get; set; } /// /// Gets or sets the machine Id. /// - [JsonProperty(PropertyName = "machineId")] - public string MachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "machineId")] + public string MachineId {get; set; } /// /// Gets or sets the machine name. /// - [JsonProperty(PropertyName = "machineName")] - public string MachineName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "machineName")] + public string MachineName {get; set; } /// /// Gets or sets the Bios Id. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; set; } /// /// Gets or sets the authentication identity details. /// - [JsonProperty(PropertyName = "authenticationIdentityDetails")] - public IdentityProviderDetails AuthenticationIdentityDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "authenticationIdentityDetails")] + public IdentityProviderDetails AuthenticationIdentityDetails {get; set; } /// /// Gets or sets the resource access identity details. /// - [JsonProperty(PropertyName = "resourceAccessIdentityDetails")] - public IdentityProviderDetails ResourceAccessIdentityDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceAccessIdentityDetails")] + public IdentityProviderDetails ResourceAccessIdentityDetails {get; set; } /// /// Gets or sets the data plane authentication identity details. /// - [JsonProperty(PropertyName = "dataPlaneAuthenticationIdentityDetails")] - public IdentityProviderDetails DataPlaneAuthenticationIdentityDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataPlaneAuthenticationIdentityDetails")] + public IdentityProviderDetails DataPlaneAuthenticationIdentityDetails {get; set; } /// /// Gets or sets the provider version details. /// - [JsonProperty(PropertyName = "providerVersionDetails")] - public VersionDetails ProviderVersionDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerVersionDetails")] + public VersionDetails ProviderVersionDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryVirtualNetworkCustomDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryVirtualNetworkCustomDetails.cs index 12cb40b3e1e8..e64537249ac3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryVirtualNetworkCustomDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RecoveryVirtualNetworkCustomDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RecoveryVirtualNetworkCustomDetails { /// - /// Initializes a new instance of the - /// RecoveryVirtualNetworkCustomDetails class. + /// Initializes a new instance of the RecoveryVirtualNetworkCustomDetails class. /// public RecoveryVirtualNetworkCustomDetails() { @@ -35,4 +28,4 @@ public RecoveryVirtualNetworkCustomDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksInput.cs index 068663d98659..8056e15a6c76 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public RemoveDisksInput() /// /// Initializes a new instance of the RemoveDisksInput class. /// - /// Remove disk input properties. + + /// Remove disk input properties. + /// public RemoveDisksInput(RemoveDisksInputProperties properties = default(RemoveDisksInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public RemoveDisksInput() /// partial void CustomInit(); + /// /// Gets or sets remove disk input properties. /// - [JsonProperty(PropertyName = "properties")] - public RemoveDisksInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RemoveDisksInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksInputProperties.cs index b2155be99edd..d43d091d8d30 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,16 @@ public RemoveDisksInputProperties() /// /// Initializes a new instance of the RemoveDisksInputProperties class. /// - /// The ReplicationProviderInput. - /// For HyperVReplicaAzure provider, it will be + + /// The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be /// AzureEnableProtectionInput object. For San provider, it will be - /// SanEnableProtectionInput object. For HyperVReplicaAzure provider, - /// it can be null. + /// SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be + /// null. + /// public RemoveDisksInputProperties(RemoveDisksProviderSpecificInput providerSpecificDetails = default(RemoveDisksProviderSpecificInput)) + { - ProviderSpecificDetails = providerSpecificDetails; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -45,14 +41,14 @@ public RemoveDisksInputProperties() /// partial void CustomInit(); + /// - /// Gets or sets the ReplicationProviderInput. For HyperVReplicaAzure - /// provider, it will be AzureEnableProtectionInput object. For San - /// provider, it will be SanEnableProtectionInput object. For - /// HyperVReplicaAzure provider, it can be null. + /// Gets or sets the ReplicationProviderInput. For HyperVReplicaAzure provider, + /// it will be AzureEnableProtectionInput object. For San provider, it will be + /// SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be + /// null. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public RemoveDisksProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public RemoveDisksProviderSpecificInput ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksProviderSpecificInput.cs index 0bef2cf351cc..68567ddd1fb5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveDisksProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RemoveDisksProviderSpecificInput { /// - /// Initializes a new instance of the RemoveDisksProviderSpecificInput - /// class. + /// Initializes a new instance of the RemoveDisksProviderSpecificInput class. /// public RemoveDisksProviderSpecificInput() { @@ -35,4 +28,4 @@ public RemoveDisksProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveProtectionContainerMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveProtectionContainerMappingInput.cs index fdb5a03f0bc2..34f9d1dcfd20 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveProtectionContainerMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveProtectionContainerMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RemoveProtectionContainerMappingInput { /// - /// Initializes a new instance of the - /// RemoveProtectionContainerMappingInput class. + /// Initializes a new instance of the RemoveProtectionContainerMappingInput class. /// public RemoveProtectionContainerMappingInput() { @@ -28,14 +21,15 @@ public RemoveProtectionContainerMappingInput() } /// - /// Initializes a new instance of the - /// RemoveProtectionContainerMappingInput class. + /// Initializes a new instance of the RemoveProtectionContainerMappingInput class. /// - /// Configure protection input - /// properties. + + /// Configure protection input properties. + /// public RemoveProtectionContainerMappingInput(RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -44,11 +38,11 @@ public RemoveProtectionContainerMappingInput() /// partial void CustomInit(); + /// /// Gets or sets configure protection input properties. /// - [JsonProperty(PropertyName = "properties")] - public RemoveProtectionContainerMappingInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RemoveProtectionContainerMappingInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveProtectionContainerMappingInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveProtectionContainerMappingInputProperties.cs index ca2bf684cd13..25a31f385548 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveProtectionContainerMappingInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RemoveProtectionContainerMappingInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RemoveProtectionContainerMappingInputProperties { /// - /// Initializes a new instance of the - /// RemoveProtectionContainerMappingInputProperties class. + /// Initializes a new instance of the RemoveProtectionContainerMappingInputProperties class. /// public RemoveProtectionContainerMappingInputProperties() { @@ -28,14 +21,15 @@ public RemoveProtectionContainerMappingInputProperties() } /// - /// Initializes a new instance of the - /// RemoveProtectionContainerMappingInputProperties class. + /// Initializes a new instance of the RemoveProtectionContainerMappingInputProperties class. /// - /// Provider specific input for - /// unpairing. + + /// Provider specific input for unpairing. + /// public RemoveProtectionContainerMappingInputProperties(ReplicationProviderContainerUnmappingInput providerSpecificInput = default(ReplicationProviderContainerUnmappingInput)) + { - ProviderSpecificInput = providerSpecificInput; + this.ProviderSpecificInput = providerSpecificInput; CustomInit(); } @@ -44,11 +38,11 @@ public RemoveProtectionContainerMappingInputProperties() /// partial void CustomInit(); + /// /// Gets or sets provider specific input for unpairing. /// - [JsonProperty(PropertyName = "providerSpecificInput")] - public ReplicationProviderContainerUnmappingInput ProviderSpecificInput { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificInput")] + public ReplicationProviderContainerUnmappingInput ProviderSpecificInput {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RenewCertificateInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RenewCertificateInput.cs index 6731f7a7ca99..6791073926a2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RenewCertificateInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RenewCertificateInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public RenewCertificateInput() /// /// Initializes a new instance of the RenewCertificateInput class. /// - /// Renew certificate input - /// properties. + + /// Renew certificate input properties. + /// public RenewCertificateInput(RenewCertificateInputProperties properties = default(RenewCertificateInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,11 +38,11 @@ public RenewCertificateInput() /// partial void CustomInit(); + /// /// Gets or sets renew certificate input properties. /// - [JsonProperty(PropertyName = "properties")] - public RenewCertificateInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RenewCertificateInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RenewCertificateInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RenewCertificateInputProperties.cs index ce54464dc2c3..24914ecff589 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RenewCertificateInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RenewCertificateInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class RenewCertificateInputProperties { /// - /// Initializes a new instance of the RenewCertificateInputProperties - /// class. + /// Initializes a new instance of the RenewCertificateInputProperties class. /// public RenewCertificateInputProperties() { @@ -28,13 +21,15 @@ public RenewCertificateInputProperties() } /// - /// Initializes a new instance of the RenewCertificateInputProperties - /// class. + /// Initializes a new instance of the RenewCertificateInputProperties class. /// - /// Renew certificate type. + + /// Renew certificate type. + /// public RenewCertificateInputProperties(string renewCertificateType = default(string)) + { - RenewCertificateType = renewCertificateType; + this.RenewCertificateType = renewCertificateType; CustomInit(); } @@ -43,11 +38,11 @@ public RenewCertificateInputProperties() /// partial void CustomInit(); + /// /// Gets or sets renew certificate type. /// - [JsonProperty(PropertyName = "renewCertificateType")] - public string RenewCertificateType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "renewCertificateType")] + public string RenewCertificateType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationAgentDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationAgentDetails.cs index b6cb1707f543..0e3e272252d1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationAgentDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationAgentDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,28 +23,45 @@ public ReplicationAgentDetails() /// /// Initializes a new instance of the ReplicationAgentDetails class. /// - /// The replication agent Id. - /// The replication agent name. - /// The replication agent Bios Id. - /// The fabric object Id. - /// The replication agent Fqdn. - /// The version. - /// The last heartbeat received from the - /// replication agent. - /// The health of the replication agent. Possible - /// values include: 'None', 'Normal', 'Warning', 'Critical' - /// The health errors. - public ReplicationAgentDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), IList healthErrors = default(IList)) + + /// The replication agent Id. + /// + + /// The replication agent name. + /// + + /// The replication agent Bios Id. + /// + + /// The fabric object Id. + /// + + /// The replication agent Fqdn. + /// + + /// The version. + /// + + /// The last heartbeat received from the replication agent. + /// + + /// The health of the replication agent. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + + /// The health errors. + /// + public ReplicationAgentDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList)) + { - Id = id; - Name = name; - BiosId = biosId; - FabricObjectId = fabricObjectId; - Fqdn = fqdn; - Version = version; - LastHeartbeatUtc = lastHeartbeatUtc; - Health = health; - HealthErrors = healthErrors; + this.Id = id; + this.Name = name; + this.BiosId = biosId; + this.FabricObjectId = fabricObjectId; + this.Fqdn = fqdn; + this.Version = version; + this.LastHeartbeatUtc = lastHeartbeatUtc; + this.Health = health; + this.HealthErrors = healthErrors; CustomInit(); } @@ -61,60 +70,59 @@ public ReplicationAgentDetails() /// partial void CustomInit(); + /// /// Gets the replication agent Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the replication agent name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the replication agent Bios Id. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; private set; } /// /// Gets the fabric object Id. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; private set; } /// /// Gets the replication agent Fqdn. /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdn")] + public string Fqdn {get; private set; } /// /// Gets the version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } /// /// Gets the last heartbeat received from the replication agent. /// - [JsonProperty(PropertyName = "lastHeartbeatUtc")] - public System.DateTime? LastHeartbeatUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeatUtc")] + public System.DateTime? LastHeartbeatUtc {get; private set; } /// - /// Gets the health of the replication agent. Possible values include: - /// 'None', 'Normal', 'Warning', 'Critical' + /// Gets the health of the replication agent. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "health")] - public string Health { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; private set; } /// /// Gets the health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationAppliance.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationAppliance.cs index d7afc1d7712b..ce2442fe73ad 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationAppliance.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationAppliance.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public ReplicationAppliance() /// /// Initializes a new instance of the ReplicationAppliance class. /// - /// Appliance related data. + + /// Appliance related data. + /// public ReplicationAppliance(ReplicationApplianceProperties properties = default(ReplicationApplianceProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public ReplicationAppliance() /// partial void CustomInit(); + /// /// Gets or sets appliance related data. /// - [JsonProperty(PropertyName = "properties")] - public ReplicationApplianceProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ReplicationApplianceProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationApplianceProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationApplianceProperties.cs index ecd8355b163e..4379fea5fd99 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationApplianceProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationApplianceProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationApplianceProperties { /// - /// Initializes a new instance of the ReplicationApplianceProperties - /// class. + /// Initializes a new instance of the ReplicationApplianceProperties class. /// public ReplicationApplianceProperties() { @@ -28,14 +21,15 @@ public ReplicationApplianceProperties() } /// - /// Initializes a new instance of the ReplicationApplianceProperties - /// class. + /// Initializes a new instance of the ReplicationApplianceProperties class. /// - /// Provider specific - /// settings. + + /// Provider specific settings. + /// public ReplicationApplianceProperties(ApplianceSpecificDetails providerSpecificDetails = default(ApplianceSpecificDetails)) + { - ProviderSpecificDetails = providerSpecificDetails; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -44,11 +38,11 @@ public ReplicationApplianceProperties() /// partial void CustomInit(); + /// /// Gets or sets provider specific settings. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public ApplianceSpecificDetails ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public ApplianceSpecificDetails ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResults.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResults.cs index cd64f01a82aa..a545ba928f4a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResults.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResults.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationEligibilityResults { /// - /// Initializes a new instance of the ReplicationEligibilityResults - /// class. + /// Initializes a new instance of the ReplicationEligibilityResults class. /// public ReplicationEligibilityResults() { @@ -28,21 +21,27 @@ public ReplicationEligibilityResults() } /// - /// Initializes a new instance of the ReplicationEligibilityResults - /// class. + /// Initializes a new instance of the ReplicationEligibilityResults class. /// - /// Gets the name of this object. - /// Gets the object type. - /// Gets Unique ARM identifier for this - /// object. - /// Gets properties model for replication - /// eligibility results API. + + /// Gets the name of this object. + /// + + /// Gets the object type. + /// + + /// Gets Unique ARM identifier for this object. + /// + + /// Gets properties model for replication eligibility results API. + /// public ReplicationEligibilityResults(string name = default(string), string type = default(string), string id = default(string), ReplicationEligibilityResultsProperties properties = default(ReplicationEligibilityResultsProperties)) + { - Name = name; - Type = type; - Id = id; - Properties = properties; + this.Name = name; + this.Type = type; + this.Id = id; + this.Properties = properties; CustomInit(); } @@ -51,29 +50,29 @@ public ReplicationEligibilityResults() /// partial void CustomInit(); + /// - /// Gets the name of this object. + /// Gets gets the name of this object. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// - /// Gets the object type. + /// Gets gets the object type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// - /// Gets Unique ARM identifier for this object. + /// Gets gets Unique ARM identifier for this object. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// - /// Gets properties model for replication eligibility results API. + /// Gets gets properties model for replication eligibility results API. /// - [JsonProperty(PropertyName = "properties")] - public ReplicationEligibilityResultsProperties Properties { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ReplicationEligibilityResultsProperties Properties {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsCollection.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsCollection.cs index d9b763109776..88ee515b6f21 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsCollection.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsCollection.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationEligibilityResultsCollection { /// - /// Initializes a new instance of the - /// ReplicationEligibilityResultsCollection class. + /// Initializes a new instance of the ReplicationEligibilityResultsCollection class. /// public ReplicationEligibilityResultsCollection() { @@ -30,14 +21,15 @@ public ReplicationEligibilityResultsCollection() } /// - /// Initializes a new instance of the - /// ReplicationEligibilityResultsCollection class. + /// Initializes a new instance of the ReplicationEligibilityResultsCollection class. /// - /// The replication eligibility results - /// details. - public ReplicationEligibilityResultsCollection(IList value = default(IList)) + + /// The replication eligibility results details. + /// + public ReplicationEligibilityResultsCollection(System.Collections.Generic.IList value = default(System.Collections.Generic.IList)) + { - Value = value; + this.Value = value; CustomInit(); } @@ -46,11 +38,11 @@ public ReplicationEligibilityResultsCollection() /// partial void CustomInit(); + /// /// Gets or sets the replication eligibility results details. /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsErrorInfo.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsErrorInfo.cs index 4f235ed58244..8030b2e02aae 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsErrorInfo.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsErrorInfo.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationEligibilityResultsErrorInfo { /// - /// Initializes a new instance of the - /// ReplicationEligibilityResultsErrorInfo class. + /// Initializes a new instance of the ReplicationEligibilityResultsErrorInfo class. /// public ReplicationEligibilityResultsErrorInfo() { @@ -28,21 +21,31 @@ public ReplicationEligibilityResultsErrorInfo() } /// - /// Initializes a new instance of the - /// ReplicationEligibilityResultsErrorInfo class. + /// Initializes a new instance of the ReplicationEligibilityResultsErrorInfo class. /// - /// The error code. - /// The error message. - /// The possible causes. - /// The recommended action. - /// The error status. + + /// The error code. + /// + + /// The error message. + /// + + /// The possible causes. + /// + + /// The recommended action. + /// + + /// The error status. + /// public ReplicationEligibilityResultsErrorInfo(string code = default(string), string message = default(string), string possibleCauses = default(string), string recommendedAction = default(string), string status = default(string)) + { - Code = code; - Message = message; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - Status = status; + this.Code = code; + this.Message = message; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.Status = status; CustomInit(); } @@ -51,35 +54,35 @@ public ReplicationEligibilityResultsErrorInfo() /// partial void CustomInit(); + /// /// Gets or sets the error code. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } /// /// Gets or sets the error message. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } /// /// Gets or sets the possible causes. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; set; } /// /// Gets or sets the recommended action. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; set; } /// /// Gets the error status. /// - [JsonProperty(PropertyName = "status")] - public string Status { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsProperties.cs index e89045027c0e..733fe9faa35d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationEligibilityResultsProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationEligibilityResultsProperties { /// - /// Initializes a new instance of the - /// ReplicationEligibilityResultsProperties class. + /// Initializes a new instance of the ReplicationEligibilityResultsProperties class. /// public ReplicationEligibilityResultsProperties() { @@ -30,15 +21,19 @@ public ReplicationEligibilityResultsProperties() } /// - /// Initializes a new instance of the - /// ReplicationEligibilityResultsProperties class. + /// Initializes a new instance of the ReplicationEligibilityResultsProperties class. /// - /// The client request Id. - /// The error details. - public ReplicationEligibilityResultsProperties(string clientRequestId = default(string), IList errors = default(IList)) + + /// The client request Id. + /// + + /// The error details. + /// + public ReplicationEligibilityResultsProperties(string clientRequestId = default(string), System.Collections.Generic.IList errors = default(System.Collections.Generic.IList)) + { - ClientRequestId = clientRequestId; - Errors = errors; + this.ClientRequestId = clientRequestId; + this.Errors = errors; CustomInit(); } @@ -47,17 +42,17 @@ public ReplicationEligibilityResultsProperties() /// partial void CustomInit(); + /// /// Gets the client request Id. /// - [JsonProperty(PropertyName = "clientRequestId")] - public string ClientRequestId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "clientRequestId")] + public string ClientRequestId {get; private set; } /// /// Gets or sets the error details. /// - [JsonProperty(PropertyName = "errors")] - public IList Errors { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "errors")] + public System.Collections.Generic.IList Errors {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationGroupDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationGroupDetails.cs index 51bba5c93a78..678fcb030ac5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationGroupDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationGroupDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public ReplicationGroupDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItem.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItem.cs index 8a94327a1785..ef1caca020da 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItem.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public ReplicationProtectedItem() /// /// Initializes a new instance of the ReplicationProtectedItem class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The custom data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The custom data. + /// public ReplicationProtectedItem(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ReplicationProtectedItemProperties properties = default(ReplicationProtectedItemProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public ReplicationProtectedItem() /// partial void CustomInit(); + /// /// Gets or sets the custom data. /// - [JsonProperty(PropertyName = "properties")] - public ReplicationProtectedItemProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ReplicationProtectedItemProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemOperation.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemOperation.cs index d32500db1bb0..53a449873a17 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemOperation.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemOperation.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for ReplicationProtectedItemOperation. /// + + public static class ReplicationProtectedItemOperation { public const string ReverseReplicate = "ReverseReplicate"; @@ -31,4 +28,4 @@ public static class ReplicationProtectedItemOperation public const string SwitchProtection = "SwitchProtection"; public const string CompleteMigration = "CompleteMigration"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemProperties.cs index edb10202781a..b33ff3fe46b0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationProtectedItemProperties { /// - /// Initializes a new instance of the - /// ReplicationProtectedItemProperties class. + /// Initializes a new instance of the ReplicationProtectedItemProperties class. /// public ReplicationProtectedItemProperties() { @@ -30,97 +21,134 @@ public ReplicationProtectedItemProperties() } /// - /// Initializes a new instance of the - /// ReplicationProtectedItemProperties class. - /// - /// The name. - /// The type of protected item - /// type. - /// The protected item ARM Id. - /// The recovery provider ARM - /// Id. - /// The friendly name of the - /// primary fabric. - /// The fabric provider of the - /// primary fabric. - /// The friendly name of - /// recovery fabric. - /// The Arm Id of recovery - /// fabric. - /// The name of - /// primary protection container friendly name. - /// The name of - /// recovery container friendly name. - /// The protection status. - /// The protection state - /// description. - /// The Current active location of the - /// PE. - /// The Test failover state. - /// The Test failover state - /// description. - /// The switch provider - /// state. - /// The switch provider - /// state description. - /// The allowed operations on the - /// Replication protected item. - /// The consolidated protection health - /// for the VM taking any issues with SRS as well as all the - /// replication units associated with the VM's replication group into - /// account. This is a string representation of the ProtectionHealth - /// enumeration. - /// The consolidated failover health for - /// the VM. - /// List of health errors. - /// The ID of Policy governing this PE. - /// The name of Policy governing this - /// PE. - /// The Last successful - /// failover time. - /// The Last successful - /// test failover time. - /// The current scenario. - /// The recovery point ARM Id to - /// which the Vm was failed over. - /// The Replication provider - /// custom settings. - /// The recovery container - /// Id. - /// The correlation Id for events - /// associated with this protected item. - public ReplicationProtectedItemProperties(string friendlyName = default(string), string protectedItemType = default(string), string protectableItemId = default(string), string recoveryServicesProviderId = default(string), string primaryFabricFriendlyName = default(string), string primaryFabricProvider = default(string), string recoveryFabricFriendlyName = default(string), string recoveryFabricId = default(string), string primaryProtectionContainerFriendlyName = default(string), string recoveryProtectionContainerFriendlyName = default(string), string protectionState = default(string), string protectionStateDescription = default(string), string activeLocation = default(string), string testFailoverState = default(string), string testFailoverStateDescription = default(string), string switchProviderState = default(string), string switchProviderStateDescription = default(string), IList allowedOperations = default(IList), string replicationHealth = default(string), string failoverHealth = default(string), IList healthErrors = default(IList), string policyId = default(string), string policyFriendlyName = default(string), System.DateTime? lastSuccessfulFailoverTime = default(System.DateTime?), System.DateTime? lastSuccessfulTestFailoverTime = default(System.DateTime?), CurrentScenarioDetails currentScenario = default(CurrentScenarioDetails), string failoverRecoveryPointId = default(string), ReplicationProviderSpecificSettings providerSpecificDetails = default(ReplicationProviderSpecificSettings), string recoveryContainerId = default(string), string eventCorrelationId = default(string)) + /// Initializes a new instance of the ReplicationProtectedItemProperties class. + /// + + /// The name. + /// + + /// The type of protected item type. + /// + + /// The protected item ARM Id. + /// + + /// The recovery provider ARM Id. + /// + + /// The friendly name of the primary fabric. + /// + + /// The fabric provider of the primary fabric. + /// + + /// The friendly name of recovery fabric. + /// + + /// The Arm Id of recovery fabric. + /// + + /// The name of primary protection container friendly name. + /// + + /// The name of recovery container friendly name. + /// + + /// The protection status. + /// + + /// The protection state description. + /// + + /// The Current active location of the PE. + /// + + /// The Test failover state. + /// + + /// The Test failover state description. + /// + + /// The switch provider state. + /// + + /// The switch provider state description. + /// + + /// The allowed operations on the Replication protected item. + /// + + /// The consolidated protection health for the VM taking any issues with SRS as + /// well as all the replication units associated with the VM's replication + /// group into account. This is a string representation of the ProtectionHealth + /// enumeration. + /// + + /// The consolidated failover health for the VM. + /// + + /// List of health errors. + /// + + /// The ID of Policy governing this PE. + /// + + /// The name of Policy governing this PE. + /// + + /// The Last successful failover time. + /// + + /// The Last successful test failover time. + /// + + /// The current scenario. + /// + + /// The recovery point ARM Id to which the Vm was failed over. + /// + + /// The Replication provider custom settings. + /// + + /// The recovery container Id. + /// + + /// The correlation Id for events associated with this protected item. + /// + public ReplicationProtectedItemProperties(string friendlyName = default(string), string protectedItemType = default(string), string protectableItemId = default(string), string recoveryServicesProviderId = default(string), string primaryFabricFriendlyName = default(string), string primaryFabricProvider = default(string), string recoveryFabricFriendlyName = default(string), string recoveryFabricId = default(string), string primaryProtectionContainerFriendlyName = default(string), string recoveryProtectionContainerFriendlyName = default(string), string protectionState = default(string), string protectionStateDescription = default(string), string activeLocation = default(string), string testFailoverState = default(string), string testFailoverStateDescription = default(string), string switchProviderState = default(string), string switchProviderStateDescription = default(string), System.Collections.Generic.IList allowedOperations = default(System.Collections.Generic.IList), string replicationHealth = default(string), string failoverHealth = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList), string policyId = default(string), string policyFriendlyName = default(string), System.DateTime? lastSuccessfulFailoverTime = default(System.DateTime?), System.DateTime? lastSuccessfulTestFailoverTime = default(System.DateTime?), CurrentScenarioDetails currentScenario = default(CurrentScenarioDetails), string failoverRecoveryPointId = default(string), ReplicationProviderSpecificSettings providerSpecificDetails = default(ReplicationProviderSpecificSettings), string recoveryContainerId = default(string), string eventCorrelationId = default(string)) + { - FriendlyName = friendlyName; - ProtectedItemType = protectedItemType; - ProtectableItemId = protectableItemId; - RecoveryServicesProviderId = recoveryServicesProviderId; - PrimaryFabricFriendlyName = primaryFabricFriendlyName; - PrimaryFabricProvider = primaryFabricProvider; - RecoveryFabricFriendlyName = recoveryFabricFriendlyName; - RecoveryFabricId = recoveryFabricId; - PrimaryProtectionContainerFriendlyName = primaryProtectionContainerFriendlyName; - RecoveryProtectionContainerFriendlyName = recoveryProtectionContainerFriendlyName; - ProtectionState = protectionState; - ProtectionStateDescription = protectionStateDescription; - ActiveLocation = activeLocation; - TestFailoverState = testFailoverState; - TestFailoverStateDescription = testFailoverStateDescription; - SwitchProviderState = switchProviderState; - SwitchProviderStateDescription = switchProviderStateDescription; - AllowedOperations = allowedOperations; - ReplicationHealth = replicationHealth; - FailoverHealth = failoverHealth; - HealthErrors = healthErrors; - PolicyId = policyId; - PolicyFriendlyName = policyFriendlyName; - LastSuccessfulFailoverTime = lastSuccessfulFailoverTime; - LastSuccessfulTestFailoverTime = lastSuccessfulTestFailoverTime; - CurrentScenario = currentScenario; - FailoverRecoveryPointId = failoverRecoveryPointId; - ProviderSpecificDetails = providerSpecificDetails; - RecoveryContainerId = recoveryContainerId; - EventCorrelationId = eventCorrelationId; + this.FriendlyName = friendlyName; + this.ProtectedItemType = protectedItemType; + this.ProtectableItemId = protectableItemId; + this.RecoveryServicesProviderId = recoveryServicesProviderId; + this.PrimaryFabricFriendlyName = primaryFabricFriendlyName; + this.PrimaryFabricProvider = primaryFabricProvider; + this.RecoveryFabricFriendlyName = recoveryFabricFriendlyName; + this.RecoveryFabricId = recoveryFabricId; + this.PrimaryProtectionContainerFriendlyName = primaryProtectionContainerFriendlyName; + this.RecoveryProtectionContainerFriendlyName = recoveryProtectionContainerFriendlyName; + this.ProtectionState = protectionState; + this.ProtectionStateDescription = protectionStateDescription; + this.ActiveLocation = activeLocation; + this.TestFailoverState = testFailoverState; + this.TestFailoverStateDescription = testFailoverStateDescription; + this.SwitchProviderState = switchProviderState; + this.SwitchProviderStateDescription = switchProviderStateDescription; + this.AllowedOperations = allowedOperations; + this.ReplicationHealth = replicationHealth; + this.FailoverHealth = failoverHealth; + this.HealthErrors = healthErrors; + this.PolicyId = policyId; + this.PolicyFriendlyName = policyFriendlyName; + this.LastSuccessfulFailoverTime = lastSuccessfulFailoverTime; + this.LastSuccessfulTestFailoverTime = lastSuccessfulTestFailoverTime; + this.CurrentScenario = currentScenario; + this.FailoverRecoveryPointId = failoverRecoveryPointId; + this.ProviderSpecificDetails = providerSpecificDetails; + this.RecoveryContainerId = recoveryContainerId; + this.EventCorrelationId = eventCorrelationId; CustomInit(); } @@ -129,192 +157,189 @@ public ReplicationProtectedItemProperties() /// partial void CustomInit(); + /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the type of protected item type. /// - [JsonProperty(PropertyName = "protectedItemType")] - public string ProtectedItemType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemType")] + public string ProtectedItemType {get; set; } /// /// Gets or sets the protected item ARM Id. /// - [JsonProperty(PropertyName = "protectableItemId")] - public string ProtectableItemId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectableItemId")] + public string ProtectableItemId {get; set; } /// /// Gets or sets the recovery provider ARM Id. /// - [JsonProperty(PropertyName = "recoveryServicesProviderId")] - public string RecoveryServicesProviderId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryServicesProviderId")] + public string RecoveryServicesProviderId {get; set; } /// /// Gets or sets the friendly name of the primary fabric. /// - [JsonProperty(PropertyName = "primaryFabricFriendlyName")] - public string PrimaryFabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricFriendlyName")] + public string PrimaryFabricFriendlyName {get; set; } /// /// Gets or sets the fabric provider of the primary fabric. /// - [JsonProperty(PropertyName = "primaryFabricProvider")] - public string PrimaryFabricProvider { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryFabricProvider")] + public string PrimaryFabricProvider {get; set; } /// /// Gets or sets the friendly name of recovery fabric. /// - [JsonProperty(PropertyName = "recoveryFabricFriendlyName")] - public string RecoveryFabricFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricFriendlyName")] + public string RecoveryFabricFriendlyName {get; set; } /// /// Gets or sets the Arm Id of recovery fabric. /// - [JsonProperty(PropertyName = "recoveryFabricId")] - public string RecoveryFabricId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricId")] + public string RecoveryFabricId {get; set; } /// - /// Gets or sets the name of primary protection container friendly - /// name. + /// Gets or sets the name of primary protection container friendly name. /// - [JsonProperty(PropertyName = "primaryProtectionContainerFriendlyName")] - public string PrimaryProtectionContainerFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "primaryProtectionContainerFriendlyName")] + public string PrimaryProtectionContainerFriendlyName {get; set; } /// /// Gets or sets the name of recovery container friendly name. /// - [JsonProperty(PropertyName = "recoveryProtectionContainerFriendlyName")] - public string RecoveryProtectionContainerFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryProtectionContainerFriendlyName")] + public string RecoveryProtectionContainerFriendlyName {get; set; } /// /// Gets or sets the protection status. /// - [JsonProperty(PropertyName = "protectionState")] - public string ProtectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionState")] + public string ProtectionState {get; set; } /// /// Gets or sets the protection state description. /// - [JsonProperty(PropertyName = "protectionStateDescription")] - public string ProtectionStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectionStateDescription")] + public string ProtectionStateDescription {get; set; } /// /// Gets or sets the Current active location of the PE. /// - [JsonProperty(PropertyName = "activeLocation")] - public string ActiveLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "activeLocation")] + public string ActiveLocation {get; set; } /// /// Gets or sets the Test failover state. /// - [JsonProperty(PropertyName = "testFailoverState")] - public string TestFailoverState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testFailoverState")] + public string TestFailoverState {get; set; } /// /// Gets or sets the Test failover state description. /// - [JsonProperty(PropertyName = "testFailoverStateDescription")] - public string TestFailoverStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testFailoverStateDescription")] + public string TestFailoverStateDescription {get; set; } /// /// Gets or sets the switch provider state. /// - [JsonProperty(PropertyName = "switchProviderState")] - public string SwitchProviderState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "switchProviderState")] + public string SwitchProviderState {get; set; } /// /// Gets or sets the switch provider state description. /// - [JsonProperty(PropertyName = "switchProviderStateDescription")] - public string SwitchProviderStateDescription { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "switchProviderStateDescription")] + public string SwitchProviderStateDescription {get; set; } /// - /// Gets or sets the allowed operations on the Replication protected - /// item. + /// Gets or sets the allowed operations on the Replication protected item. /// - [JsonProperty(PropertyName = "allowedOperations")] - public IList AllowedOperations { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedOperations")] + public System.Collections.Generic.IList AllowedOperations {get; set; } /// - /// Gets or sets the consolidated protection health for the VM taking - /// any issues with SRS as well as all the replication units associated - /// with the VM's replication group into account. This is a string - /// representation of the ProtectionHealth enumeration. + /// Gets or sets the consolidated protection health for the VM taking any + /// issues with SRS as well as all the replication units associated with the + /// VM's replication group into account. This is a string representation of the + /// ProtectionHealth enumeration. /// - [JsonProperty(PropertyName = "replicationHealth")] - public string ReplicationHealth { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationHealth")] + public string ReplicationHealth {get; set; } /// /// Gets or sets the consolidated failover health for the VM. /// - [JsonProperty(PropertyName = "failoverHealth")] - public string FailoverHealth { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverHealth")] + public string FailoverHealth {get; set; } /// /// Gets or sets list of health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; set; } /// /// Gets or sets the ID of Policy governing this PE. /// - [JsonProperty(PropertyName = "policyId")] - public string PolicyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyId")] + public string PolicyId {get; set; } /// /// Gets or sets the name of Policy governing this PE. /// - [JsonProperty(PropertyName = "policyFriendlyName")] - public string PolicyFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "policyFriendlyName")] + public string PolicyFriendlyName {get; set; } /// /// Gets or sets the Last successful failover time. /// - [JsonProperty(PropertyName = "lastSuccessfulFailoverTime")] - public System.DateTime? LastSuccessfulFailoverTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastSuccessfulFailoverTime")] + public System.DateTime? LastSuccessfulFailoverTime {get; set; } /// /// Gets or sets the Last successful test failover time. /// - [JsonProperty(PropertyName = "lastSuccessfulTestFailoverTime")] - public System.DateTime? LastSuccessfulTestFailoverTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastSuccessfulTestFailoverTime")] + public System.DateTime? LastSuccessfulTestFailoverTime {get; set; } /// /// Gets or sets the current scenario. /// - [JsonProperty(PropertyName = "currentScenario")] - public CurrentScenarioDetails CurrentScenario { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "currentScenario")] + public CurrentScenarioDetails CurrentScenario {get; set; } /// - /// Gets or sets the recovery point ARM Id to which the Vm was failed - /// over. + /// Gets or sets the recovery point ARM Id to which the Vm was failed over. /// - [JsonProperty(PropertyName = "failoverRecoveryPointId")] - public string FailoverRecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverRecoveryPointId")] + public string FailoverRecoveryPointId {get; set; } /// /// Gets or sets the Replication provider custom settings. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public ReplicationProviderSpecificSettings ProviderSpecificDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public ReplicationProviderSpecificSettings ProviderSpecificDetails {get; set; } /// /// Gets or sets the recovery container Id. /// - [JsonProperty(PropertyName = "recoveryContainerId")] - public string RecoveryContainerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryContainerId")] + public string RecoveryContainerId {get; set; } /// - /// Gets or sets the correlation Id for events associated with this - /// protected item. + /// Gets or sets the correlation Id for events associated with this protected + /// item. /// - [JsonProperty(PropertyName = "eventCorrelationId")] - public string EventCorrelationId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "eventCorrelationId")] + public string EventCorrelationId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemsUpdateMobilityServiceHeaders.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemsUpdateMobilityServiceHeaders.cs index ffeee43252bb..93c116e2fa80 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemsUpdateMobilityServiceHeaders.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectedItemsUpdateMobilityServiceHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for UpdateMobilityService operation. - /// public partial class ReplicationProtectedItemsUpdateMobilityServiceHeaders { /// - /// Initializes a new instance of the - /// ReplicationProtectedItemsUpdateMobilityServiceHeaders class. + /// Initializes a new instance of the ReplicationProtectedItemsUpdateMobilityServiceHeaders class. /// public ReplicationProtectedItemsUpdateMobilityServiceHeaders() { @@ -28,12 +18,15 @@ public ReplicationProtectedItemsUpdateMobilityServiceHeaders() } /// - /// Initializes a new instance of the - /// ReplicationProtectedItemsUpdateMobilityServiceHeaders class. + /// Initializes a new instance of the ReplicationProtectedItemsUpdateMobilityServiceHeaders class. /// + + /// + /// public ReplicationProtectedItemsUpdateMobilityServiceHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -42,10 +35,11 @@ public ReplicationProtectedItemsUpdateMobilityServiceHeaders() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntent.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntent.cs index 40e4cabab99a..0330ba4b6a17 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntent.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntent.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationProtectionIntent : Resource { /// - /// Initializes a new instance of the ReplicationProtectionIntent - /// class. + /// Initializes a new instance of the ReplicationProtectionIntent class. /// public ReplicationProtectionIntent() { @@ -28,18 +21,28 @@ public ReplicationProtectionIntent() } /// - /// Initializes a new instance of the ReplicationProtectionIntent - /// class. + /// Initializes a new instance of the ReplicationProtectionIntent class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The custom data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The custom data. + /// public ReplicationProtectionIntent(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ReplicationProtectionIntentProperties properties = default(ReplicationProtectionIntentProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -48,11 +51,11 @@ public ReplicationProtectionIntent() /// partial void CustomInit(); + /// /// Gets or sets the custom data. /// - [JsonProperty(PropertyName = "properties")] - public ReplicationProtectionIntentProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ReplicationProtectionIntentProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntentProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntentProperties.cs index c6d55ef7481a..848b2d0d679e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntentProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntentProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationProtectionIntentProperties { /// - /// Initializes a new instance of the - /// ReplicationProtectionIntentProperties class. + /// Initializes a new instance of the ReplicationProtectionIntentProperties class. /// public ReplicationProtectionIntentProperties() { @@ -28,25 +21,35 @@ public ReplicationProtectionIntentProperties() } /// - /// Initializes a new instance of the - /// ReplicationProtectionIntentProperties class. + /// Initializes a new instance of the ReplicationProtectionIntentProperties class. /// - /// The name. - /// The job Id. - /// The job state. - /// A value indicating whether the intent object - /// is active. - /// The creation time in UTC. - /// The Replication provider - /// custom settings. - public ReplicationProtectionIntentProperties(string friendlyName = default(string), string jobId = default(string), string jobState = default(string), bool? isActive = default(bool?), string creationTimeUTC = default(string), ReplicationProtectionIntentProviderSpecificSettings providerSpecificDetails = default(ReplicationProtectionIntentProviderSpecificSettings)) + + /// The name. + /// + + /// The job Id. + /// + + /// The job state. + /// + + /// A value indicating whether the intent object is active. + /// + + /// The creation time in UTC. + /// + + /// The Replication provider custom settings. + /// + public ReplicationProtectionIntentProperties(string friendlyName = default(string), string jobId = default(string), string jobState = default(string), bool? isActive = default(bool?), string creationTimeUtc = default(string), ReplicationProtectionIntentProviderSpecificSettings providerSpecificDetails = default(ReplicationProtectionIntentProviderSpecificSettings)) + { - FriendlyName = friendlyName; - JobId = jobId; - JobState = jobState; - IsActive = isActive; - CreationTimeUTC = creationTimeUTC; - ProviderSpecificDetails = providerSpecificDetails; + this.FriendlyName = friendlyName; + this.JobId = jobId; + this.JobState = jobState; + this.IsActive = isActive; + this.CreationTimeUtc = creationTimeUtc; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -55,41 +58,41 @@ public ReplicationProtectionIntentProperties() /// partial void CustomInit(); + /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets the job Id. /// - [JsonProperty(PropertyName = "jobId")] - public string JobId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobId")] + public string JobId {get; private set; } /// /// Gets the job state. /// - [JsonProperty(PropertyName = "jobState")] - public string JobState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "jobState")] + public string JobState {get; private set; } /// /// Gets a value indicating whether the intent object is active. /// - [JsonProperty(PropertyName = "isActive")] - public bool? IsActive { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isActive")] + public bool? IsActive {get; private set; } /// /// Gets the creation time in UTC. /// - [JsonProperty(PropertyName = "creationTimeUTC")] - public string CreationTimeUTC { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "creationTimeUTC")] + public string CreationTimeUtc {get; private set; } /// /// Gets or sets the Replication provider custom settings. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public ReplicationProtectionIntentProviderSpecificSettings ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public ReplicationProtectionIntentProviderSpecificSettings ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntentProviderSpecificSettings.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntentProviderSpecificSettings.cs index ccb0fcfb2eb7..77ba8c14234a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntentProviderSpecificSettings.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProtectionIntentProviderSpecificSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationProtectionIntentProviderSpecificSettings { /// - /// Initializes a new instance of the - /// ReplicationProtectionIntentProviderSpecificSettings class. + /// Initializes a new instance of the ReplicationProtectionIntentProviderSpecificSettings class. /// public ReplicationProtectionIntentProviderSpecificSettings() { @@ -35,4 +28,4 @@ public ReplicationProtectionIntentProviderSpecificSettings() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderContainerUnmappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderContainerUnmappingInput.cs index 4ac7a1c6c1aa..e80359affa75 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderContainerUnmappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderContainerUnmappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationProviderContainerUnmappingInput { /// - /// Initializes a new instance of the - /// ReplicationProviderContainerUnmappingInput class. + /// Initializes a new instance of the ReplicationProviderContainerUnmappingInput class. /// public ReplicationProviderContainerUnmappingInput() { @@ -28,13 +21,15 @@ public ReplicationProviderContainerUnmappingInput() } /// - /// Initializes a new instance of the - /// ReplicationProviderContainerUnmappingInput class. + /// Initializes a new instance of the ReplicationProviderContainerUnmappingInput class. /// - /// The class type. + + /// The class type. + /// public ReplicationProviderContainerUnmappingInput(string instanceType = default(string)) + { - InstanceType = instanceType; + this.InstanceType = instanceType; CustomInit(); } @@ -43,11 +38,11 @@ public ReplicationProviderContainerUnmappingInput() /// partial void CustomInit(); + /// /// Gets or sets the class type. /// - [JsonProperty(PropertyName = "instanceType")] - public string InstanceType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "instanceType")] + public string InstanceType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificContainerCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificContainerCreationInput.cs index 07ae639bb181..d699c008491b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificContainerCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificContainerCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationProviderSpecificContainerCreationInput { /// - /// Initializes a new instance of the - /// ReplicationProviderSpecificContainerCreationInput class. + /// Initializes a new instance of the ReplicationProviderSpecificContainerCreationInput class. /// public ReplicationProviderSpecificContainerCreationInput() { @@ -35,4 +28,4 @@ public ReplicationProviderSpecificContainerCreationInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificContainerMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificContainerMappingInput.cs index 1b9262b188a7..499529771332 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificContainerMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificContainerMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationProviderSpecificContainerMappingInput { /// - /// Initializes a new instance of the - /// ReplicationProviderSpecificContainerMappingInput class. + /// Initializes a new instance of the ReplicationProviderSpecificContainerMappingInput class. /// public ReplicationProviderSpecificContainerMappingInput() { @@ -35,4 +28,4 @@ public ReplicationProviderSpecificContainerMappingInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificSettings.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificSettings.cs index 47dd021cfd06..db519c5a2de8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificSettings.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationProviderSpecificSettings { /// - /// Initializes a new instance of the - /// ReplicationProviderSpecificSettings class. + /// Initializes a new instance of the ReplicationProviderSpecificSettings class. /// public ReplicationProviderSpecificSettings() { @@ -35,4 +28,4 @@ public ReplicationProviderSpecificSettings() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificUpdateContainerMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificUpdateContainerMappingInput.cs index 7d32ec250901..78e15a536435 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificUpdateContainerMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReplicationProviderSpecificUpdateContainerMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReplicationProviderSpecificUpdateContainerMappingInput { /// - /// Initializes a new instance of the - /// ReplicationProviderSpecificUpdateContainerMappingInput class. + /// Initializes a new instance of the ReplicationProviderSpecificUpdateContainerMappingInput class. /// public ReplicationProviderSpecificUpdateContainerMappingInput() { @@ -35,4 +28,4 @@ public ReplicationProviderSpecificUpdateContainerMappingInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReprotectAgentDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReprotectAgentDetails.cs index 633aa36415cb..8a78a3f13db8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReprotectAgentDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReprotectAgentDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,38 +23,61 @@ public ReprotectAgentDetails() /// /// Initializes a new instance of the ReprotectAgentDetails class. /// - /// The reprotect agent Id. - /// The reprotect agent name. - /// The reprotect agent Bios Id. - /// The fabric object Id. - /// The reprotect agent Fqdn. - /// The version. - /// The last heartbeat received from the - /// reprotect agent. - /// The health of the reprotect agent. Possible - /// values include: 'None', 'Normal', 'Warning', 'Critical' - /// The health errors. - /// The protected item count. - /// The list of accessible - /// datastores fetched from discovery. - /// The Vcenter Id. - /// The last time when SDS information - /// discovered in SRS. - public ReprotectAgentDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), IList healthErrors = default(IList), int? protectedItemCount = default(int?), IList accessibleDatastores = default(IList), string vcenterId = default(string), System.DateTime? lastDiscoveryInUtc = default(System.DateTime?)) + + /// The reprotect agent Id. + /// + + /// The reprotect agent name. + /// + + /// The reprotect agent Bios Id. + /// + + /// The fabric object Id. + /// + + /// The reprotect agent Fqdn. + /// + + /// The version. + /// + + /// The last heartbeat received from the reprotect agent. + /// + + /// The health of the reprotect agent. + /// Possible values include: 'None', 'Normal', 'Warning', 'Critical' + + /// The health errors. + /// + + /// The protected item count. + /// + + /// The list of accessible datastores fetched from discovery. + /// + + /// The Vcenter Id. + /// + + /// The last time when SDS information discovered in SRS. + /// + public ReprotectAgentDetails(string id = default(string), string name = default(string), string biosId = default(string), string fabricObjectId = default(string), string fqdn = default(string), string version = default(string), System.DateTime? lastHeartbeatUtc = default(System.DateTime?), string health = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList), int? protectedItemCount = default(int?), System.Collections.Generic.IList accessibleDatastores = default(System.Collections.Generic.IList), string vcenterId = default(string), System.DateTime? lastDiscoveryInUtc = default(System.DateTime?)) + { - Id = id; - Name = name; - BiosId = biosId; - FabricObjectId = fabricObjectId; - Fqdn = fqdn; - Version = version; - LastHeartbeatUtc = lastHeartbeatUtc; - Health = health; - HealthErrors = healthErrors; - ProtectedItemCount = protectedItemCount; - AccessibleDatastores = accessibleDatastores; - VcenterId = vcenterId; - LastDiscoveryInUtc = lastDiscoveryInUtc; + this.Id = id; + this.Name = name; + this.BiosId = biosId; + this.FabricObjectId = fabricObjectId; + this.Fqdn = fqdn; + this.Version = version; + this.LastHeartbeatUtc = lastHeartbeatUtc; + this.Health = health; + this.HealthErrors = healthErrors; + this.ProtectedItemCount = protectedItemCount; + this.AccessibleDatastores = accessibleDatastores; + this.VcenterId = vcenterId; + this.LastDiscoveryInUtc = lastDiscoveryInUtc; CustomInit(); } @@ -71,84 +86,83 @@ public ReprotectAgentDetails() /// partial void CustomInit(); + /// /// Gets the reprotect agent Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the reprotect agent name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the reprotect agent Bios Id. /// - [JsonProperty(PropertyName = "biosId")] - public string BiosId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "biosId")] + public string BiosId {get; private set; } /// /// Gets the fabric object Id. /// - [JsonProperty(PropertyName = "fabricObjectId")] - public string FabricObjectId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId {get; private set; } /// /// Gets the reprotect agent Fqdn. /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdn")] + public string Fqdn {get; private set; } /// /// Gets the version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } /// /// Gets the last heartbeat received from the reprotect agent. /// - [JsonProperty(PropertyName = "lastHeartbeatUtc")] - public System.DateTime? LastHeartbeatUtc { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeatUtc")] + public System.DateTime? LastHeartbeatUtc {get; private set; } /// - /// Gets the health of the reprotect agent. Possible values include: - /// 'None', 'Normal', 'Warning', 'Critical' + /// Gets the health of the reprotect agent. Possible values include: 'None', 'Normal', 'Warning', 'Critical' /// - [JsonProperty(PropertyName = "health")] - public string Health { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "health")] + public string Health {get; private set; } /// /// Gets the health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; private set; } /// /// Gets the protected item count. /// - [JsonProperty(PropertyName = "protectedItemCount")] - public int? ProtectedItemCount { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemCount")] + public int? ProtectedItemCount {get; private set; } /// /// Gets the list of accessible datastores fetched from discovery. /// - [JsonProperty(PropertyName = "accessibleDatastores")] - public IList AccessibleDatastores { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "accessibleDatastores")] + public System.Collections.Generic.IList AccessibleDatastores {get; private set; } /// /// Gets the Vcenter Id. /// - [JsonProperty(PropertyName = "vcenterId")] - public string VcenterId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vcenterId")] + public string VcenterId {get; private set; } /// /// Gets the last time when SDS information discovered in SRS. /// - [JsonProperty(PropertyName = "lastDiscoveryInUtc")] - public System.DateTime? LastDiscoveryInUtc { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lastDiscoveryInUtc")] + public System.DateTime? LastDiscoveryInUtc {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthError.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthError.cs index 9b5c313a30c1..d23b346703b0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthError.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthError.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public ResolveHealthError() /// /// Initializes a new instance of the ResolveHealthError class. /// - /// Health error id. + + /// Health error id. + /// public ResolveHealthError(string healthErrorId = default(string)) + { - HealthErrorId = healthErrorId; + this.HealthErrorId = healthErrorId; CustomInit(); } @@ -41,11 +38,11 @@ public ResolveHealthError() /// partial void CustomInit(); + /// /// Gets or sets health error id. /// - [JsonProperty(PropertyName = "healthErrorId")] - public string HealthErrorId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrorId")] + public string HealthErrorId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthInput.cs index f6de9d72b8e2..01b1b59197a3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public ResolveHealthInput() /// /// Initializes a new instance of the ResolveHealthInput class. /// - /// Disable resolve health input - /// properties. + + /// Disable resolve health input properties. + /// public ResolveHealthInput(ResolveHealthInputProperties properties = default(ResolveHealthInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,11 +38,11 @@ public ResolveHealthInput() /// partial void CustomInit(); + /// /// Gets or sets disable resolve health input properties. /// - [JsonProperty(PropertyName = "properties")] - public ResolveHealthInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ResolveHealthInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthInputProperties.cs index 54099116c12f..c52faeba64dc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResolveHealthInputProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ResolveHealthInputProperties { /// - /// Initializes a new instance of the ResolveHealthInputProperties - /// class. + /// Initializes a new instance of the ResolveHealthInputProperties class. /// public ResolveHealthInputProperties() { @@ -30,13 +21,15 @@ public ResolveHealthInputProperties() } /// - /// Initializes a new instance of the ResolveHealthInputProperties - /// class. + /// Initializes a new instance of the ResolveHealthInputProperties class. /// - /// Health errors. - public ResolveHealthInputProperties(IList healthErrors = default(IList)) + + /// Health errors. + /// + public ResolveHealthInputProperties(System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList)) + { - HealthErrors = healthErrors; + this.HealthErrors = healthErrors; CustomInit(); } @@ -45,11 +38,11 @@ public ResolveHealthInputProperties() /// partial void CustomInit(); + /// /// Gets or sets health errors. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Resource.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Resource.cs index d57d2c2f8ea5..642044bc0f0f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Resource.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Resource.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; /// /// Azure resource. /// - public partial class Resource : IResource + public partial class Resource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the Resource class. @@ -31,16 +23,25 @@ public Resource() /// /// Initializes a new instance of the Resource class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string)) + { - Id = id; - Name = name; - Type = type; - Location = location; + this.Id = id; + this.Name = name; + this.Type = type; + this.Location = location; CustomInit(); } @@ -49,29 +50,29 @@ public Resource() /// partial void CustomInit(); + /// /// Gets resource Id /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets resource Name /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets resource Type /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets resource Location /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResourceHealthSummary.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResourceHealthSummary.cs index ebc60c186ec1..a848125a1f1f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResourceHealthSummary.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResourceHealthSummary.cs @@ -1,23 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Base class to define the health summary of the resources contained - /// under an Arm resource. + /// Base class to define the health summary of the resources contained under an + /// Arm resource. /// public partial class ResourceHealthSummary { @@ -32,17 +24,22 @@ public ResourceHealthSummary() /// /// Initializes a new instance of the ResourceHealthSummary class. /// - /// The count of total resources under the - /// container. - /// The list of summary of health errors across - /// the resources under the container. - /// The categorized resource - /// counts. - public ResourceHealthSummary(int? resourceCount = default(int?), IList issues = default(IList), IDictionary categorizedResourceCounts = default(IDictionary)) + + /// The count of total resources under the container. + /// + + /// The list of summary of health errors across the resources under the + /// container. + /// + + /// The categorized resource counts. + /// + public ResourceHealthSummary(int? resourceCount = default(int?), System.Collections.Generic.IList issues = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary categorizedResourceCounts = default(System.Collections.Generic.IDictionary)) + { - ResourceCount = resourceCount; - Issues = issues; - CategorizedResourceCounts = categorizedResourceCounts; + this.ResourceCount = resourceCount; + this.Issues = issues; + this.CategorizedResourceCounts = categorizedResourceCounts; CustomInit(); } @@ -51,24 +48,24 @@ public ResourceHealthSummary() /// partial void CustomInit(); + /// /// Gets or sets the count of total resources under the container. /// - [JsonProperty(PropertyName = "resourceCount")] - public int? ResourceCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceCount")] + public int? ResourceCount {get; set; } /// - /// Gets or sets the list of summary of health errors across the - /// resources under the container. + /// Gets or sets the list of summary of health errors across the resources + /// under the container. /// - [JsonProperty(PropertyName = "issues")] - public IList Issues { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "issues")] + public System.Collections.Generic.IList Issues {get; set; } /// /// Gets or sets the categorized resource counts. /// - [JsonProperty(PropertyName = "categorizedResourceCounts")] - public IDictionary CategorizedResourceCounts { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "categorizedResourceCounts")] + public System.Collections.Generic.IDictionary CategorizedResourceCounts {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeJobParams.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeJobParams.cs index f3364c0c93e0..ff2c464eed8a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeJobParams.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeJobParams.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public ResumeJobParams() /// /// Initializes a new instance of the ResumeJobParams class. /// - /// Resume job properties. + + /// Resume job properties. + /// public ResumeJobParams(ResumeJobParamsProperties properties = default(ResumeJobParamsProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public ResumeJobParams() /// partial void CustomInit(); + /// /// Gets or sets resume job properties. /// - [JsonProperty(PropertyName = "properties")] - public ResumeJobParamsProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ResumeJobParamsProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeJobParamsProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeJobParamsProperties.cs index a14a16c7d8a6..96bd4496f123 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeJobParamsProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeJobParamsProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public ResumeJobParamsProperties() /// /// Initializes a new instance of the ResumeJobParamsProperties class. /// - /// Resume job comments. + + /// Resume job comments. + /// public ResumeJobParamsProperties(string comments = default(string)) + { - Comments = comments; + this.Comments = comments; CustomInit(); } @@ -41,11 +38,11 @@ public ResumeJobParamsProperties() /// partial void CustomInit(); + /// /// Gets or sets resume job comments. /// - [JsonProperty(PropertyName = "comments")] - public string Comments { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "comments")] + public string Comments {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationInput.cs index ff894fe1eac2..70adcee9fd9f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public ResumeReplicationInput() /// /// Initializes a new instance of the ResumeReplicationInput class. /// - /// Resume replication input - /// properties. + + /// Resume replication input properties. + /// public ResumeReplicationInput(ResumeReplicationInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,28 +38,28 @@ public ResumeReplicationInput(ResumeReplicationInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets resume replication input properties. /// - [JsonProperty(PropertyName = "properties")] - public ResumeReplicationInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ResumeReplicationInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationInputProperties.cs index d04197d8cfda..ac41ce04a397 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ResumeReplicationInputProperties { /// - /// Initializes a new instance of the ResumeReplicationInputProperties - /// class. + /// Initializes a new instance of the ResumeReplicationInputProperties class. /// public ResumeReplicationInputProperties() { @@ -29,14 +21,15 @@ public ResumeReplicationInputProperties() } /// - /// Initializes a new instance of the ResumeReplicationInputProperties - /// class. + /// Initializes a new instance of the ResumeReplicationInputProperties class. /// - /// The provider specific input - /// for resume replication. + + /// The provider specific input for resume replication. + /// public ResumeReplicationInputProperties(ResumeReplicationProviderSpecificInput providerSpecificDetails) + { - ProviderSpecificDetails = providerSpecificDetails; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -45,24 +38,25 @@ public ResumeReplicationInputProperties(ResumeReplicationProviderSpecificInput p /// partial void CustomInit(); + /// /// Gets or sets the provider specific input for resume replication. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public ResumeReplicationProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public ResumeReplicationProviderSpecificInput ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ProviderSpecificDetails == null) + if (this.ProviderSpecificDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProviderSpecificDetails"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationProviderSpecificInput.cs index 4a103735ed4e..8c88f81d94bf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResumeReplicationProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ResumeReplicationProviderSpecificInput { /// - /// Initializes a new instance of the - /// ResumeReplicationProviderSpecificInput class. + /// Initializes a new instance of the ResumeReplicationProviderSpecificInput class. /// public ResumeReplicationProviderSpecificInput() { @@ -35,4 +28,4 @@ public ResumeReplicationProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncInput.cs index aa5b3783b804..da96d88e865c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +23,13 @@ public ResyncInput() /// /// Initializes a new instance of the ResyncInput class. /// - /// Resync input properties. + + /// Resync input properties. + /// public ResyncInput(ResyncInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,28 +38,28 @@ public ResyncInput(ResyncInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets resync input properties. /// - [JsonProperty(PropertyName = "properties")] - public ResyncInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ResyncInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncInputProperties.cs index 95374ed8452b..c6fc435e9833 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public ResyncInputProperties() /// /// Initializes a new instance of the ResyncInputProperties class. /// - /// The provider specific - /// details. + + /// The provider specific details. + /// public ResyncInputProperties(ResyncProviderSpecificInput providerSpecificDetails) + { - ProviderSpecificDetails = providerSpecificDetails; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -43,24 +38,25 @@ public ResyncInputProperties(ResyncProviderSpecificInput providerSpecificDetails /// partial void CustomInit(); + /// /// Gets or sets the provider specific details. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public ResyncProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public ResyncProviderSpecificInput ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ProviderSpecificDetails == null) + if (this.ProviderSpecificDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProviderSpecificDetails"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncProviderSpecificInput.cs index dde30157b009..046321ed1cde 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ResyncProviderSpecificInput { /// - /// Initializes a new instance of the ResyncProviderSpecificInput - /// class. + /// Initializes a new instance of the ResyncProviderSpecificInput class. /// public ResyncProviderSpecificInput() { @@ -35,4 +28,4 @@ public ResyncProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncState.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncState.cs index ef247dfe7d73..5e6ff05a07b3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncState.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ResyncState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for ResyncState. /// + + public static class ResyncState { public const string None = "None"; public const string PreparedForResynchronization = "PreparedForResynchronization"; public const string StartedResynchronization = "StartedResynchronization"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RetentionVolume.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RetentionVolume.cs index 65ba84d4d0bc..8eb597c23b1f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RetentionVolume.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RetentionVolume.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,25 @@ public RetentionVolume() /// /// Initializes a new instance of the RetentionVolume class. /// - /// The volume name. - /// The volume capacity. - /// The free space available in this - /// volume. - /// The threshold percentage. + + /// The volume name. + /// + + /// The volume capacity. + /// + + /// The free space available in this volume. + /// + + /// The threshold percentage. + /// public RetentionVolume(string volumeName = default(string), long? capacityInBytes = default(long?), long? freeSpaceInBytes = default(long?), int? thresholdPercentage = default(int?)) + { - VolumeName = volumeName; - CapacityInBytes = capacityInBytes; - FreeSpaceInBytes = freeSpaceInBytes; - ThresholdPercentage = thresholdPercentage; + this.VolumeName = volumeName; + this.CapacityInBytes = capacityInBytes; + this.FreeSpaceInBytes = freeSpaceInBytes; + this.ThresholdPercentage = thresholdPercentage; CustomInit(); } @@ -48,29 +50,29 @@ public RetentionVolume() /// partial void CustomInit(); + /// /// Gets or sets the volume name. /// - [JsonProperty(PropertyName = "volumeName")] - public string VolumeName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "volumeName")] + public string VolumeName {get; set; } /// /// Gets or sets the volume capacity. /// - [JsonProperty(PropertyName = "capacityInBytes")] - public long? CapacityInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "capacityInBytes")] + public long? CapacityInBytes {get; set; } /// /// Gets or sets the free space available in this volume. /// - [JsonProperty(PropertyName = "freeSpaceInBytes")] - public long? FreeSpaceInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "freeSpaceInBytes")] + public long? FreeSpaceInBytes {get; set; } /// /// Gets or sets the threshold percentage. /// - [JsonProperty(PropertyName = "thresholdPercentage")] - public int? ThresholdPercentage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "thresholdPercentage")] + public int? ThresholdPercentage {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationInput.cs index 629d75f48e5e..3a51afc9e1f1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public ReverseReplicationInput() /// /// Initializes a new instance of the ReverseReplicationInput class. /// - /// Reverse replication properties. + + /// Reverse replication properties. + /// public ReverseReplicationInput(ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public ReverseReplicationInput() /// partial void CustomInit(); + /// /// Gets or sets reverse replication properties. /// - [JsonProperty(PropertyName = "properties")] - public ReverseReplicationInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public ReverseReplicationInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationInputProperties.cs index 44cefa66d07b..d3ee136e5c33 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReverseReplicationInputProperties { /// - /// Initializes a new instance of the ReverseReplicationInputProperties - /// class. + /// Initializes a new instance of the ReverseReplicationInputProperties class. /// public ReverseReplicationInputProperties() { @@ -28,16 +21,19 @@ public ReverseReplicationInputProperties() } /// - /// Initializes a new instance of the ReverseReplicationInputProperties - /// class. + /// Initializes a new instance of the ReverseReplicationInputProperties class. /// - /// Failover direction. - /// Provider specific reverse - /// replication input. + + /// Failover direction. + /// + + /// Provider specific reverse replication input. + /// public ReverseReplicationInputProperties(string failoverDirection = default(string), ReverseReplicationProviderSpecificInput providerSpecificDetails = default(ReverseReplicationProviderSpecificInput)) + { - FailoverDirection = failoverDirection; - ProviderSpecificDetails = providerSpecificDetails; + this.FailoverDirection = failoverDirection; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -46,17 +42,17 @@ public ReverseReplicationInputProperties() /// partial void CustomInit(); + /// /// Gets or sets failover direction. /// - [JsonProperty(PropertyName = "failoverDirection")] - public string FailoverDirection { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection {get; set; } /// /// Gets or sets provider specific reverse replication input. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public ReverseReplicationProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public ReverseReplicationProviderSpecificInput ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationProviderSpecificInput.cs index af0a90b05d34..28ba9c82ba52 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ReverseReplicationProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class ReverseReplicationProviderSpecificInput { /// - /// Initializes a new instance of the - /// ReverseReplicationProviderSpecificInput class. + /// Initializes a new instance of the ReverseReplicationProviderSpecificInput class. /// public ReverseReplicationProviderSpecificInput() { @@ -35,4 +28,4 @@ public ReverseReplicationProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RoleAssignment.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RoleAssignment.cs index 4aee3fa65dd0..8ab1c1b9adbe 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RoleAssignment.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RoleAssignment.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,18 +23,29 @@ public RoleAssignment() /// /// Initializes a new instance of the RoleAssignment class. /// - /// The ARM Id of the role assignment. - /// The name of the role assignment. - /// Role assignment scope. - /// Principal Id. - /// Role definition id. + + /// The ARM Id of the role assignment. + /// + + /// The name of the role assignment. + /// + + /// Role assignment scope. + /// + + /// Principal Id. + /// + + /// Role definition id. + /// public RoleAssignment(string id = default(string), string name = default(string), string scope = default(string), string principalId = default(string), string roleDefinitionId = default(string)) + { - Id = id; - Name = name; - Scope = scope; - PrincipalId = principalId; - RoleDefinitionId = roleDefinitionId; + this.Id = id; + this.Name = name; + this.Scope = scope; + this.PrincipalId = principalId; + this.RoleDefinitionId = roleDefinitionId; CustomInit(); } @@ -49,35 +54,35 @@ public RoleAssignment() /// partial void CustomInit(); + /// /// Gets or sets the ARM Id of the role assignment. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the name of the role assignment. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets role assignment scope. /// - [JsonProperty(PropertyName = "scope")] - public string Scope { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scope")] + public string Scope {get; set; } /// /// Gets or sets principal Id. /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")] + public string PrincipalId {get; set; } /// /// Gets or sets role definition id. /// - [JsonProperty(PropertyName = "roleDefinitionId")] - public string RoleDefinitionId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "roleDefinitionId")] + public string RoleDefinitionId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RpInMageRecoveryPointType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RpInMageRecoveryPointType.cs index f57db2c67bd7..0aed38ec3ca1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RpInMageRecoveryPointType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RpInMageRecoveryPointType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for RpInMageRecoveryPointType. /// + + public static class RpInMageRecoveryPointType { public const string LatestTime = "LatestTime"; public const string LatestTag = "LatestTag"; public const string Custom = "Custom"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RunAsAccount.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RunAsAccount.cs index a1ca0a9f1418..f0194e235942 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RunAsAccount.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/RunAsAccount.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,12 +23,17 @@ public RunAsAccount() /// /// Initializes a new instance of the RunAsAccount class. /// - /// The CS RunAs account Id. - /// The CS RunAs account name. + + /// The CS RunAs account Id. + /// + + /// The CS RunAs account name. + /// public RunAsAccount(string accountId = default(string), string accountName = default(string)) + { - AccountId = accountId; - AccountName = accountName; + this.AccountId = accountId; + this.AccountName = accountName; CustomInit(); } @@ -43,17 +42,17 @@ public RunAsAccount() /// partial void CustomInit(); + /// /// Gets or sets the CS RunAs account Id. /// - [JsonProperty(PropertyName = "accountId")] - public string AccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "accountId")] + public string AccountId {get; set; } /// /// Gets or sets the CS RunAs account name. /// - [JsonProperty(PropertyName = "accountName")] - public string AccountName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "accountName")] + public string AccountName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ScriptActionTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ScriptActionTaskDetails.cs index ee222cd38c11..a42bc04a1a29 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ScriptActionTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ScriptActionTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,17 +24,25 @@ public ScriptActionTaskDetails() /// /// Initializes a new instance of the ScriptActionTaskDetails class. /// - /// The name. - /// The path. - /// The output. - /// A value indicating whether it is - /// a primary side script or not. + + /// The name. + /// + + /// The path. + /// + + /// The output. + /// + + /// A value indicating whether it is a primary side script or not. + /// public ScriptActionTaskDetails(string name = default(string), string path = default(string), string output = default(string), bool? isPrimarySideScript = default(bool?)) + { - Name = name; - Path = path; - Output = output; - IsPrimarySideScript = isPrimarySideScript; + this.Name = name; + this.Path = path; + this.Output = output; + this.IsPrimarySideScript = isPrimarySideScript; CustomInit(); } @@ -49,30 +51,29 @@ public ScriptActionTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the path. /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } /// /// Gets or sets the output. /// - [JsonProperty(PropertyName = "output")] - public string Output { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "output")] + public string Output {get; set; } /// - /// Gets or sets a value indicating whether it is a primary side script - /// or not. + /// Gets or sets a value indicating whether it is a primary side script or not. /// - [JsonProperty(PropertyName = "isPrimarySideScript")] - public bool? IsPrimarySideScript { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isPrimarySideScript")] + public bool? IsPrimarySideScript {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SecurityType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SecurityType.cs index 1198dec7acfe..57e4450ace84 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SecurityType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SecurityType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for SecurityType. /// + + public static class SecurityType { public const string None = "None"; public const string TrustedLaunch = "TrustedLaunch"; public const string ConfidentialVM = "ConfidentialVM"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ServiceError.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ServiceError.cs index bc9d2999f5d1..f6a304b3fb6c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ServiceError.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/ServiceError.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,19 +23,29 @@ public ServiceError() /// /// Initializes a new instance of the ServiceError class. /// - /// Error code. - /// Error message. - /// Possible causes of error. - /// Recommended action to resolve - /// error. - /// Activity Id. + + /// Error code. + /// + + /// Error message. + /// + + /// Possible causes of error. + /// + + /// Recommended action to resolve error. + /// + + /// Activity Id. + /// public ServiceError(string code = default(string), string message = default(string), string possibleCauses = default(string), string recommendedAction = default(string), string activityId = default(string)) + { - Code = code; - Message = message; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - ActivityId = activityId; + this.Code = code; + this.Message = message; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.ActivityId = activityId; CustomInit(); } @@ -50,35 +54,35 @@ public ServiceError() /// partial void CustomInit(); + /// /// Gets or sets error code. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } /// /// Gets or sets error message. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } /// /// Gets or sets possible causes of error. /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses {get; set; } /// /// Gets or sets recommended action to resolve error. /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction {get; set; } /// /// Gets or sets activity Id. /// - [JsonProperty(PropertyName = "activityId")] - public string ActivityId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "activityId")] + public string ActivityId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SetMultiVmSyncStatus.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SetMultiVmSyncStatus.cs index 043ffa12bb32..07c4ab1e38e3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SetMultiVmSyncStatus.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SetMultiVmSyncStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for SetMultiVmSyncStatus. /// + + public static class SetMultiVmSyncStatus { public const string Enable = "Enable"; public const string Disable = "Disable"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Severity.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Severity.cs index f2619da2bf9b..488e5ca3a9ec 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Severity.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Severity.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,11 +9,13 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for Severity. /// + + public static class Severity { - public const string NONE = "NONE"; + public const string None = "NONE"; public const string Warning = "Warning"; public const string Error = "Error"; public const string Info = "Info"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SourceSiteOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SourceSiteOperations.cs index 3d3815dc8a0e..d49c02df5ca7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SourceSiteOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SourceSiteOperations.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for SourceSiteOperations. /// + + public static class SourceSiteOperations { public const string Required = "Required"; public const string NotRequired = "NotRequired"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SqlServerLicenseType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SqlServerLicenseType.cs index 9211f0e4676d..e970c5c1bfdc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SqlServerLicenseType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SqlServerLicenseType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,11 +9,13 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for SqlServerLicenseType. /// + + public static class SqlServerLicenseType { public const string NotSpecified = "NotSpecified"; public const string NoLicenseType = "NoLicenseType"; - public const string PAYG = "PAYG"; - public const string AHUB = "AHUB"; + public const string Payg = "PAYG"; + public const string Ahub = "AHUB"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageAccountCustomDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageAccountCustomDetails.cs index 592620d568b0..61b29834d370 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageAccountCustomDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageAccountCustomDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class StorageAccountCustomDetails { /// - /// Initializes a new instance of the StorageAccountCustomDetails - /// class. + /// Initializes a new instance of the StorageAccountCustomDetails class. /// public StorageAccountCustomDetails() { @@ -35,4 +28,4 @@ public StorageAccountCustomDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassification.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassification.cs index a030b03d7225..d0c505d2ba6c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassification.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassification.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public StorageClassification() /// /// Initializes a new instance of the StorageClassification class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// Properties of the storage object. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// Properties of the storage object. + /// public StorageClassification(string id = default(string), string name = default(string), string type = default(string), string location = default(string), StorageClassificationProperties properties = default(StorageClassificationProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public StorageClassification() /// partial void CustomInit(); + /// /// Gets or sets properties of the storage object. /// - [JsonProperty(PropertyName = "properties")] - public StorageClassificationProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public StorageClassificationProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMapping.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMapping.cs index da87ad606559..a419fc25f1c1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMapping.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMapping.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class StorageClassificationMapping : Resource { /// - /// Initializes a new instance of the StorageClassificationMapping - /// class. + /// Initializes a new instance of the StorageClassificationMapping class. /// public StorageClassificationMapping() { @@ -28,19 +21,28 @@ public StorageClassificationMapping() } /// - /// Initializes a new instance of the StorageClassificationMapping - /// class. + /// Initializes a new instance of the StorageClassificationMapping class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// Properties of the storage mapping - /// object. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// Properties of the storage mapping object. + /// public StorageClassificationMapping(string id = default(string), string name = default(string), string type = default(string), string location = default(string), StorageClassificationMappingProperties properties = default(StorageClassificationMappingProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -49,11 +51,11 @@ public StorageClassificationMapping() /// partial void CustomInit(); + /// /// Gets or sets properties of the storage mapping object. /// - [JsonProperty(PropertyName = "properties")] - public StorageClassificationMappingProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public StorageClassificationMappingProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMappingInput.cs index cc9f228a2309..1d2742881200 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class StorageClassificationMappingInput { /// - /// Initializes a new instance of the StorageClassificationMappingInput - /// class. + /// Initializes a new instance of the StorageClassificationMappingInput class. /// public StorageClassificationMappingInput() { @@ -28,13 +21,15 @@ public StorageClassificationMappingInput() } /// - /// Initializes a new instance of the StorageClassificationMappingInput - /// class. + /// Initializes a new instance of the StorageClassificationMappingInput class. /// - /// Storage mapping input properties. + + /// Storage mapping input properties. + /// public StorageClassificationMappingInput(StorageMappingInputProperties properties = default(StorageMappingInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,11 +38,11 @@ public StorageClassificationMappingInput() /// partial void CustomInit(); + /// /// Gets or sets storage mapping input properties. /// - [JsonProperty(PropertyName = "properties")] - public StorageMappingInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public StorageMappingInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMappingProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMappingProperties.cs index a4ecab44503c..5bcdf9f7da54 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMappingProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationMappingProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class StorageClassificationMappingProperties { /// - /// Initializes a new instance of the - /// StorageClassificationMappingProperties class. + /// Initializes a new instance of the StorageClassificationMappingProperties class. /// public StorageClassificationMappingProperties() { @@ -28,14 +21,15 @@ public StorageClassificationMappingProperties() } /// - /// Initializes a new instance of the - /// StorageClassificationMappingProperties class. + /// Initializes a new instance of the StorageClassificationMappingProperties class. /// - /// Target storage object - /// Id. + + /// Target storage object Id. + /// public StorageClassificationMappingProperties(string targetStorageClassificationId = default(string)) + { - TargetStorageClassificationId = targetStorageClassificationId; + this.TargetStorageClassificationId = targetStorageClassificationId; CustomInit(); } @@ -44,11 +38,11 @@ public StorageClassificationMappingProperties() /// partial void CustomInit(); + /// /// Gets or sets target storage object Id. /// - [JsonProperty(PropertyName = "targetStorageClassificationId")] - public string TargetStorageClassificationId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetStorageClassificationId")] + public string TargetStorageClassificationId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationProperties.cs index 2db86bc0f2e6..440849f62a29 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageClassificationProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class StorageClassificationProperties { /// - /// Initializes a new instance of the StorageClassificationProperties - /// class. + /// Initializes a new instance of the StorageClassificationProperties class. /// public StorageClassificationProperties() { @@ -28,14 +21,15 @@ public StorageClassificationProperties() } /// - /// Initializes a new instance of the StorageClassificationProperties - /// class. + /// Initializes a new instance of the StorageClassificationProperties class. /// - /// Friendly name of the Storage - /// classification. + + /// Friendly name of the Storage classification. + /// public StorageClassificationProperties(string friendlyName = default(string)) + { - FriendlyName = friendlyName; + this.FriendlyName = friendlyName; CustomInit(); } @@ -44,11 +38,11 @@ public StorageClassificationProperties() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the Storage classification. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageMappingInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageMappingInputProperties.cs index 6878a0bd2496..4225811861df 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageMappingInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/StorageMappingInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class StorageMappingInputProperties { /// - /// Initializes a new instance of the StorageMappingInputProperties - /// class. + /// Initializes a new instance of the StorageMappingInputProperties class. /// public StorageMappingInputProperties() { @@ -28,14 +21,15 @@ public StorageMappingInputProperties() } /// - /// Initializes a new instance of the StorageMappingInputProperties - /// class. + /// Initializes a new instance of the StorageMappingInputProperties class. /// - /// The ID of the storage - /// object. + + /// The ID of the storage object. + /// public StorageMappingInputProperties(string targetStorageClassificationId = default(string)) + { - TargetStorageClassificationId = targetStorageClassificationId; + this.TargetStorageClassificationId = targetStorageClassificationId; CustomInit(); } @@ -44,11 +38,11 @@ public StorageMappingInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the ID of the storage object. /// - [JsonProperty(PropertyName = "targetStorageClassificationId")] - public string TargetStorageClassificationId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetStorageClassificationId")] + public string TargetStorageClassificationId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Subnet.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Subnet.cs index 613dae41e3cd..8f5fa07e6e22 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Subnet.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/Subnet.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public Subnet() /// /// Initializes a new instance of the Subnet class. /// - /// The subnet name. - /// The subnet friendly name. - /// The list of addresses for the - /// subnet. - public Subnet(string name = default(string), string friendlyName = default(string), IList addressList = default(IList)) + + /// The subnet name. + /// + + /// The subnet friendly name. + /// + + /// The list of addresses for the subnet. + /// + public Subnet(string name = default(string), string friendlyName = default(string), System.Collections.Generic.IList addressList = default(System.Collections.Generic.IList)) + { - Name = name; - FriendlyName = friendlyName; - AddressList = addressList; + this.Name = name; + this.FriendlyName = friendlyName; + this.AddressList = addressList; CustomInit(); } @@ -48,23 +46,23 @@ public Subnet() /// partial void CustomInit(); + /// /// Gets or sets the subnet name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the subnet friendly name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the list of addresses for the subnet. /// - [JsonProperty(PropertyName = "addressList")] - public IList AddressList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "addressList")] + public System.Collections.Generic.IList AddressList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSDetails.cs index bb8bf0973d0b..9f1648d5961d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public SupportedOSDetails() /// /// Initializes a new instance of the SupportedOSDetails class. /// - /// The name. - /// The type. - /// The list of version for operating - /// system. - public SupportedOSDetails(string osName = default(string), string osType = default(string), IList osVersions = default(IList)) + + /// The name. + /// + + /// The type. + /// + + /// The list of version for operating system. + /// + public SupportedOSDetails(string osName = default(string), string osType = default(string), System.Collections.Generic.IList osVersions = default(System.Collections.Generic.IList)) + { - OsName = osName; - OsType = osType; - OsVersions = osVersions; + this.OSName = osName; + this.OSType = osType; + this.OSVersions = osVersions; CustomInit(); } @@ -48,23 +46,23 @@ public SupportedOSDetails() /// partial void CustomInit(); + /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "osName")] - public string OsName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osName")] + public string OSName {get; set; } /// /// Gets or sets the type. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the list of version for operating system. /// - [JsonProperty(PropertyName = "osVersions")] - public IList OsVersions { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "osVersions")] + public System.Collections.Generic.IList OSVersions {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSProperties.cs index b65d6f3650cd..af6709d87f36 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,11 +23,13 @@ public SupportedOSProperties() /// /// Initializes a new instance of the SupportedOSProperties class. /// - /// The supported operating systems - /// property list. - public SupportedOSProperties(IList supportedOsList = default(IList)) + + /// The supported operating systems property list. + /// + public SupportedOSProperties(System.Collections.Generic.IList supportedOSList = default(System.Collections.Generic.IList)) + { - SupportedOsList = supportedOsList; + this.SupportedOSList = supportedOSList; CustomInit(); } @@ -44,11 +38,11 @@ public SupportedOSProperties() /// partial void CustomInit(); + /// /// Gets or sets the supported operating systems property list. /// - [JsonProperty(PropertyName = "supportedOsList")] - public IList SupportedOsList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "supportedOsList")] + public System.Collections.Generic.IList SupportedOSList {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSProperty.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSProperty.cs index 97989f11f22c..e3565af8998e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSProperty.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOSProperty.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,13 +23,17 @@ public SupportedOSProperty() /// /// Initializes a new instance of the SupportedOSProperty class. /// - /// The replication provider type. - /// The list of supported operating - /// systems. - public SupportedOSProperty(string instanceType = default(string), IList supportedOs = default(IList)) + + /// The replication provider type. + /// + + /// The list of supported operating systems. + /// + public SupportedOSProperty(string instanceType = default(string), System.Collections.Generic.IList supportedOS = default(System.Collections.Generic.IList)) + { - InstanceType = instanceType; - SupportedOs = supportedOs; + this.InstanceType = instanceType; + this.SupportedOS = supportedOS; CustomInit(); } @@ -46,17 +42,17 @@ public SupportedOSProperty() /// partial void CustomInit(); + /// /// Gets or sets the replication provider type. /// - [JsonProperty(PropertyName = "instanceType")] - public string InstanceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "instanceType")] + public string InstanceType {get; set; } /// /// Gets or sets the list of supported operating systems. /// - [JsonProperty(PropertyName = "supportedOs")] - public IList SupportedOs { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "supportedOs")] + public System.Collections.Generic.IList SupportedOS {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOperatingSystems.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOperatingSystems.cs index 70cdaf071d7a..721bb71ddb80 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOperatingSystems.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SupportedOperatingSystems.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,26 @@ public SupportedOperatingSystems() /// /// Initializes a new instance of the SupportedOperatingSystems class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The supported operating systems - /// properties. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The supported operating systems properties. + /// public SupportedOperatingSystems(string id = default(string), string name = default(string), string type = default(string), string location = default(string), SupportedOSProperties properties = default(SupportedOSProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -47,11 +51,11 @@ public SupportedOperatingSystems() /// partial void CustomInit(); + /// /// Gets or sets the supported operating systems properties. /// - [JsonProperty(PropertyName = "properties")] - public SupportedOSProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public SupportedOSProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionInput.cs index 5c4c0336a681..564fc6a45e4d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public SwitchProtectionInput() /// /// Initializes a new instance of the SwitchProtectionInput class. /// - /// Switch protection properties. + + /// Switch protection properties. + /// public SwitchProtectionInput(SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public SwitchProtectionInput() /// partial void CustomInit(); + /// /// Gets or sets switch protection properties. /// - [JsonProperty(PropertyName = "properties")] - public SwitchProtectionInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public SwitchProtectionInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionInputProperties.cs index 809556b3dd72..3c722e72eb14 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class SwitchProtectionInputProperties { /// - /// Initializes a new instance of the SwitchProtectionInputProperties - /// class. + /// Initializes a new instance of the SwitchProtectionInputProperties class. /// public SwitchProtectionInputProperties() { @@ -28,17 +21,19 @@ public SwitchProtectionInputProperties() } /// - /// Initializes a new instance of the SwitchProtectionInputProperties - /// class. + /// Initializes a new instance of the SwitchProtectionInputProperties class. /// - /// The unique replication - /// protected item name. - /// Provider specific switch - /// protection input. + + /// The unique replication protected item name. + /// + + /// Provider specific switch protection input. + /// public SwitchProtectionInputProperties(string replicationProtectedItemName = default(string), SwitchProtectionProviderSpecificInput providerSpecificDetails = default(SwitchProtectionProviderSpecificInput)) + { - ReplicationProtectedItemName = replicationProtectedItemName; - ProviderSpecificDetails = providerSpecificDetails; + this.ReplicationProtectedItemName = replicationProtectedItemName; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -47,17 +42,17 @@ public SwitchProtectionInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the unique replication protected item name. /// - [JsonProperty(PropertyName = "replicationProtectedItemName")] - public string ReplicationProtectedItemName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationProtectedItemName")] + public string ReplicationProtectedItemName {get; set; } /// /// Gets or sets provider specific switch protection input. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public SwitchProtectionProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public SwitchProtectionProviderSpecificInput ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionJobDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionJobDetails.cs index 4ae6b1fd56a7..4a6c3b3067dd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionJobDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionJobDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,15 +24,18 @@ public SwitchProtectionJobDetails() /// /// Initializes a new instance of the SwitchProtectionJobDetails class. /// - /// The affected object properties - /// like source server, source cloud, target server, target cloud etc. - /// based on the workflow object details. - /// ARM Id of the new - /// replication protected item. - public SwitchProtectionJobDetails(IDictionary affectedObjectDetails = default(IDictionary), string newReplicationProtectedItemId = default(string)) - : base(affectedObjectDetails) + + /// The affected object properties like source server, source cloud, target + /// server, target cloud etc. based on the workflow object details. + /// + + /// ARM Id of the new replication protected item. + /// + public SwitchProtectionJobDetails(System.Collections.Generic.IDictionary affectedObjectDetails = default(System.Collections.Generic.IDictionary), string newReplicationProtectedItemId = default(string)) + + : base(affectedObjectDetails) { - NewReplicationProtectedItemId = newReplicationProtectedItemId; + this.NewReplicationProtectedItemId = newReplicationProtectedItemId; CustomInit(); } @@ -49,11 +44,11 @@ public SwitchProtectionJobDetails() /// partial void CustomInit(); + /// - /// Gets or sets ARM Id of the new replication protected item. + /// Gets or sets aRM Id of the new replication protected item. /// - [JsonProperty(PropertyName = "newReplicationProtectedItemId")] - public string NewReplicationProtectedItemId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "newReplicationProtectedItemId")] + public string NewReplicationProtectedItemId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionProviderSpecificInput.cs index 70c05c02dde4..b7bba5535218 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProtectionProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class SwitchProtectionProviderSpecificInput { /// - /// Initializes a new instance of the - /// SwitchProtectionProviderSpecificInput class. + /// Initializes a new instance of the SwitchProtectionProviderSpecificInput class. /// public SwitchProtectionProviderSpecificInput() { @@ -35,4 +28,4 @@ public SwitchProtectionProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderInput.cs index 4b8808292956..bca5672e9d6c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public SwitchProviderInput() /// /// Initializes a new instance of the SwitchProviderInput class. /// - /// Switch provider input properties. + + /// Switch provider input properties. + /// public SwitchProviderInput(SwitchProviderInputProperties properties = default(SwitchProviderInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public SwitchProviderInput() /// partial void CustomInit(); + /// /// Gets or sets switch provider input properties. /// - [JsonProperty(PropertyName = "properties")] - public SwitchProviderInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public SwitchProviderInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderInputProperties.cs index 550a8d95396e..966b8b2cadbe 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class SwitchProviderInputProperties { /// - /// Initializes a new instance of the SwitchProviderInputProperties - /// class. + /// Initializes a new instance of the SwitchProviderInputProperties class. /// public SwitchProviderInputProperties() { @@ -28,16 +21,19 @@ public SwitchProviderInputProperties() } /// - /// Initializes a new instance of the SwitchProviderInputProperties - /// class. + /// Initializes a new instance of the SwitchProviderInputProperties class. /// - /// Target provider type. - /// Provider specific - /// settings. - public SwitchProviderInputProperties(string targetInstanceType = default(string), SwitchProviderProviderSpecificInput providerSpecificDetails = default(SwitchProviderProviderSpecificInput)) + + /// Target provider type. + /// + + /// Provider specific settings. + /// + public SwitchProviderInputProperties(string targetInstanceType = default(string), SwitchProviderSpecificInput providerSpecificDetails = default(SwitchProviderSpecificInput)) + { - TargetInstanceType = targetInstanceType; - ProviderSpecificDetails = providerSpecificDetails; + this.TargetInstanceType = targetInstanceType; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -46,17 +42,17 @@ public SwitchProviderInputProperties() /// partial void CustomInit(); + /// /// Gets or sets target provider type. /// - [JsonProperty(PropertyName = "targetInstanceType")] - public string TargetInstanceType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetInstanceType")] + public string TargetInstanceType {get; set; } /// /// Gets or sets provider specific settings. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public SwitchProviderProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public SwitchProviderSpecificInput ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderSpecificInput.cs similarity index 62% rename from src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderProviderSpecificInput.cs rename to src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderSpecificInput.cs index 2877a73f2e37..c7e96b93eb52 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/SwitchProviderSpecificInput.cs @@ -1,29 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// /// Provider specific switch provider input. /// - [Newtonsoft.Json.JsonObject("SwitchProviderProviderSpecificInput")] - public partial class SwitchProviderProviderSpecificInput + [Newtonsoft.Json.JsonObject("SwitchProviderSpecificInput")] + public partial class SwitchProviderSpecificInput { /// - /// Initializes a new instance of the - /// SwitchProviderProviderSpecificInput class. + /// Initializes a new instance of the SwitchProviderSpecificInput class. /// - public SwitchProviderProviderSpecificInput() + public SwitchProviderSpecificInput() { CustomInit(); } @@ -35,4 +28,4 @@ public SwitchProviderProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TargetComputeSize.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TargetComputeSize.cs index bb36bfe26fca..e2fbf38d9a84 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TargetComputeSize.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TargetComputeSize.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,25 @@ public TargetComputeSize() /// /// Initializes a new instance of the TargetComputeSize class. /// - /// The Id. - /// The name. - /// The Type of the object. - /// The custom data. + + /// The Id. + /// + + /// The name. + /// + + /// The Type of the object. + /// + + /// The custom data. + /// public TargetComputeSize(string id = default(string), string name = default(string), string type = default(string), TargetComputeSizeProperties properties = default(TargetComputeSizeProperties)) + { - Id = id; - Name = name; - Type = type; - Properties = properties; + this.Id = id; + this.Name = name; + this.Type = type; + this.Properties = properties; CustomInit(); } @@ -47,29 +50,29 @@ public TargetComputeSize() /// partial void CustomInit(); + /// /// Gets or sets the Id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the Type of the object. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Gets or sets the custom data. /// - [JsonProperty(PropertyName = "properties")] - public TargetComputeSizeProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public TargetComputeSizeProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TargetComputeSizeProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TargetComputeSizeProperties.cs index 700ce189a3a9..1528d8d039c3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TargetComputeSizeProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TargetComputeSizeProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class TargetComputeSizeProperties { /// - /// Initializes a new instance of the TargetComputeSizeProperties - /// class. + /// Initializes a new instance of the TargetComputeSizeProperties class. /// public TargetComputeSizeProperties() { @@ -30,40 +21,52 @@ public TargetComputeSizeProperties() } /// - /// Initializes a new instance of the TargetComputeSizeProperties - /// class. + /// Initializes a new instance of the TargetComputeSizeProperties class. /// - /// Target compute size name. - /// Target compute size display - /// name. - /// The maximum cpu cores count supported - /// by target compute size. - /// The Available vCPUs supported by - /// target compute size. - /// The maximum memory in GB supported by - /// target compute size. - /// The maximum data disks count - /// supported by target compute size. - /// The maximum Nics count supported by - /// target compute size. - /// The reasons why the target compute size is not - /// applicable for the protected item. - /// The value indicating whether the - /// target compute size supports high Iops. - /// The supported HyperV - /// Generations. - public TargetComputeSizeProperties(string name = default(string), string friendlyName = default(string), int? cpuCoresCount = default(int?), int? vCPUsAvailable = default(int?), double? memoryInGB = default(double?), int? maxDataDiskCount = default(int?), int? maxNicsCount = default(int?), IList errors = default(IList), string highIopsSupported = default(string), IList hyperVGenerations = default(IList)) + + /// Target compute size name. + /// + + /// Target compute size display name. + /// + + /// The maximum cpu cores count supported by target compute size. + /// + + /// The Available vCPUs supported by target compute size. + /// + + /// The maximum memory in GB supported by target compute size. + /// + + /// The maximum data disks count supported by target compute size. + /// + + /// The maximum Nics count supported by target compute size. + /// + + /// The reasons why the target compute size is not applicable for the protected + /// item. + /// + + /// The value indicating whether the target compute size supports high Iops. + /// + + /// The supported HyperV Generations. + /// + public TargetComputeSizeProperties(string name = default(string), string friendlyName = default(string), int? cpuCoresCount = default(int?), int? vCpUsAvailable = default(int?), double? memoryInGb = default(double?), int? maxDataDiskCount = default(int?), int? maxNicsCount = default(int?), System.Collections.Generic.IList errors = default(System.Collections.Generic.IList), string highIopsSupported = default(string), System.Collections.Generic.IList hyperVGenerations = default(System.Collections.Generic.IList)) + { - Name = name; - FriendlyName = friendlyName; - CpuCoresCount = cpuCoresCount; - VCPUsAvailable = vCPUsAvailable; - MemoryInGB = memoryInGB; - MaxDataDiskCount = maxDataDiskCount; - MaxNicsCount = maxNicsCount; - Errors = errors; - HighIopsSupported = highIopsSupported; - HyperVGenerations = hyperVGenerations; + this.Name = name; + this.FriendlyName = friendlyName; + this.CpuCoresCount = cpuCoresCount; + this.VCpUsAvailable = vCpUsAvailable; + this.MemoryInGb = memoryInGb; + this.MaxDataDiskCount = maxDataDiskCount; + this.MaxNicsCount = maxNicsCount; + this.Errors = errors; + this.HighIopsSupported = highIopsSupported; + this.HyperVGenerations = hyperVGenerations; CustomInit(); } @@ -72,71 +75,67 @@ public TargetComputeSizeProperties() /// partial void CustomInit(); + /// /// Gets or sets target compute size name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets target compute size display name. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// - /// Gets or sets the maximum cpu cores count supported by target - /// compute size. + /// Gets or sets the maximum cpu cores count supported by target compute size. /// - [JsonProperty(PropertyName = "cpuCoresCount")] - public int? CpuCoresCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cpuCoresCount")] + public int? CpuCoresCount {get; set; } /// /// Gets the Available vCPUs supported by target compute size. /// - [JsonProperty(PropertyName = "vCPUsAvailable")] - public int? VCPUsAvailable { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vCPUsAvailable")] + public int? VCpUsAvailable {get; private set; } /// - /// Gets or sets the maximum memory in GB supported by target compute - /// size. + /// Gets or sets the maximum memory in GB supported by target compute size. /// - [JsonProperty(PropertyName = "memoryInGB")] - public double? MemoryInGB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "memoryInGB")] + public double? MemoryInGb {get; set; } /// - /// Gets or sets the maximum data disks count supported by target - /// compute size. + /// Gets or sets the maximum data disks count supported by target compute size. /// - [JsonProperty(PropertyName = "maxDataDiskCount")] - public int? MaxDataDiskCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "maxDataDiskCount")] + public int? MaxDataDiskCount {get; set; } /// - /// Gets or sets the maximum Nics count supported by target compute - /// size. + /// Gets or sets the maximum Nics count supported by target compute size. /// - [JsonProperty(PropertyName = "maxNicsCount")] - public int? MaxNicsCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "maxNicsCount")] + public int? MaxNicsCount {get; set; } /// - /// Gets or sets the reasons why the target compute size is not - /// applicable for the protected item. + /// Gets or sets the reasons why the target compute size is not applicable for + /// the protected item. /// - [JsonProperty(PropertyName = "errors")] - public IList Errors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "errors")] + public System.Collections.Generic.IList Errors {get; set; } /// - /// Gets or sets the value indicating whether the target compute size - /// supports high Iops. + /// Gets or sets the value indicating whether the target compute size supports + /// high Iops. /// - [JsonProperty(PropertyName = "highIopsSupported")] - public string HighIopsSupported { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "highIopsSupported")] + public string HighIopsSupported {get; set; } /// /// Gets or sets the supported HyperV Generations. /// - [JsonProperty(PropertyName = "hyperVGenerations")] - public IList HyperVGenerations { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "hyperVGenerations")] + public System.Collections.Generic.IList HyperVGenerations {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TaskTypeDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TaskTypeDetails.cs index 9953a1452279..45ca10e30e44 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TaskTypeDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TaskTypeDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public TaskTypeDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverCleanupInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverCleanupInput.cs index df4494989bb4..1377e943a0bd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverCleanupInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverCleanupInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public TestFailoverCleanupInput() /// /// Initializes a new instance of the TestFailoverCleanupInput class. /// - /// Test failover cleanup input - /// properties. + + /// Test failover cleanup input properties. + /// public TestFailoverCleanupInput(TestFailoverCleanupInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,28 +38,28 @@ public TestFailoverCleanupInput(TestFailoverCleanupInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets test failover cleanup input properties. /// - [JsonProperty(PropertyName = "properties")] - public TestFailoverCleanupInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public TestFailoverCleanupInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverCleanupInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverCleanupInputProperties.cs index 60696e21e3a1..3296d7c32ee6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverCleanupInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverCleanupInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class TestFailoverCleanupInputProperties { /// - /// Initializes a new instance of the - /// TestFailoverCleanupInputProperties class. + /// Initializes a new instance of the TestFailoverCleanupInputProperties class. /// public TestFailoverCleanupInputProperties() { @@ -29,13 +21,15 @@ public TestFailoverCleanupInputProperties() } /// - /// Initializes a new instance of the - /// TestFailoverCleanupInputProperties class. + /// Initializes a new instance of the TestFailoverCleanupInputProperties class. /// - /// Test failover cleanup comments. + + /// Test failover cleanup comments. + /// public TestFailoverCleanupInputProperties(string comments = default(string)) + { - Comments = comments; + this.Comments = comments; CustomInit(); } @@ -44,27 +38,27 @@ public TestFailoverCleanupInputProperties() /// partial void CustomInit(); + /// /// Gets or sets test failover cleanup comments. /// - [JsonProperty(PropertyName = "comments")] - public string Comments { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "comments")] + public string Comments {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Comments != null) + if (this.Comments != null) { - if (Comments.Length > 1024) + if (this.Comments.Length > 1024) { - throw new ValidationException(ValidationRules.MaxLength, "Comments", 1024); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Comments", 1024); } } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverInput.cs index f100453fb0a8..f3426434da66 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +23,13 @@ public TestFailoverInput() /// /// Initializes a new instance of the TestFailoverInput class. /// - /// Test failover input properties. + + /// Test failover input properties. + /// public TestFailoverInput(TestFailoverInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,24 +38,25 @@ public TestFailoverInput(TestFailoverInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets test failover input properties. /// - [JsonProperty(PropertyName = "properties")] - public TestFailoverInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public TestFailoverInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverInputProperties.cs index b2eb3df6c60e..e5c7a9bd6435 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class TestFailoverInputProperties { /// - /// Initializes a new instance of the TestFailoverInputProperties - /// class. + /// Initializes a new instance of the TestFailoverInputProperties class. /// public TestFailoverInputProperties() { @@ -28,22 +21,27 @@ public TestFailoverInputProperties() } /// - /// Initializes a new instance of the TestFailoverInputProperties - /// class. + /// Initializes a new instance of the TestFailoverInputProperties class. /// - /// Test failover direction. - /// Network type to be used for test - /// failover. - /// The id of the network to be used for test - /// failover. - /// Provider specific - /// settings. + + /// Test failover direction. + /// + + /// Network type to be used for test failover. + /// + + /// The id of the network to be used for test failover. + /// + + /// Provider specific settings. + /// public TestFailoverInputProperties(string failoverDirection = default(string), string networkType = default(string), string networkId = default(string), TestFailoverProviderSpecificInput providerSpecificDetails = default(TestFailoverProviderSpecificInput)) + { - FailoverDirection = failoverDirection; - NetworkType = networkType; - NetworkId = networkId; - ProviderSpecificDetails = providerSpecificDetails; + this.FailoverDirection = failoverDirection; + this.NetworkType = networkType; + this.NetworkId = networkId; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -52,29 +50,29 @@ public TestFailoverInputProperties() /// partial void CustomInit(); + /// /// Gets or sets test failover direction. /// - [JsonProperty(PropertyName = "failoverDirection")] - public string FailoverDirection { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection {get; set; } /// /// Gets or sets network type to be used for test failover. /// - [JsonProperty(PropertyName = "networkType")] - public string NetworkType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkType")] + public string NetworkType {get; set; } /// /// Gets or sets the id of the network to be used for test failover. /// - [JsonProperty(PropertyName = "networkId")] - public string NetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkId")] + public string NetworkId {get; set; } /// /// Gets or sets provider specific settings. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public TestFailoverProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public TestFailoverProviderSpecificInput ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverJobDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverJobDetails.cs index 8324a8f0aceb..92b2026f688c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverJobDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverJobDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,26 +24,38 @@ public TestFailoverJobDetails() /// /// Initializes a new instance of the TestFailoverJobDetails class. /// - /// The affected object properties - /// like source server, source cloud, target server, target cloud etc. - /// based on the workflow object details. - /// The test failover status. - /// The test failover comments. - /// The test network name. - /// The test network friendly - /// name. - /// The test network type (see - /// TestFailoverInput enum for possible values). - /// The test VM details. - public TestFailoverJobDetails(IDictionary affectedObjectDetails = default(IDictionary), string testFailoverStatus = default(string), string comments = default(string), string networkName = default(string), string networkFriendlyName = default(string), string networkType = default(string), IList protectedItemDetails = default(IList)) - : base(affectedObjectDetails) + + /// The affected object properties like source server, source cloud, target + /// server, target cloud etc. based on the workflow object details. + /// + + /// The test failover status. + /// + + /// The test failover comments. + /// + + /// The test network name. + /// + + /// The test network friendly name. + /// + + /// The test network type (see TestFailoverInput enum for possible values). + /// + + /// The test VM details. + /// + public TestFailoverJobDetails(System.Collections.Generic.IDictionary affectedObjectDetails = default(System.Collections.Generic.IDictionary), string testFailoverStatus = default(string), string comments = default(string), string networkName = default(string), string networkFriendlyName = default(string), string networkType = default(string), System.Collections.Generic.IList protectedItemDetails = default(System.Collections.Generic.IList)) + + : base(affectedObjectDetails) { - TestFailoverStatus = testFailoverStatus; - Comments = comments; - NetworkName = networkName; - NetworkFriendlyName = networkFriendlyName; - NetworkType = networkType; - ProtectedItemDetails = protectedItemDetails; + this.TestFailoverStatus = testFailoverStatus; + this.Comments = comments; + this.NetworkName = networkName; + this.NetworkFriendlyName = networkFriendlyName; + this.NetworkType = networkType; + this.ProtectedItemDetails = protectedItemDetails; CustomInit(); } @@ -60,42 +64,42 @@ public TestFailoverJobDetails() /// partial void CustomInit(); + /// /// Gets or sets the test failover status. /// - [JsonProperty(PropertyName = "testFailoverStatus")] - public string TestFailoverStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testFailoverStatus")] + public string TestFailoverStatus {get; set; } /// /// Gets or sets the test failover comments. /// - [JsonProperty(PropertyName = "comments")] - public string Comments { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "comments")] + public string Comments {get; set; } /// /// Gets or sets the test network name. /// - [JsonProperty(PropertyName = "networkName")] - public string NetworkName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkName")] + public string NetworkName {get; set; } /// /// Gets or sets the test network friendly name. /// - [JsonProperty(PropertyName = "networkFriendlyName")] - public string NetworkFriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkFriendlyName")] + public string NetworkFriendlyName {get; set; } /// - /// Gets or sets the test network type (see TestFailoverInput enum for - /// possible values). + /// Gets or sets the test network type (see TestFailoverInput enum for possible + /// values). /// - [JsonProperty(PropertyName = "networkType")] - public string NetworkType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkType")] + public string NetworkType {get; set; } /// /// Gets or sets the test VM details. /// - [JsonProperty(PropertyName = "protectedItemDetails")] - public IList ProtectedItemDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemDetails")] + public System.Collections.Generic.IList ProtectedItemDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverProviderSpecificInput.cs index 693fb2165217..ea7c4faa6b83 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestFailoverProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class TestFailoverProviderSpecificInput { /// - /// Initializes a new instance of the TestFailoverProviderSpecificInput - /// class. + /// Initializes a new instance of the TestFailoverProviderSpecificInput class. /// public TestFailoverProviderSpecificInput() { @@ -35,4 +28,4 @@ public TestFailoverProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateCleanupInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateCleanupInput.cs index 3574ea3f5940..f4405335f0bc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateCleanupInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateCleanupInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public TestMigrateCleanupInput() /// /// Initializes a new instance of the TestMigrateCleanupInput class. /// - /// Test migrate cleanup input - /// properties. + + /// Test migrate cleanup input properties. + /// public TestMigrateCleanupInput(TestMigrateCleanupInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,28 +38,28 @@ public TestMigrateCleanupInput(TestMigrateCleanupInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets test migrate cleanup input properties. /// - [JsonProperty(PropertyName = "properties")] - public TestMigrateCleanupInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public TestMigrateCleanupInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateCleanupInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateCleanupInputProperties.cs index 32b37896e33c..3695da817f7e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateCleanupInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateCleanupInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class TestMigrateCleanupInputProperties { /// - /// Initializes a new instance of the TestMigrateCleanupInputProperties - /// class. + /// Initializes a new instance of the TestMigrateCleanupInputProperties class. /// public TestMigrateCleanupInputProperties() { @@ -29,13 +21,15 @@ public TestMigrateCleanupInputProperties() } /// - /// Initializes a new instance of the TestMigrateCleanupInputProperties - /// class. + /// Initializes a new instance of the TestMigrateCleanupInputProperties class. /// - /// Test migrate cleanup comments. + + /// Test migrate cleanup comments. + /// public TestMigrateCleanupInputProperties(string comments = default(string)) + { - Comments = comments; + this.Comments = comments; CustomInit(); } @@ -44,27 +38,27 @@ public TestMigrateCleanupInputProperties() /// partial void CustomInit(); + /// /// Gets or sets test migrate cleanup comments. /// - [JsonProperty(PropertyName = "comments")] - public string Comments { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "comments")] + public string Comments {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Comments != null) + if (this.Comments != null) { - if (Comments.Length > 1024) + if (this.Comments.Length > 1024) { - throw new ValidationException(ValidationRules.MaxLength, "Comments", 1024); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "Comments", 1024); } } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateInput.cs index 836345986f56..0583b0d6a67a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +23,13 @@ public TestMigrateInput() /// /// Initializes a new instance of the TestMigrateInput class. /// - /// Test migrate input properties. + + /// Test migrate input properties. + /// public TestMigrateInput(TestMigrateInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,28 +38,28 @@ public TestMigrateInput(TestMigrateInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets test migrate input properties. /// - [JsonProperty(PropertyName = "properties")] - public TestMigrateInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public TestMigrateInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateInputProperties.cs index 0b3643278e0c..cc6c12ca6fec 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public TestMigrateInputProperties() /// /// Initializes a new instance of the TestMigrateInputProperties class. /// - /// The provider specific - /// details. + + /// The provider specific details. + /// public TestMigrateInputProperties(TestMigrateProviderSpecificInput providerSpecificDetails) + { - ProviderSpecificDetails = providerSpecificDetails; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -43,24 +38,25 @@ public TestMigrateInputProperties(TestMigrateProviderSpecificInput providerSpeci /// partial void CustomInit(); + /// /// Gets or sets the provider specific details. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public TestMigrateProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public TestMigrateProviderSpecificInput ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ProviderSpecificDetails == null) + if (this.ProviderSpecificDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProviderSpecificDetails"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateProviderSpecificInput.cs index 24a3c9935884..810bb3d8c3cc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrateProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class TestMigrateProviderSpecificInput { /// - /// Initializes a new instance of the TestMigrateProviderSpecificInput - /// class. + /// Initializes a new instance of the TestMigrateProviderSpecificInput class. /// public TestMigrateProviderSpecificInput() { @@ -35,4 +28,4 @@ public TestMigrateProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrationState.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrationState.cs index 5bfabb91eed3..2d6e2529c6d1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrationState.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/TestMigrationState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for TestMigrationState. /// + + public static class TestMigrationState { public const string None = "None"; @@ -24,4 +21,4 @@ public static class TestMigrationState public const string TestMigrationCompletedWithInformation = "TestMigrationCompletedWithInformation"; public const string TestMigrationPartiallySucceeded = "TestMigrationPartiallySucceeded"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverInput.cs index fe9ce95e0d2e..b71443ab741d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public UnplannedFailoverInput() /// /// Initializes a new instance of the UnplannedFailoverInput class. /// - /// Unplanned failover input - /// properties. + + /// Unplanned failover input properties. + /// public UnplannedFailoverInput(UnplannedFailoverInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,24 +38,25 @@ public UnplannedFailoverInput(UnplannedFailoverInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets unplanned failover input properties. /// - [JsonProperty(PropertyName = "properties")] - public UnplannedFailoverInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UnplannedFailoverInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverInputProperties.cs index 8a7fd3df6051..5f6472f10f6a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UnplannedFailoverInputProperties { /// - /// Initializes a new instance of the UnplannedFailoverInputProperties - /// class. + /// Initializes a new instance of the UnplannedFailoverInputProperties class. /// public UnplannedFailoverInputProperties() { @@ -28,19 +21,23 @@ public UnplannedFailoverInputProperties() } /// - /// Initializes a new instance of the UnplannedFailoverInputProperties - /// class. + /// Initializes a new instance of the UnplannedFailoverInputProperties class. /// - /// Failover direction. - /// Source site operations - /// status. - /// Provider specific - /// settings. + + /// Failover direction. + /// + + /// Source site operations status. + /// + + /// Provider specific settings. + /// public UnplannedFailoverInputProperties(string failoverDirection = default(string), string sourceSiteOperations = default(string), UnplannedFailoverProviderSpecificInput providerSpecificDetails = default(UnplannedFailoverProviderSpecificInput)) + { - FailoverDirection = failoverDirection; - SourceSiteOperations = sourceSiteOperations; - ProviderSpecificDetails = providerSpecificDetails; + this.FailoverDirection = failoverDirection; + this.SourceSiteOperations = sourceSiteOperations; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -49,23 +46,23 @@ public UnplannedFailoverInputProperties() /// partial void CustomInit(); + /// /// Gets or sets failover direction. /// - [JsonProperty(PropertyName = "failoverDirection")] - public string FailoverDirection { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection {get; set; } /// /// Gets or sets source site operations status. /// - [JsonProperty(PropertyName = "sourceSiteOperations")] - public string SourceSiteOperations { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceSiteOperations")] + public string SourceSiteOperations {get; set; } /// /// Gets or sets provider specific settings. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public UnplannedFailoverProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public UnplannedFailoverProviderSpecificInput ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverProviderSpecificInput.cs index f19f3219a650..9695a819ee82 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UnplannedFailoverProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UnplannedFailoverProviderSpecificInput { /// - /// Initializes a new instance of the - /// UnplannedFailoverProviderSpecificInput class. + /// Initializes a new instance of the UnplannedFailoverProviderSpecificInput class. /// public UnplannedFailoverProviderSpecificInput() { @@ -35,4 +28,4 @@ public UnplannedFailoverProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemInput.cs index c2bff8d34daa..ad75b0eb0b90 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateApplianceForReplicationProtectedItemInput { /// - /// Initializes a new instance of the - /// UpdateApplianceForReplicationProtectedItemInput class. + /// Initializes a new instance of the UpdateApplianceForReplicationProtectedItemInput class. /// public UpdateApplianceForReplicationProtectedItemInput() { @@ -29,14 +21,15 @@ public UpdateApplianceForReplicationProtectedItemInput() } /// - /// Initializes a new instance of the - /// UpdateApplianceForReplicationProtectedItemInput class. + /// Initializes a new instance of the UpdateApplianceForReplicationProtectedItemInput class. /// - /// Update appliance replication protected - /// item properties. + + /// Update appliance replication protected item properties. + /// public UpdateApplianceForReplicationProtectedItemInput(UpdateApplianceForReplicationProtectedItemInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -45,29 +38,28 @@ public UpdateApplianceForReplicationProtectedItemInput(UpdateApplianceForReplica /// partial void CustomInit(); + /// - /// Gets or sets update appliance replication protected item - /// properties. + /// Gets or sets update appliance replication protected item properties. /// - [JsonProperty(PropertyName = "properties")] - public UpdateApplianceForReplicationProtectedItemInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UpdateApplianceForReplicationProtectedItemInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemInputProperties.cs index 7bb2562516aa..bccf49dc4afd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateApplianceForReplicationProtectedItemInputProperties { /// - /// Initializes a new instance of the - /// UpdateApplianceForReplicationProtectedItemInputProperties class. + /// Initializes a new instance of the UpdateApplianceForReplicationProtectedItemInputProperties class. /// public UpdateApplianceForReplicationProtectedItemInputProperties() { @@ -29,16 +21,19 @@ public UpdateApplianceForReplicationProtectedItemInputProperties() } /// - /// Initializes a new instance of the - /// UpdateApplianceForReplicationProtectedItemInputProperties class. + /// Initializes a new instance of the UpdateApplianceForReplicationProtectedItemInputProperties class. /// - /// The target appliance Id. - /// The provider specific input - /// to update replication protected item. + + /// The target appliance Id. + /// + + /// The provider specific input to update replication protected item. + /// public UpdateApplianceForReplicationProtectedItemInputProperties(string targetApplianceId, UpdateApplianceForReplicationProtectedItemProviderSpecificInput providerSpecificDetails) + { - TargetApplianceId = targetApplianceId; - ProviderSpecificDetails = providerSpecificDetails; + this.TargetApplianceId = targetApplianceId; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -47,35 +42,37 @@ public UpdateApplianceForReplicationProtectedItemInputProperties(string targetAp /// partial void CustomInit(); + /// /// Gets or sets the target appliance Id. /// - [JsonProperty(PropertyName = "targetApplianceId")] - public string TargetApplianceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetApplianceId")] + public string TargetApplianceId {get; set; } /// - /// Gets or sets the provider specific input to update replication - /// protected item. + /// Gets or sets the provider specific input to update replication protected + /// item. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public UpdateApplianceForReplicationProtectedItemProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public UpdateApplianceForReplicationProtectedItemProviderSpecificInput ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (TargetApplianceId == null) + if (this.TargetApplianceId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetApplianceId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetApplianceId"); } - if (ProviderSpecificDetails == null) + if (this.ProviderSpecificDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProviderSpecificDetails"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemProviderSpecificInput.cs index 2ff86800be3b..42dcc8cf209e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateApplianceForReplicationProtectedItemProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,9 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateApplianceForReplicationProtectedItemProviderSpecificInput { /// - /// Initializes a new instance of the - /// UpdateApplianceForReplicationProtectedItemProviderSpecificInput - /// class. + /// Initializes a new instance of the UpdateApplianceForReplicationProtectedItemProviderSpecificInput class. /// public UpdateApplianceForReplicationProtectedItemProviderSpecificInput() { @@ -36,4 +28,4 @@ public UpdateApplianceForReplicationProtectedItemProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateDiskInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateDiskInput.cs index e6bf4f91e71d..bb6e92e99cc8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateDiskInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateDiskInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,12 +23,17 @@ public UpdateDiskInput() /// /// Initializes a new instance of the UpdateDiskInput class. /// - /// The disk Id. - /// The target disk name. + + /// The disk Id. + /// + + /// The target disk name. + /// public UpdateDiskInput(string diskId, string targetDiskName = default(string)) + { - DiskId = diskId; - TargetDiskName = targetDiskName; + this.DiskId = diskId; + this.TargetDiskName = targetDiskName; CustomInit(); } @@ -44,30 +42,32 @@ public UpdateDiskInput() /// partial void CustomInit(); + /// /// Gets or sets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the target disk name. /// - [JsonProperty(PropertyName = "targetDiskName")] - public string TargetDiskName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDiskName")] + public string TargetDiskName {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (DiskId == null) + if (this.DiskId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskId"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemInput.cs index eca29e199163..204f4bca5b21 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public UpdateMigrationItemInput() /// /// Initializes a new instance of the UpdateMigrationItemInput class. /// - /// Update migration item input - /// properties. + + /// Update migration item input properties. + /// public UpdateMigrationItemInput(UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,24 +38,24 @@ public UpdateMigrationItemInput() /// partial void CustomInit(); + /// /// Gets or sets update migration item input properties. /// - [JsonProperty(PropertyName = "properties")] - public UpdateMigrationItemInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UpdateMigrationItemInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties != null) + if (this.Properties != null) { - Properties.Validate(); + this.Properties.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemInputProperties.cs index 0011f3391617..29711045b334 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemInputProperties.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateMigrationItemInputProperties { /// - /// Initializes a new instance of the - /// UpdateMigrationItemInputProperties class. + /// Initializes a new instance of the UpdateMigrationItemInputProperties class. /// public UpdateMigrationItemInputProperties() { @@ -29,14 +21,15 @@ public UpdateMigrationItemInputProperties() } /// - /// Initializes a new instance of the - /// UpdateMigrationItemInputProperties class. + /// Initializes a new instance of the UpdateMigrationItemInputProperties class. /// - /// The provider specific input - /// to update migration item. + + /// The provider specific input to update migration item. + /// public UpdateMigrationItemInputProperties(UpdateMigrationItemProviderSpecificInput providerSpecificDetails) + { - ProviderSpecificDetails = providerSpecificDetails; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -45,24 +38,25 @@ public UpdateMigrationItemInputProperties(UpdateMigrationItemProviderSpecificInp /// partial void CustomInit(); + /// /// Gets or sets the provider specific input to update migration item. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public UpdateMigrationItemProviderSpecificInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public UpdateMigrationItemProviderSpecificInput ProviderSpecificDetails {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ProviderSpecificDetails == null) + if (this.ProviderSpecificDetails == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProviderSpecificDetails"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemProviderSpecificInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemProviderSpecificInput.cs index 0372f897f63e..72b9d6305dee 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemProviderSpecificInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMigrationItemProviderSpecificInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateMigrationItemProviderSpecificInput { /// - /// Initializes a new instance of the - /// UpdateMigrationItemProviderSpecificInput class. + /// Initializes a new instance of the UpdateMigrationItemProviderSpecificInput class. /// public UpdateMigrationItemProviderSpecificInput() { @@ -35,4 +28,4 @@ public UpdateMigrationItemProviderSpecificInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMobilityServiceRequest.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMobilityServiceRequest.cs index 2975d7cfea68..7f917663d790 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMobilityServiceRequest.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMobilityServiceRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateMobilityServiceRequest { /// - /// Initializes a new instance of the UpdateMobilityServiceRequest - /// class. + /// Initializes a new instance of the UpdateMobilityServiceRequest class. /// public UpdateMobilityServiceRequest() { @@ -28,14 +21,15 @@ public UpdateMobilityServiceRequest() } /// - /// Initializes a new instance of the UpdateMobilityServiceRequest - /// class. + /// Initializes a new instance of the UpdateMobilityServiceRequest class. /// - /// The properties of the update mobility - /// service request. + + /// The properties of the update mobility service request. + /// public UpdateMobilityServiceRequest(UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -44,11 +38,11 @@ public UpdateMobilityServiceRequest() /// partial void CustomInit(); + /// /// Gets or sets the properties of the update mobility service request. /// - [JsonProperty(PropertyName = "properties")] - public UpdateMobilityServiceRequestProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UpdateMobilityServiceRequestProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMobilityServiceRequestProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMobilityServiceRequestProperties.cs index cdb79726fe0d..a3c9523a5c04 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMobilityServiceRequestProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateMobilityServiceRequestProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateMobilityServiceRequestProperties { /// - /// Initializes a new instance of the - /// UpdateMobilityServiceRequestProperties class. + /// Initializes a new instance of the UpdateMobilityServiceRequestProperties class. /// public UpdateMobilityServiceRequestProperties() { @@ -28,13 +21,15 @@ public UpdateMobilityServiceRequestProperties() } /// - /// Initializes a new instance of the - /// UpdateMobilityServiceRequestProperties class. + /// Initializes a new instance of the UpdateMobilityServiceRequestProperties class. /// - /// The CS run as account Id. + + /// The CS run as account Id. + /// public UpdateMobilityServiceRequestProperties(string runAsAccountId = default(string)) + { - RunAsAccountId = runAsAccountId; + this.RunAsAccountId = runAsAccountId; CustomInit(); } @@ -43,11 +38,11 @@ public UpdateMobilityServiceRequestProperties() /// partial void CustomInit(); + /// /// Gets or sets the CS run as account Id. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateNetworkMappingInput.cs index 92543af20f83..3cb0e9fccfa6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateNetworkMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public UpdateNetworkMappingInput() /// /// Initializes a new instance of the UpdateNetworkMappingInput class. /// - /// The input properties needed to update - /// network mapping. + + /// The input properties needed to update network mapping. + /// public UpdateNetworkMappingInput(UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,11 +38,11 @@ public UpdateNetworkMappingInput() /// partial void CustomInit(); + /// /// Gets or sets the input properties needed to update network mapping. /// - [JsonProperty(PropertyName = "properties")] - public UpdateNetworkMappingInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UpdateNetworkMappingInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateNetworkMappingInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateNetworkMappingInputProperties.cs index 6658e97b44c4..3cf07bff89ed 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateNetworkMappingInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateNetworkMappingInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateNetworkMappingInputProperties { /// - /// Initializes a new instance of the - /// UpdateNetworkMappingInputProperties class. + /// Initializes a new instance of the UpdateNetworkMappingInputProperties class. /// public UpdateNetworkMappingInputProperties() { @@ -28,18 +21,23 @@ public UpdateNetworkMappingInputProperties() } /// - /// Initializes a new instance of the - /// UpdateNetworkMappingInputProperties class. + /// Initializes a new instance of the UpdateNetworkMappingInputProperties class. /// - /// Recovery fabric name. - /// Recovery network Id. - /// Fabrics specific input network - /// Id. + + /// Recovery fabric name. + /// + + /// Recovery network Id. + /// + + /// Fabrics specific input network Id. + /// public UpdateNetworkMappingInputProperties(string recoveryFabricName = default(string), string recoveryNetworkId = default(string), FabricSpecificUpdateNetworkMappingInput fabricSpecificDetails = default(FabricSpecificUpdateNetworkMappingInput)) + { - RecoveryFabricName = recoveryFabricName; - RecoveryNetworkId = recoveryNetworkId; - FabricSpecificDetails = fabricSpecificDetails; + this.RecoveryFabricName = recoveryFabricName; + this.RecoveryNetworkId = recoveryNetworkId; + this.FabricSpecificDetails = fabricSpecificDetails; CustomInit(); } @@ -48,23 +46,23 @@ public UpdateNetworkMappingInputProperties() /// partial void CustomInit(); + /// /// Gets or sets recovery fabric name. /// - [JsonProperty(PropertyName = "recoveryFabricName")] - public string RecoveryFabricName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryFabricName")] + public string RecoveryFabricName {get; set; } /// /// Gets or sets recovery network Id. /// - [JsonProperty(PropertyName = "recoveryNetworkId")] - public string RecoveryNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNetworkId")] + public string RecoveryNetworkId {get; set; } /// /// Gets or sets fabrics specific input network Id. /// - [JsonProperty(PropertyName = "fabricSpecificDetails")] - public FabricSpecificUpdateNetworkMappingInput FabricSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricSpecificDetails")] + public FabricSpecificUpdateNetworkMappingInput FabricSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdatePolicyInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdatePolicyInput.cs index adeb6c6fe079..f384fa8ed432 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdatePolicyInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdatePolicyInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public UpdatePolicyInput() /// /// Initializes a new instance of the UpdatePolicyInput class. /// - /// The ReplicationProviderSettings. + + /// The ReplicationProviderSettings. + /// public UpdatePolicyInput(UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public UpdatePolicyInput() /// partial void CustomInit(); + /// /// Gets or sets the ReplicationProviderSettings. /// - [JsonProperty(PropertyName = "properties")] - public UpdatePolicyInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UpdatePolicyInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdatePolicyInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdatePolicyInputProperties.cs index cd809ac28d24..564f2b7e503e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdatePolicyInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdatePolicyInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdatePolicyInputProperties { /// - /// Initializes a new instance of the UpdatePolicyInputProperties - /// class. + /// Initializes a new instance of the UpdatePolicyInputProperties class. /// public UpdatePolicyInputProperties() { @@ -28,14 +21,15 @@ public UpdatePolicyInputProperties() } /// - /// Initializes a new instance of the UpdatePolicyInputProperties - /// class. + /// Initializes a new instance of the UpdatePolicyInputProperties class. /// - /// The - /// ReplicationProviderSettings. + + /// The ReplicationProviderSettings. + /// public UpdatePolicyInputProperties(PolicyProviderSpecificInput replicationProviderSettings = default(PolicyProviderSpecificInput)) + { - ReplicationProviderSettings = replicationProviderSettings; + this.ReplicationProviderSettings = replicationProviderSettings; CustomInit(); } @@ -44,11 +38,11 @@ public UpdatePolicyInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the ReplicationProviderSettings. /// - [JsonProperty(PropertyName = "replicationProviderSettings")] - public PolicyProviderSpecificInput ReplicationProviderSettings { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationProviderSettings")] + public PolicyProviderSpecificInput ReplicationProviderSettings {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateProtectionContainerMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateProtectionContainerMappingInput.cs index 0d6dacc980b3..e6e5a8a62a5f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateProtectionContainerMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateProtectionContainerMappingInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateProtectionContainerMappingInput { /// - /// Initializes a new instance of the - /// UpdateProtectionContainerMappingInput class. + /// Initializes a new instance of the UpdateProtectionContainerMappingInput class. /// public UpdateProtectionContainerMappingInput() { @@ -28,14 +21,15 @@ public UpdateProtectionContainerMappingInput() } /// - /// Initializes a new instance of the - /// UpdateProtectionContainerMappingInput class. + /// Initializes a new instance of the UpdateProtectionContainerMappingInput class. /// - /// Update protection container mapping input - /// properties. + + /// Update protection container mapping input properties. + /// public UpdateProtectionContainerMappingInput(UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -44,11 +38,11 @@ public UpdateProtectionContainerMappingInput() /// partial void CustomInit(); + /// /// Gets or sets update protection container mapping input properties. /// - [JsonProperty(PropertyName = "properties")] - public UpdateProtectionContainerMappingInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UpdateProtectionContainerMappingInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateProtectionContainerMappingInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateProtectionContainerMappingInputProperties.cs index 377628b7b201..d5bd07a198a0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateProtectionContainerMappingInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateProtectionContainerMappingInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateProtectionContainerMappingInputProperties { /// - /// Initializes a new instance of the - /// UpdateProtectionContainerMappingInputProperties class. + /// Initializes a new instance of the UpdateProtectionContainerMappingInputProperties class. /// public UpdateProtectionContainerMappingInputProperties() { @@ -28,14 +21,15 @@ public UpdateProtectionContainerMappingInputProperties() } /// - /// Initializes a new instance of the - /// UpdateProtectionContainerMappingInputProperties class. + /// Initializes a new instance of the UpdateProtectionContainerMappingInputProperties class. /// - /// Provider specific input for - /// updating protection container mapping. + + /// Provider specific input for updating protection container mapping. + /// public UpdateProtectionContainerMappingInputProperties(ReplicationProviderSpecificUpdateContainerMappingInput providerSpecificInput = default(ReplicationProviderSpecificUpdateContainerMappingInput)) + { - ProviderSpecificInput = providerSpecificInput; + this.ProviderSpecificInput = providerSpecificInput; CustomInit(); } @@ -44,12 +38,12 @@ public UpdateProtectionContainerMappingInputProperties() /// partial void CustomInit(); + /// - /// Gets or sets provider specific input for updating protection - /// container mapping. + /// Gets or sets provider specific input for updating protection container + /// mapping. /// - [JsonProperty(PropertyName = "providerSpecificInput")] - public ReplicationProviderSpecificUpdateContainerMappingInput ProviderSpecificInput { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificInput")] + public ReplicationProviderSpecificUpdateContainerMappingInput ProviderSpecificInput {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateRecoveryPlanInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateRecoveryPlanInput.cs index 5fde6b6a4277..4c6a7de4684f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateRecoveryPlanInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateRecoveryPlanInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public UpdateRecoveryPlanInput() /// /// Initializes a new instance of the UpdateRecoveryPlanInput class. /// - /// Recovery plan update properties. + + /// Recovery plan update properties. + /// public UpdateRecoveryPlanInput(UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -41,11 +38,11 @@ public UpdateRecoveryPlanInput() /// partial void CustomInit(); + /// /// Gets or sets recovery plan update properties. /// - [JsonProperty(PropertyName = "properties")] - public UpdateRecoveryPlanInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UpdateRecoveryPlanInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateRecoveryPlanInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateRecoveryPlanInputProperties.cs index b94702f74e3c..01fd992485fc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateRecoveryPlanInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateRecoveryPlanInputProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateRecoveryPlanInputProperties { /// - /// Initializes a new instance of the UpdateRecoveryPlanInputProperties - /// class. + /// Initializes a new instance of the UpdateRecoveryPlanInputProperties class. /// public UpdateRecoveryPlanInputProperties() { @@ -30,13 +21,15 @@ public UpdateRecoveryPlanInputProperties() } /// - /// Initializes a new instance of the UpdateRecoveryPlanInputProperties - /// class. + /// Initializes a new instance of the UpdateRecoveryPlanInputProperties class. /// - /// The recovery plan groups. - public UpdateRecoveryPlanInputProperties(IList groups = default(IList)) + + /// The recovery plan groups. + /// + public UpdateRecoveryPlanInputProperties(System.Collections.Generic.IList groups = default(System.Collections.Generic.IList)) + { - Groups = groups; + this.Groups = groups; CustomInit(); } @@ -45,11 +38,11 @@ public UpdateRecoveryPlanInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the recovery plan groups. /// - [JsonProperty(PropertyName = "groups")] - public IList Groups { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "groups")] + public System.Collections.Generic.IList Groups {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemInput.cs index fa529578a742..3a6280908565 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateReplicationProtectedItemInput { /// - /// Initializes a new instance of the - /// UpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the UpdateReplicationProtectedItemInput class. /// public UpdateReplicationProtectedItemInput() { @@ -28,14 +21,15 @@ public UpdateReplicationProtectedItemInput() } /// - /// Initializes a new instance of the - /// UpdateReplicationProtectedItemInput class. + /// Initializes a new instance of the UpdateReplicationProtectedItemInput class. /// - /// Update replication protected item - /// properties. + + /// Update replication protected item properties. + /// public UpdateReplicationProtectedItemInput(UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -44,11 +38,11 @@ public UpdateReplicationProtectedItemInput() /// partial void CustomInit(); + /// /// Gets or sets update replication protected item properties. /// - [JsonProperty(PropertyName = "properties")] - public UpdateReplicationProtectedItemInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UpdateReplicationProtectedItemInputProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemInputProperties.cs index d66b9ee49893..560eb920b918 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemInputProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateReplicationProtectedItemInputProperties { /// - /// Initializes a new instance of the - /// UpdateReplicationProtectedItemInputProperties class. + /// Initializes a new instance of the UpdateReplicationProtectedItemInputProperties class. /// public UpdateReplicationProtectedItemInputProperties() { @@ -30,40 +21,53 @@ public UpdateReplicationProtectedItemInputProperties() } /// - /// Initializes a new instance of the - /// UpdateReplicationProtectedItemInputProperties class. + /// Initializes a new instance of the UpdateReplicationProtectedItemInputProperties class. /// - /// Target Azure VM name given by the - /// user. - /// Target Azure VM size. - /// Target Azure Network - /// Id. - /// The Azure Network Id for - /// test failover. - /// The selected source nic Id which - /// will be used as the primary nic during failover. - /// The selected option to enable - /// RDP\SSH on target vm after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. - /// The list of VM nic details. - /// License type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'WindowsServer' - /// The target availability set - /// Id. - /// The provider specific input - /// to update replication protected item. - public UpdateReplicationProtectedItemInputProperties(string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string selectedRecoveryAzureNetworkId = default(string), string selectedTfoAzureNetworkId = default(string), string selectedSourceNicId = default(string), string enableRdpOnTargetOption = default(string), IList vmNics = default(IList), string licenseType = default(string), string recoveryAvailabilitySetId = default(string), UpdateReplicationProtectedItemProviderInput providerSpecificDetails = default(UpdateReplicationProtectedItemProviderInput)) + + /// Target Azure VM name given by the user. + /// + + /// Target Azure VM size. + /// + + /// Target Azure Network Id. + /// + + /// The Azure Network Id for test failover. + /// + + /// The selected source nic Id which will be used as the primary nic during + /// failover. + /// + + /// The selected option to enable RDP\SSH on target vm after failover. String + /// value of SrsDataContract.EnableRDPOnTargetOption enum. + /// + + /// The list of VM nic details. + /// + + /// License type. + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' + + /// The target availability set Id. + /// + + /// The provider specific input to update replication protected item. + /// + public UpdateReplicationProtectedItemInputProperties(string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string selectedRecoveryAzureNetworkId = default(string), string selectedTfoAzureNetworkId = default(string), string selectedSourceNicId = default(string), string enableRdpOnTargetOption = default(string), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), string licenseType = default(string), string recoveryAvailabilitySetId = default(string), UpdateReplicationProtectedItemProviderInput providerSpecificDetails = default(UpdateReplicationProtectedItemProviderInput)) + { - RecoveryAzureVMName = recoveryAzureVMName; - RecoveryAzureVMSize = recoveryAzureVMSize; - SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; - SelectedTfoAzureNetworkId = selectedTfoAzureNetworkId; - SelectedSourceNicId = selectedSourceNicId; - EnableRdpOnTargetOption = enableRdpOnTargetOption; - VmNics = vmNics; - LicenseType = licenseType; - RecoveryAvailabilitySetId = recoveryAvailabilitySetId; - ProviderSpecificDetails = providerSpecificDetails; + this.RecoveryAzureVMName = recoveryAzureVMName; + this.RecoveryAzureVMSize = recoveryAzureVMSize; + this.SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + this.SelectedTfoAzureNetworkId = selectedTfoAzureNetworkId; + this.SelectedSourceNicId = selectedSourceNicId; + this.EnableRdpOnTargetOption = enableRdpOnTargetOption; + this.VMNics = vmNics; + this.LicenseType = licenseType; + this.RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + this.ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -72,70 +76,68 @@ public UpdateReplicationProtectedItemInputProperties() /// partial void CustomInit(); + /// /// Gets or sets target Azure VM name given by the user. /// - [JsonProperty(PropertyName = "recoveryAzureVMName")] - public string RecoveryAzureVMName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureVMName")] + public string RecoveryAzureVMName {get; set; } /// /// Gets or sets target Azure VM size. /// - [JsonProperty(PropertyName = "recoveryAzureVMSize")] - public string RecoveryAzureVMSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAzureVMSize")] + public string RecoveryAzureVMSize {get; set; } /// /// Gets or sets target Azure Network Id. /// - [JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] - public string SelectedRecoveryAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] + public string SelectedRecoveryAzureNetworkId {get; set; } /// /// Gets or sets the Azure Network Id for test failover. /// - [JsonProperty(PropertyName = "selectedTfoAzureNetworkId")] - public string SelectedTfoAzureNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedTfoAzureNetworkId")] + public string SelectedTfoAzureNetworkId {get; set; } /// - /// Gets or sets the selected source nic Id which will be used as the - /// primary nic during failover. + /// Gets or sets the selected source nic Id which will be used as the primary + /// nic during failover. /// - [JsonProperty(PropertyName = "selectedSourceNicId")] - public string SelectedSourceNicId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectedSourceNicId")] + public string SelectedSourceNicId {get; set; } /// - /// Gets or sets the selected option to enable RDP\SSH on target vm - /// after failover. String value of - /// SrsDataContract.EnableRDPOnTargetOption enum. + /// Gets or sets the selected option to enable RDP\SSH on target vm after + /// failover. String value of SrsDataContract.EnableRDPOnTargetOption enum. /// - [JsonProperty(PropertyName = "enableRdpOnTargetOption")] - public string EnableRdpOnTargetOption { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableRdpOnTargetOption")] + public string EnableRdpOnTargetOption {get; set; } /// /// Gets or sets the list of VM nic details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// - /// Gets or sets license type. Possible values include: 'NotSpecified', - /// 'NoLicenseType', 'WindowsServer' + /// Gets or sets license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// /// Gets or sets the target availability set Id. /// - [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] - public string RecoveryAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId {get; set; } /// - /// Gets or sets the provider specific input to update replication - /// protected item. + /// Gets or sets the provider specific input to update replication protected + /// item. /// - [JsonProperty(PropertyName = "providerSpecificDetails")] - public UpdateReplicationProtectedItemProviderInput ProviderSpecificDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "providerSpecificDetails")] + public UpdateReplicationProtectedItemProviderInput ProviderSpecificDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemProviderInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemProviderInput.cs index b6f0f72f4310..0517d9656e99 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemProviderInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateReplicationProtectedItemProviderInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateReplicationProtectedItemProviderInput { /// - /// Initializes a new instance of the - /// UpdateReplicationProtectedItemProviderInput class. + /// Initializes a new instance of the UpdateReplicationProtectedItemProviderInput class. /// public UpdateReplicationProtectedItemProviderInput() { @@ -35,4 +28,4 @@ public UpdateReplicationProtectedItemProviderInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateVCenterRequest.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateVCenterRequest.cs index f9345b0428d5..51747ef3e7c1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateVCenterRequest.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateVCenterRequest.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public UpdateVCenterRequest() /// /// Initializes a new instance of the UpdateVCenterRequest class. /// - /// The update VCenter Request - /// Properties. + + /// The update VCenter Request Properties. + /// public UpdateVCenterRequest(UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties)) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -42,11 +38,11 @@ public UpdateVCenterRequest() /// partial void CustomInit(); + /// /// Gets or sets the update VCenter Request Properties. /// - [JsonProperty(PropertyName = "properties")] - public UpdateVCenterRequestProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public UpdateVCenterRequestProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateVCenterRequestProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateVCenterRequestProperties.cs index 56879ceb4505..0eab14540ac9 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateVCenterRequestProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/UpdateVCenterRequestProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class UpdateVCenterRequestProperties { /// - /// Initializes a new instance of the UpdateVCenterRequestProperties - /// class. + /// Initializes a new instance of the UpdateVCenterRequestProperties class. /// public UpdateVCenterRequestProperties() { @@ -28,25 +21,31 @@ public UpdateVCenterRequestProperties() } /// - /// Initializes a new instance of the UpdateVCenterRequestProperties - /// class. + /// Initializes a new instance of the UpdateVCenterRequestProperties class. /// - /// The friendly name of the - /// vCenter. - /// The IP address of the vCenter to be - /// discovered. - /// The process server Id from where the - /// update can be orchestrated. - /// The port number for discovery. - /// The CS account Id which has privileges - /// to update the vCenter. + + /// The friendly name of the vCenter. + /// + + /// The IP address of the vCenter to be discovered. + /// + + /// The process server Id from where the update can be orchestrated. + /// + + /// The port number for discovery. + /// + + /// The CS account Id which has privileges to update the vCenter. + /// public UpdateVCenterRequestProperties(string friendlyName = default(string), string ipAddress = default(string), string processServerId = default(string), string port = default(string), string runAsAccountId = default(string)) + { - FriendlyName = friendlyName; - IpAddress = ipAddress; - ProcessServerId = processServerId; - Port = port; - RunAsAccountId = runAsAccountId; + this.FriendlyName = friendlyName; + this.IPAddress = ipAddress; + this.ProcessServerId = processServerId; + this.Port = port; + this.RunAsAccountId = runAsAccountId; CustomInit(); } @@ -55,37 +54,36 @@ public UpdateVCenterRequestProperties() /// partial void CustomInit(); + /// /// Gets or sets the friendly name of the vCenter. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets the IP address of the vCenter to be discovered. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the process server Id from where the update can be /// orchestrated. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the port number for discovery. /// - [JsonProperty(PropertyName = "port")] - public string Port { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "port")] + public string Port {get; set; } /// - /// Gets or sets the CS account Id which has privileges to update the - /// vCenter. + /// Gets or sets the CS account Id which has privileges to update the vCenter. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VCenter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VCenter.cs index 91a37f4fa144..f5404225cc10 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VCenter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VCenter.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public VCenter() /// /// Initializes a new instance of the VCenter class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// VCenter related data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// VCenter related data. + /// public VCenter(string id = default(string), string name = default(string), string type = default(string), string location = default(string), VCenterProperties properties = default(VCenterProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public VCenter() /// partial void CustomInit(); + /// /// Gets or sets vCenter related data. /// - [JsonProperty(PropertyName = "properties")] - public VCenterProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public VCenterProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VCenterProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VCenterProperties.cs index 158a69c634f4..25994dc64fdc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VCenterProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VCenterProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,35 +23,53 @@ public VCenterProperties() /// /// Initializes a new instance of the VCenterProperties class. /// - /// Friendly name of the vCenter. - /// VCenter internal ID. - /// The time when the last heartbeat was - /// received by vCenter. - /// The VCenter discovery status. - /// The process server Id. - /// The IP address of the vCenter. - /// The infrastructure Id of - /// vCenter. - /// The port number for discovery. - /// The account Id which has privileges to - /// discover the vCenter. - /// The ARM resource name of the - /// fabric containing this VCenter. - /// The health errors for this - /// VCenter. - public VCenterProperties(string friendlyName = default(string), string internalId = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string discoveryStatus = default(string), string processServerId = default(string), string ipAddress = default(string), string infrastructureId = default(string), string port = default(string), string runAsAccountId = default(string), string fabricArmResourceName = default(string), IList healthErrors = default(IList)) + + /// Friendly name of the vCenter. + /// + + /// VCenter internal ID. + /// + + /// The time when the last heartbeat was received by vCenter. + /// + + /// The VCenter discovery status. + /// + + /// The process server Id. + /// + + /// The IP address of the vCenter. + /// + + /// The infrastructure Id of vCenter. + /// + + /// The port number for discovery. + /// + + /// The account Id which has privileges to discover the vCenter. + /// + + /// The ARM resource name of the fabric containing this VCenter. + /// + + /// The health errors for this VCenter. + /// + public VCenterProperties(string friendlyName = default(string), string internalId = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string discoveryStatus = default(string), string processServerId = default(string), string ipAddress = default(string), string infrastructureId = default(string), string port = default(string), string runAsAccountId = default(string), string fabricArmResourceName = default(string), System.Collections.Generic.IList healthErrors = default(System.Collections.Generic.IList)) + { - FriendlyName = friendlyName; - InternalId = internalId; - LastHeartbeat = lastHeartbeat; - DiscoveryStatus = discoveryStatus; - ProcessServerId = processServerId; - IpAddress = ipAddress; - InfrastructureId = infrastructureId; - Port = port; - RunAsAccountId = runAsAccountId; - FabricArmResourceName = fabricArmResourceName; - HealthErrors = healthErrors; + this.FriendlyName = friendlyName; + this.InternalId = internalId; + this.LastHeartbeat = lastHeartbeat; + this.DiscoveryStatus = discoveryStatus; + this.ProcessServerId = processServerId; + this.IPAddress = ipAddress; + this.InfrastructureId = infrastructureId; + this.Port = port; + this.RunAsAccountId = runAsAccountId; + this.FabricArmResourceName = fabricArmResourceName; + this.HealthErrors = healthErrors; CustomInit(); } @@ -68,74 +78,71 @@ public VCenterProperties() /// partial void CustomInit(); + /// /// Gets or sets friendly name of the vCenter. /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName {get; set; } /// /// Gets or sets vCenter internal ID. /// - [JsonProperty(PropertyName = "internalId")] - public string InternalId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "internalId")] + public string InternalId {get; set; } /// - /// Gets or sets the time when the last heartbeat was received by - /// vCenter. + /// Gets or sets the time when the last heartbeat was received by vCenter. /// - [JsonProperty(PropertyName = "lastHeartbeat")] - public System.DateTime? LastHeartbeat { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat {get; set; } /// /// Gets or sets the VCenter discovery status. /// - [JsonProperty(PropertyName = "discoveryStatus")] - public string DiscoveryStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "discoveryStatus")] + public string DiscoveryStatus {get; set; } /// /// Gets or sets the process server Id. /// - [JsonProperty(PropertyName = "processServerId")] - public string ProcessServerId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId {get; set; } /// /// Gets or sets the IP address of the vCenter. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the infrastructure Id of vCenter. /// - [JsonProperty(PropertyName = "infrastructureId")] - public string InfrastructureId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "infrastructureId")] + public string InfrastructureId {get; set; } /// /// Gets or sets the port number for discovery. /// - [JsonProperty(PropertyName = "port")] - public string Port { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "port")] + public string Port {get; set; } /// - /// Gets or sets the account Id which has privileges to discover the - /// vCenter. + /// Gets or sets the account Id which has privileges to discover the vCenter. /// - [JsonProperty(PropertyName = "runAsAccountId")] - public string RunAsAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId {get; set; } /// - /// Gets or sets the ARM resource name of the fabric containing this - /// VCenter. + /// Gets or sets the ARM resource name of the fabric containing this VCenter. /// - [JsonProperty(PropertyName = "fabricArmResourceName")] - public string FabricArmResourceName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricArmResourceName")] + public string FabricArmResourceName {get; set; } /// /// Gets or sets the health errors for this VCenter. /// - [JsonProperty(PropertyName = "healthErrors")] - public IList HealthErrors { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "healthErrors")] + public System.Collections.Generic.IList HealthErrors {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMNicDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMNicDetails.cs index 5fe20cb491ca..d250d7e6c9bd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMNicDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMNicDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,60 +23,87 @@ public VMNicDetails() /// /// Initializes a new instance of the VMNicDetails class. /// - /// The nic Id. - /// The replica nic Id. - /// The source nic ARM Id. - /// VM network name. - /// Recovery VM network Id. - /// The IP configurations of the NIC. - /// Selection type for failover. - /// The id of the NSG - /// associated with the NIC. - /// A value - /// indicating whether the NIC has accelerated networking - /// enabled. - /// The network to be used by NIC during - /// test failover. - /// The NSG to be used by NIC - /// during test failover. - /// Whether the TFO NIC - /// has accelerated networking enabled. - /// The name of the NIC to be used when - /// creating target NICs. - /// The resource group of - /// the NIC to be used when creating target NICs. - /// A value indicating whether an - /// existing NIC is allowed to be reused during failover subject to - /// availability. - /// The name of the NIC to be used - /// when creating target NICs in TFO. - /// The resource group of - /// the NIC to be used when creating target NICs in TFO. - /// A value indicating whether an - /// existing NIC is allowed to be reused during test failover subject - /// to availability. - /// Target NIC name. - public VMNicDetails(string nicId = default(string), string replicaNicId = default(string), string sourceNicArmId = default(string), string vMNetworkName = default(string), string recoveryVMNetworkId = default(string), IList ipConfigs = default(IList), string selectionType = default(string), string recoveryNetworkSecurityGroupId = default(string), bool? enableAcceleratedNetworkingOnRecovery = default(bool?), string tfoVMNetworkId = default(string), string tfoNetworkSecurityGroupId = default(string), bool? enableAcceleratedNetworkingOnTfo = default(bool?), string recoveryNicName = default(string), string recoveryNicResourceGroupName = default(string), bool? reuseExistingNic = default(bool?), string tfoRecoveryNicName = default(string), string tfoRecoveryNicResourceGroupName = default(string), bool? tfoReuseExistingNic = default(bool?), string targetNicName = default(string)) + + /// The nic Id. + /// + + /// The replica nic Id. + /// + + /// The source nic ARM Id. + /// + + /// VM network name. + /// + + /// Recovery VM network Id. + /// + + /// The IP configurations of the NIC. + /// + + /// Selection type for failover. + /// + + /// The id of the NSG associated with the NIC. + /// + + /// A value indicating whether the NIC has accelerated networking enabled. + /// + + /// The network to be used by NIC during test failover. + /// + + /// The NSG to be used by NIC during test failover. + /// + + /// Whether the TFO NIC has accelerated networking enabled. + /// + + /// The name of the NIC to be used when creating target NICs. + /// + + /// The resource group of the NIC to be used when creating target NICs. + /// + + /// A value indicating whether an existing NIC is allowed to be reused during + /// failover subject to availability. + /// + + /// The name of the NIC to be used when creating target NICs in TFO. + /// + + /// The resource group of the NIC to be used when creating target NICs in TFO. + /// + + /// A value indicating whether an existing NIC is allowed to be reused during + /// test failover subject to availability. + /// + + /// Target NIC name. + /// + public VMNicDetails(string nicId = default(string), string replicaNicId = default(string), string sourceNicArmId = default(string), string vmNetworkName = default(string), string recoveryVMNetworkId = default(string), System.Collections.Generic.IList ipConfigs = default(System.Collections.Generic.IList), string selectionType = default(string), string recoveryNetworkSecurityGroupId = default(string), bool? enableAcceleratedNetworkingOnRecovery = default(bool?), string tfoVMNetworkId = default(string), string tfoNetworkSecurityGroupId = default(string), bool? enableAcceleratedNetworkingOnTfo = default(bool?), string recoveryNicName = default(string), string recoveryNicResourceGroupName = default(string), bool? reuseExistingNic = default(bool?), string tfoRecoveryNicName = default(string), string tfoRecoveryNicResourceGroupName = default(string), bool? tfoReuseExistingNic = default(bool?), string targetNicName = default(string)) + { - NicId = nicId; - ReplicaNicId = replicaNicId; - SourceNicArmId = sourceNicArmId; - VMNetworkName = vMNetworkName; - RecoveryVMNetworkId = recoveryVMNetworkId; - IpConfigs = ipConfigs; - SelectionType = selectionType; - RecoveryNetworkSecurityGroupId = recoveryNetworkSecurityGroupId; - EnableAcceleratedNetworkingOnRecovery = enableAcceleratedNetworkingOnRecovery; - TfoVMNetworkId = tfoVMNetworkId; - TfoNetworkSecurityGroupId = tfoNetworkSecurityGroupId; - EnableAcceleratedNetworkingOnTfo = enableAcceleratedNetworkingOnTfo; - RecoveryNicName = recoveryNicName; - RecoveryNicResourceGroupName = recoveryNicResourceGroupName; - ReuseExistingNic = reuseExistingNic; - TfoRecoveryNicName = tfoRecoveryNicName; - TfoRecoveryNicResourceGroupName = tfoRecoveryNicResourceGroupName; - TfoReuseExistingNic = tfoReuseExistingNic; - TargetNicName = targetNicName; + this.NicId = nicId; + this.ReplicaNicId = replicaNicId; + this.SourceNicArmId = sourceNicArmId; + this.VMNetworkName = vmNetworkName; + this.RecoveryVMNetworkId = recoveryVMNetworkId; + this.IPConfigs = ipConfigs; + this.SelectionType = selectionType; + this.RecoveryNetworkSecurityGroupId = recoveryNetworkSecurityGroupId; + this.EnableAcceleratedNetworkingOnRecovery = enableAcceleratedNetworkingOnRecovery; + this.TfoVMNetworkId = tfoVMNetworkId; + this.TfoNetworkSecurityGroupId = tfoNetworkSecurityGroupId; + this.EnableAcceleratedNetworkingOnTfo = enableAcceleratedNetworkingOnTfo; + this.RecoveryNicName = recoveryNicName; + this.RecoveryNicResourceGroupName = recoveryNicResourceGroupName; + this.ReuseExistingNic = reuseExistingNic; + this.TfoRecoveryNicName = tfoRecoveryNicName; + this.TfoRecoveryNicResourceGroupName = tfoRecoveryNicResourceGroupName; + this.TfoReuseExistingNic = tfoReuseExistingNic; + this.TargetNicName = targetNicName; CustomInit(); } @@ -93,127 +112,125 @@ public VMNicDetails() /// partial void CustomInit(); + /// /// Gets or sets the nic Id. /// - [JsonProperty(PropertyName = "nicId")] - public string NicId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nicId")] + public string NicId {get; set; } /// /// Gets or sets the replica nic Id. /// - [JsonProperty(PropertyName = "replicaNicId")] - public string ReplicaNicId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicaNicId")] + public string ReplicaNicId {get; set; } /// /// Gets or sets the source nic ARM Id. /// - [JsonProperty(PropertyName = "sourceNicArmId")] - public string SourceNicArmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceNicArmId")] + public string SourceNicArmId {get; set; } /// - /// Gets or sets VM network name. + /// Gets or sets vM network name. /// - [JsonProperty(PropertyName = "vMNetworkName")] - public string VMNetworkName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vMNetworkName")] + public string VMNetworkName {get; set; } /// /// Gets or sets recovery VM network Id. /// - [JsonProperty(PropertyName = "recoveryVMNetworkId")] - public string RecoveryVMNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryVMNetworkId")] + public string RecoveryVMNetworkId {get; set; } /// /// Gets or sets the IP configurations of the NIC. /// - [JsonProperty(PropertyName = "ipConfigs")] - public IList IpConfigs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipConfigs")] + public System.Collections.Generic.IList IPConfigs {get; set; } /// /// Gets or sets selection type for failover. /// - [JsonProperty(PropertyName = "selectionType")] - public string SelectionType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectionType")] + public string SelectionType {get; set; } /// /// Gets or sets the id of the NSG associated with the NIC. /// - [JsonProperty(PropertyName = "recoveryNetworkSecurityGroupId")] - public string RecoveryNetworkSecurityGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNetworkSecurityGroupId")] + public string RecoveryNetworkSecurityGroupId {get; set; } /// - /// Gets or sets a value indicating whether the NIC has accelerated - /// networking enabled. + /// Gets or sets a value indicating whether the NIC has accelerated networking + /// enabled. /// - [JsonProperty(PropertyName = "enableAcceleratedNetworkingOnRecovery")] - public bool? EnableAcceleratedNetworkingOnRecovery { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableAcceleratedNetworkingOnRecovery")] + public bool? EnableAcceleratedNetworkingOnRecovery {get; set; } /// /// Gets or sets the network to be used by NIC during test failover. /// - [JsonProperty(PropertyName = "tfoVMNetworkId")] - public string TfoVMNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoVMNetworkId")] + public string TfoVMNetworkId {get; set; } /// /// Gets or sets the NSG to be used by NIC during test failover. /// - [JsonProperty(PropertyName = "tfoNetworkSecurityGroupId")] - public string TfoNetworkSecurityGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoNetworkSecurityGroupId")] + public string TfoNetworkSecurityGroupId {get; set; } /// - /// Gets or sets whether the TFO NIC has accelerated networking - /// enabled. + /// Gets or sets whether the TFO NIC has accelerated networking enabled. /// - [JsonProperty(PropertyName = "enableAcceleratedNetworkingOnTfo")] - public bool? EnableAcceleratedNetworkingOnTfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableAcceleratedNetworkingOnTfo")] + public bool? EnableAcceleratedNetworkingOnTfo {get; set; } /// - /// Gets or sets the name of the NIC to be used when creating target - /// NICs. + /// Gets or sets the name of the NIC to be used when creating target NICs. /// - [JsonProperty(PropertyName = "recoveryNicName")] - public string RecoveryNicName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNicName")] + public string RecoveryNicName {get; set; } /// - /// Gets or sets the resource group of the NIC to be used when creating - /// target NICs. + /// Gets or sets the resource group of the NIC to be used when creating target + /// NICs. /// - [JsonProperty(PropertyName = "recoveryNicResourceGroupName")] - public string RecoveryNicResourceGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNicResourceGroupName")] + public string RecoveryNicResourceGroupName {get; set; } /// - /// Gets or sets a value indicating whether an existing NIC is allowed - /// to be reused during failover subject to availability. + /// Gets or sets a value indicating whether an existing NIC is allowed to be + /// reused during failover subject to availability. /// - [JsonProperty(PropertyName = "reuseExistingNic")] - public bool? ReuseExistingNic { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reuseExistingNic")] + public bool? ReuseExistingNic {get; set; } /// - /// Gets or sets the name of the NIC to be used when creating target - /// NICs in TFO. + /// Gets or sets the name of the NIC to be used when creating target NICs in + /// TFO. /// - [JsonProperty(PropertyName = "tfoRecoveryNicName")] - public string TfoRecoveryNicName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoRecoveryNicName")] + public string TfoRecoveryNicName {get; set; } /// - /// Gets or sets the resource group of the NIC to be used when creating - /// target NICs in TFO. + /// Gets or sets the resource group of the NIC to be used when creating target + /// NICs in TFO. /// - [JsonProperty(PropertyName = "tfoRecoveryNicResourceGroupName")] - public string TfoRecoveryNicResourceGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoRecoveryNicResourceGroupName")] + public string TfoRecoveryNicResourceGroupName {get; set; } /// - /// Gets or sets a value indicating whether an existing NIC is allowed - /// to be reused during test failover subject to availability. + /// Gets or sets a value indicating whether an existing NIC is allowed to be + /// reused during test failover subject to availability. /// - [JsonProperty(PropertyName = "tfoReuseExistingNic")] - public bool? TfoReuseExistingNic { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoReuseExistingNic")] + public bool? TfoReuseExistingNic {get; set; } /// /// Gets or sets target NIC name. /// - [JsonProperty(PropertyName = "targetNicName")] - public string TargetNicName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicName")] + public string TargetNicName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMNicInputDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMNicInputDetails.cs index 2d3922aa13a9..7e4ecf67bb6a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMNicInputDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMNicInputDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,49 +23,67 @@ public VMNicInputDetails() /// /// Initializes a new instance of the VMNicInputDetails class. /// - /// The nic Id. - /// The IP configurations to be used by NIC - /// during test failover and failover. - /// Selection type for failover. - /// The id of the NSG - /// associated with the NIC. - /// Whether the NIC - /// has accelerated networking enabled. - /// The NSG to be used by NIC - /// during test failover. - /// Whether the test NIC - /// has accelerated networking enabled. - /// The name of the NIC to be used when - /// creating target NICs. - /// The resource group of - /// the NIC to be used when creating target NICs. - /// A value indicating whether an - /// existing NIC is allowed to be reused during failover subject to - /// availability. - /// The name of the NIC to be used when - /// creating target NICs in TFO. - /// The resource group of the NIC - /// to be used when creating target NICs in TFO. - /// A value indicating whether an - /// existing NIC is allowed to be reused during test failover subject - /// to availability. - /// Target NIC name. - public VMNicInputDetails(string nicId = default(string), IList ipConfigs = default(IList), string selectionType = default(string), string recoveryNetworkSecurityGroupId = default(string), bool? enableAcceleratedNetworkingOnRecovery = default(bool?), string tfoNetworkSecurityGroupId = default(string), bool? enableAcceleratedNetworkingOnTfo = default(bool?), string recoveryNicName = default(string), string recoveryNicResourceGroupName = default(string), bool? reuseExistingNic = default(bool?), string tfoNicName = default(string), string tfoNicResourceGroupName = default(string), bool? tfoReuseExistingNic = default(bool?), string targetNicName = default(string)) + + /// The nic Id. + /// + + /// The IP configurations to be used by NIC during test failover and failover. + /// + + /// Selection type for failover. + /// + + /// The id of the NSG associated with the NIC. + /// + + /// Whether the NIC has accelerated networking enabled. + /// + + /// The NSG to be used by NIC during test failover. + /// + + /// Whether the test NIC has accelerated networking enabled. + /// + + /// The name of the NIC to be used when creating target NICs. + /// + + /// The resource group of the NIC to be used when creating target NICs. + /// + + /// A value indicating whether an existing NIC is allowed to be reused during + /// failover subject to availability. + /// + + /// The name of the NIC to be used when creating target NICs in TFO. + /// + + /// The resource group of the NIC to be used when creating target NICs in TFO. + /// + + /// A value indicating whether an existing NIC is allowed to be reused during + /// test failover subject to availability. + /// + + /// Target NIC name. + /// + public VMNicInputDetails(string nicId = default(string), System.Collections.Generic.IList ipConfigs = default(System.Collections.Generic.IList), string selectionType = default(string), string recoveryNetworkSecurityGroupId = default(string), bool? enableAcceleratedNetworkingOnRecovery = default(bool?), string tfoNetworkSecurityGroupId = default(string), bool? enableAcceleratedNetworkingOnTfo = default(bool?), string recoveryNicName = default(string), string recoveryNicResourceGroupName = default(string), bool? reuseExistingNic = default(bool?), string tfoNicName = default(string), string tfoNicResourceGroupName = default(string), bool? tfoReuseExistingNic = default(bool?), string targetNicName = default(string)) + { - NicId = nicId; - IpConfigs = ipConfigs; - SelectionType = selectionType; - RecoveryNetworkSecurityGroupId = recoveryNetworkSecurityGroupId; - EnableAcceleratedNetworkingOnRecovery = enableAcceleratedNetworkingOnRecovery; - TfoNetworkSecurityGroupId = tfoNetworkSecurityGroupId; - EnableAcceleratedNetworkingOnTfo = enableAcceleratedNetworkingOnTfo; - RecoveryNicName = recoveryNicName; - RecoveryNicResourceGroupName = recoveryNicResourceGroupName; - ReuseExistingNic = reuseExistingNic; - TfoNicName = tfoNicName; - TfoNicResourceGroupName = tfoNicResourceGroupName; - TfoReuseExistingNic = tfoReuseExistingNic; - TargetNicName = targetNicName; + this.NicId = nicId; + this.IPConfigs = ipConfigs; + this.SelectionType = selectionType; + this.RecoveryNetworkSecurityGroupId = recoveryNetworkSecurityGroupId; + this.EnableAcceleratedNetworkingOnRecovery = enableAcceleratedNetworkingOnRecovery; + this.TfoNetworkSecurityGroupId = tfoNetworkSecurityGroupId; + this.EnableAcceleratedNetworkingOnTfo = enableAcceleratedNetworkingOnTfo; + this.RecoveryNicName = recoveryNicName; + this.RecoveryNicResourceGroupName = recoveryNicResourceGroupName; + this.ReuseExistingNic = reuseExistingNic; + this.TfoNicName = tfoNicName; + this.TfoNicResourceGroupName = tfoNicResourceGroupName; + this.TfoReuseExistingNic = tfoReuseExistingNic; + this.TargetNicName = targetNicName; CustomInit(); } @@ -82,97 +92,95 @@ public VMNicInputDetails() /// partial void CustomInit(); + /// /// Gets or sets the nic Id. /// - [JsonProperty(PropertyName = "nicId")] - public string NicId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nicId")] + public string NicId {get; set; } /// - /// Gets or sets the IP configurations to be used by NIC during test - /// failover and failover. + /// Gets or sets the IP configurations to be used by NIC during test failover + /// and failover. /// - [JsonProperty(PropertyName = "ipConfigs")] - public IList IpConfigs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipConfigs")] + public System.Collections.Generic.IList IPConfigs {get; set; } /// /// Gets or sets selection type for failover. /// - [JsonProperty(PropertyName = "selectionType")] - public string SelectionType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "selectionType")] + public string SelectionType {get; set; } /// /// Gets or sets the id of the NSG associated with the NIC. /// - [JsonProperty(PropertyName = "recoveryNetworkSecurityGroupId")] - public string RecoveryNetworkSecurityGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNetworkSecurityGroupId")] + public string RecoveryNetworkSecurityGroupId {get; set; } /// /// Gets or sets whether the NIC has accelerated networking enabled. /// - [JsonProperty(PropertyName = "enableAcceleratedNetworkingOnRecovery")] - public bool? EnableAcceleratedNetworkingOnRecovery { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableAcceleratedNetworkingOnRecovery")] + public bool? EnableAcceleratedNetworkingOnRecovery {get; set; } /// /// Gets or sets the NSG to be used by NIC during test failover. /// - [JsonProperty(PropertyName = "tfoNetworkSecurityGroupId")] - public string TfoNetworkSecurityGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoNetworkSecurityGroupId")] + public string TfoNetworkSecurityGroupId {get; set; } /// - /// Gets or sets whether the test NIC has accelerated networking - /// enabled. + /// Gets or sets whether the test NIC has accelerated networking enabled. /// - [JsonProperty(PropertyName = "enableAcceleratedNetworkingOnTfo")] - public bool? EnableAcceleratedNetworkingOnTfo { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableAcceleratedNetworkingOnTfo")] + public bool? EnableAcceleratedNetworkingOnTfo {get; set; } /// - /// Gets or sets the name of the NIC to be used when creating target - /// NICs. + /// Gets or sets the name of the NIC to be used when creating target NICs. /// - [JsonProperty(PropertyName = "recoveryNicName")] - public string RecoveryNicName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNicName")] + public string RecoveryNicName {get; set; } /// - /// Gets or sets the resource group of the NIC to be used when creating - /// target NICs. + /// Gets or sets the resource group of the NIC to be used when creating target + /// NICs. /// - [JsonProperty(PropertyName = "recoveryNicResourceGroupName")] - public string RecoveryNicResourceGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryNicResourceGroupName")] + public string RecoveryNicResourceGroupName {get; set; } /// - /// Gets or sets a value indicating whether an existing NIC is allowed - /// to be reused during failover subject to availability. + /// Gets or sets a value indicating whether an existing NIC is allowed to be + /// reused during failover subject to availability. /// - [JsonProperty(PropertyName = "reuseExistingNic")] - public bool? ReuseExistingNic { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "reuseExistingNic")] + public bool? ReuseExistingNic {get; set; } /// - /// Gets or sets the name of the NIC to be used when creating target - /// NICs in TFO. + /// Gets or sets the name of the NIC to be used when creating target NICs in + /// TFO. /// - [JsonProperty(PropertyName = "tfoNicName")] - public string TfoNicName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoNicName")] + public string TfoNicName {get; set; } /// - /// Gets or sets the resource group of the NIC to be used when creating - /// target NICs in TFO. + /// Gets or sets the resource group of the NIC to be used when creating target + /// NICs in TFO. /// - [JsonProperty(PropertyName = "tfoNicResourceGroupName")] - public string TfoNicResourceGroupName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoNicResourceGroupName")] + public string TfoNicResourceGroupName {get; set; } /// - /// Gets or sets a value indicating whether an existing NIC is allowed - /// to be reused during test failover subject to availability. + /// Gets or sets a value indicating whether an existing NIC is allowed to be + /// reused during test failover subject to availability. /// - [JsonProperty(PropertyName = "tfoReuseExistingNic")] - public bool? TfoReuseExistingNic { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tfoReuseExistingNic")] + public bool? TfoReuseExistingNic {get; set; } /// /// Gets or sets target NIC name. /// - [JsonProperty(PropertyName = "targetNicName")] - public string TargetNicName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicName")] + public string TargetNicName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtContainerCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtContainerCreationInput.cs index f5e6871eeb04..2e7b5e355f78 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtContainerCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtContainerCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareCbtContainerCreationInput : ReplicationProviderSpecificContainerCreationInput { /// - /// Initializes a new instance of the VMwareCbtContainerCreationInput - /// class. + /// Initializes a new instance of the VMwareCbtContainerCreationInput class. /// public VMwareCbtContainerCreationInput() { @@ -35,4 +28,4 @@ public VMwareCbtContainerCreationInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtContainerMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtContainerMappingInput.cs index 50eeab52a5e7..e0f9d94d8bfb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtContainerMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtContainerMappingInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareCbtContainerMappingInput : ReplicationProviderSpecificContainerMappingInput { /// - /// Initializes a new instance of the VMwareCbtContainerMappingInput - /// class. + /// Initializes a new instance of the VMwareCbtContainerMappingInput class. /// public VMwareCbtContainerMappingInput() { @@ -30,25 +22,35 @@ public VMwareCbtContainerMappingInput() } /// - /// Initializes a new instance of the VMwareCbtContainerMappingInput - /// class. + /// Initializes a new instance of the VMwareCbtContainerMappingInput class. /// - /// The storage account ARM Id. - /// The target location. - /// The target key vault ARM Id. - /// The target key vault URL. - /// The secret name of the - /// storage account. - /// The secret name - /// of the service bus connection string. + + /// The target key vault ARM Id. + /// + + /// The target key vault URL. + /// + + /// The storage account ARM Id. + /// + + /// The secret name of the storage account. + /// + + /// The secret name of the service bus connection string. + /// + + /// The target location. + /// public VMwareCbtContainerMappingInput(string storageAccountId, string targetLocation, string keyVaultId = default(string), string keyVaultUri = default(string), string storageAccountSasSecretName = default(string), string serviceBusConnectionStringSecretName = default(string)) + { - KeyVaultId = keyVaultId; - KeyVaultUri = keyVaultUri; - StorageAccountId = storageAccountId; - StorageAccountSasSecretName = storageAccountSasSecretName; - ServiceBusConnectionStringSecretName = serviceBusConnectionStringSecretName; - TargetLocation = targetLocation; + this.KeyVaultId = keyVaultId; + this.KeyVaultUri = keyVaultUri; + this.StorageAccountId = storageAccountId; + this.StorageAccountSasSecretName = storageAccountSasSecretName; + this.ServiceBusConnectionStringSecretName = serviceBusConnectionStringSecretName; + this.TargetLocation = targetLocation; CustomInit(); } @@ -57,58 +59,64 @@ public VMwareCbtContainerMappingInput() /// partial void CustomInit(); + /// /// Gets or sets the target key vault ARM Id. /// - [JsonProperty(PropertyName = "keyVaultId")] - public string KeyVaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultId")] + public string KeyVaultId {get; set; } /// /// Gets or sets the target key vault URL. /// - [JsonProperty(PropertyName = "keyVaultUri")] - public string KeyVaultUri { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultUri")] + public string KeyVaultUri {get; set; } /// /// Gets or sets the storage account ARM Id. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; set; } /// /// Gets or sets the secret name of the storage account. /// - [JsonProperty(PropertyName = "storageAccountSasSecretName")] - public string StorageAccountSasSecretName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountSasSecretName")] + public string StorageAccountSasSecretName {get; set; } /// /// Gets or sets the secret name of the service bus connection string. /// - [JsonProperty(PropertyName = "serviceBusConnectionStringSecretName")] - public string ServiceBusConnectionStringSecretName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceBusConnectionStringSecretName")] + public string ServiceBusConnectionStringSecretName {get; set; } /// /// Gets or sets the target location. /// - [JsonProperty(PropertyName = "targetLocation")] - public string TargetLocation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetLocation")] + public string TargetLocation {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (StorageAccountId == null) + if (this.StorageAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "StorageAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "StorageAccountId"); } - if (TargetLocation == null) + if (this.TargetLocation == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetLocation"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetLocation"); } + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtDiskInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtDiskInput.cs index 24f4143429eb..05ba2b771d42 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtDiskInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtDiskInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,25 +23,33 @@ public VMwareCbtDiskInput() /// /// Initializes a new instance of the VMwareCbtDiskInput class. /// - /// The disk Id. - /// A value indicating whether the disk is the - /// OS disk. - /// The log storage account ARM - /// Id. - /// The key vault secret - /// name of the log storage account. - /// The disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - /// The DiskEncryptionSet ARM - /// Id. + + /// The disk Id. + /// + + /// The disk type. + /// Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + + /// A value indicating whether the disk is the OS disk. + /// + + /// The log storage account ARM Id. + /// + + /// The key vault secret name of the log storage account. + /// + + /// The DiskEncryptionSet ARM Id. + /// public VMwareCbtDiskInput(string diskId, string isOSDisk, string logStorageAccountId, string logStorageAccountSasSecretName, string diskType = default(string), string diskEncryptionSetId = default(string)) + { - DiskId = diskId; - DiskType = diskType; - IsOSDisk = isOSDisk; - LogStorageAccountId = logStorageAccountId; - LogStorageAccountSasSecretName = logStorageAccountSasSecretName; - DiskEncryptionSetId = diskEncryptionSetId; + this.DiskId = diskId; + this.DiskType = diskType; + this.IsOSDisk = isOSDisk; + this.LogStorageAccountId = logStorageAccountId; + this.LogStorageAccountSasSecretName = logStorageAccountSasSecretName; + this.DiskEncryptionSetId = diskEncryptionSetId; CustomInit(); } @@ -57,67 +58,72 @@ public VMwareCbtDiskInput() /// partial void CustomInit(); + /// /// Gets or sets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// - /// Gets or sets the disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + /// Gets or sets the disk type. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// /// Gets or sets a value indicating whether the disk is the OS disk. /// - [JsonProperty(PropertyName = "isOSDisk")] - public string IsOSDisk { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isOSDisk")] + public string IsOSDisk {get; set; } /// /// Gets or sets the log storage account ARM Id. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; set; } /// /// Gets or sets the key vault secret name of the log storage account. /// - [JsonProperty(PropertyName = "logStorageAccountSasSecretName")] - public string LogStorageAccountSasSecretName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountSasSecretName")] + public string LogStorageAccountSasSecretName {get; set; } /// /// Gets or sets the DiskEncryptionSet ARM Id. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (DiskId == null) + if (this.DiskId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskId"); } - if (IsOSDisk == null) + if (this.IsOSDisk == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "IsOSDisk"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "IsOSDisk"); } - if (LogStorageAccountId == null) + if (this.LogStorageAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "LogStorageAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "LogStorageAccountId"); } - if (LogStorageAccountSasSecretName == null) + if (this.LogStorageAccountSasSecretName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "LogStorageAccountSasSecretName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "LogStorageAccountSasSecretName"); } + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtEnableMigrationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtEnableMigrationInput.cs index cf080435260c..8b6fbfb8dffd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtEnableMigrationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtEnableMigrationInput.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -23,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareCbtEnableMigrationInput : EnableMigrationProviderSpecificInput { /// - /// Initializes a new instance of the VMwareCbtEnableMigrationInput - /// class. + /// Initializes a new instance of the VMwareCbtEnableMigrationInput class. /// public VMwareCbtEnableMigrationInput() { @@ -32,77 +22,111 @@ public VMwareCbtEnableMigrationInput() } /// - /// Initializes a new instance of the VMwareCbtEnableMigrationInput - /// class. + /// Initializes a new instance of the VMwareCbtEnableMigrationInput class. /// - /// The ARM Id of the VM discovered in - /// VMware. - /// The disks to include list. - /// The data mover run as account - /// Id. - /// The snapshot run as account - /// Id. - /// The target resource group ARM - /// Id. - /// The target network ARM Id. - /// License type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'WindowsServer' + + /// The ARM Id of the VM discovered in VMware. + /// + + /// The disks to include list. + /// + + /// License type. + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' + /// The SQL Server license type. - /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', - /// 'AHUB' - /// A value indicating whether - /// bulk SQL RP registration to be done. - /// The target VM name. - /// The target VM size. - /// The selected test network ARM - /// Id. - /// The target subnet name. - /// The selected test subnet name. - /// The target availability set - /// ARM Id. - /// The target availability - /// zone. - /// The target proximity - /// placement group ARM Id. - /// The confidential VM key - /// vault Id for ADE installation. - /// The target VM security - /// profile. - /// The target boot - /// diagnostics storage account ARM Id. - /// A value indicating whether auto - /// resync is to be done. - /// The target VM tags. - /// The tags for the seed disks. - /// The tags for the target disks. - /// The tags for the target NICs. - public VMwareCbtEnableMigrationInput(string vmwareMachineId, IList disksToInclude, string dataMoverRunAsAccountId, string snapshotRunAsAccountId, string targetResourceGroupId, string targetNetworkId, string licenseType = default(string), string sqlServerLicenseType = default(string), string performSqlBulkRegistration = default(string), string targetVmName = default(string), string targetVmSize = default(string), string testNetworkId = default(string), string targetSubnetName = default(string), string testSubnetName = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string confidentialVmKeyVaultId = default(string), VMwareCbtSecurityProfileProperties targetVmSecurityProfile = default(VMwareCbtSecurityProfileProperties), string targetBootDiagnosticsStorageAccountId = default(string), string performAutoResync = default(string), IDictionary targetVmTags = default(IDictionary), IDictionary seedDiskTags = default(IDictionary), IDictionary targetDiskTags = default(IDictionary), IDictionary targetNicTags = default(IDictionary)) + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + + /// A value indicating whether bulk SQL RP registration to be done. + /// + + /// The data mover run as account Id. + /// + + /// The snapshot run as account Id. + /// + + /// The target VM name. + /// + + /// The target VM size. + /// + + /// The target resource group ARM Id. + /// + + /// The target network ARM Id. + /// + + /// The selected test network ARM Id. + /// + + /// The target subnet name. + /// + + /// The selected test subnet name. + /// + + /// The target availability set ARM Id. + /// + + /// The target availability zone. + /// + + /// The target proximity placement group ARM Id. + /// + + /// The confidential VM key vault Id for ADE installation. + /// + + /// The target VM security profile. + /// + + /// The target boot diagnostics storage account ARM Id. + /// + + /// A value indicating whether auto resync is to be done. + /// + + /// The target VM tags. + /// + + /// The tags for the seed disks. + /// + + /// The tags for the target disks. + /// + + /// The tags for the target NICs. + /// + public VMwareCbtEnableMigrationInput(string vmwareMachineId, System.Collections.Generic.IList disksToInclude, string dataMoverRunAsAccountId, string snapshotRunAsAccountId, string targetResourceGroupId, string targetNetworkId, string licenseType = default(string), string sqlServerLicenseType = default(string), string performSqlBulkRegistration = default(string), string targetVMName = default(string), string targetVMSize = default(string), string testNetworkId = default(string), string targetSubnetName = default(string), string testSubnetName = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string confidentialVMKeyVaultId = default(string), VMwareCbtSecurityProfileProperties targetVMSecurityProfile = default(VMwareCbtSecurityProfileProperties), string targetBootDiagnosticsStorageAccountId = default(string), string performAutoResync = default(string), System.Collections.Generic.IDictionary targetVMTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary seedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetNicTags = default(System.Collections.Generic.IDictionary)) + { - VmwareMachineId = vmwareMachineId; - DisksToInclude = disksToInclude; - LicenseType = licenseType; - SqlServerLicenseType = sqlServerLicenseType; - PerformSqlBulkRegistration = performSqlBulkRegistration; - DataMoverRunAsAccountId = dataMoverRunAsAccountId; - SnapshotRunAsAccountId = snapshotRunAsAccountId; - TargetVmName = targetVmName; - TargetVmSize = targetVmSize; - TargetResourceGroupId = targetResourceGroupId; - TargetNetworkId = targetNetworkId; - TestNetworkId = testNetworkId; - TargetSubnetName = targetSubnetName; - TestSubnetName = testSubnetName; - TargetAvailabilitySetId = targetAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - ConfidentialVmKeyVaultId = confidentialVmKeyVaultId; - TargetVmSecurityProfile = targetVmSecurityProfile; - TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - PerformAutoResync = performAutoResync; - TargetVmTags = targetVmTags; - SeedDiskTags = seedDiskTags; - TargetDiskTags = targetDiskTags; - TargetNicTags = targetNicTags; + this.VmwareMachineId = vmwareMachineId; + this.DisksToInclude = disksToInclude; + this.LicenseType = licenseType; + this.SqlServerLicenseType = sqlServerLicenseType; + this.PerformSqlBulkRegistration = performSqlBulkRegistration; + this.DataMoverRunAsAccountId = dataMoverRunAsAccountId; + this.SnapshotRunAsAccountId = snapshotRunAsAccountId; + this.TargetVMName = targetVMName; + this.TargetVMSize = targetVMSize; + this.TargetResourceGroupId = targetResourceGroupId; + this.TargetNetworkId = targetNetworkId; + this.TestNetworkId = testNetworkId; + this.TargetSubnetName = targetSubnetName; + this.TestSubnetName = testSubnetName; + this.TargetAvailabilitySetId = targetAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.ConfidentialVMKeyVaultId = confidentialVMKeyVaultId; + this.TargetVMSecurityProfile = targetVMSecurityProfile; + this.TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; + this.PerformAutoResync = performAutoResync; + this.TargetVMTags = targetVMTags; + this.SeedDiskTags = seedDiskTags; + this.TargetDiskTags = targetDiskTags; + this.TargetNicTags = targetNicTags; CustomInit(); } @@ -111,194 +135,193 @@ public VMwareCbtEnableMigrationInput() /// partial void CustomInit(); + /// /// Gets or sets the ARM Id of the VM discovered in VMware. /// - [JsonProperty(PropertyName = "vmwareMachineId")] - public string VmwareMachineId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareMachineId")] + public string VmwareMachineId {get; set; } /// /// Gets or sets the disks to include list. /// - [JsonProperty(PropertyName = "disksToInclude")] - public IList DisksToInclude { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "disksToInclude")] + public System.Collections.Generic.IList DisksToInclude {get; set; } /// - /// Gets or sets license type. Possible values include: 'NotSpecified', - /// 'NoLicenseType', 'WindowsServer' + /// Gets or sets license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// - /// Gets or sets the SQL Server license type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + /// Gets or sets the SQL Server license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' /// - [JsonProperty(PropertyName = "sqlServerLicenseType")] - public string SqlServerLicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerLicenseType")] + public string SqlServerLicenseType {get; set; } /// - /// Gets or sets a value indicating whether bulk SQL RP registration to - /// be done. + /// Gets or sets a value indicating whether bulk SQL RP registration to be + /// done. /// - [JsonProperty(PropertyName = "performSqlBulkRegistration")] - public string PerformSqlBulkRegistration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "performSqlBulkRegistration")] + public string PerformSqlBulkRegistration {get; set; } /// /// Gets or sets the data mover run as account Id. /// - [JsonProperty(PropertyName = "dataMoverRunAsAccountId")] - public string DataMoverRunAsAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataMoverRunAsAccountId")] + public string DataMoverRunAsAccountId {get; set; } /// /// Gets or sets the snapshot run as account Id. /// - [JsonProperty(PropertyName = "snapshotRunAsAccountId")] - public string SnapshotRunAsAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "snapshotRunAsAccountId")] + public string SnapshotRunAsAccountId {get; set; } /// /// Gets or sets the target VM name. /// - [JsonProperty(PropertyName = "targetVmName")] - public string TargetVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmName")] + public string TargetVMName {get; set; } /// /// Gets or sets the target VM size. /// - [JsonProperty(PropertyName = "targetVmSize")] - public string TargetVmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSize")] + public string TargetVMSize {get; set; } /// /// Gets or sets the target resource group ARM Id. /// - [JsonProperty(PropertyName = "targetResourceGroupId")] - public string TargetResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroupId")] + public string TargetResourceGroupId {get; set; } /// /// Gets or sets the target network ARM Id. /// - [JsonProperty(PropertyName = "targetNetworkId")] - public string TargetNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNetworkId")] + public string TargetNetworkId {get; set; } /// /// Gets or sets the selected test network ARM Id. /// - [JsonProperty(PropertyName = "testNetworkId")] - public string TestNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testNetworkId")] + public string TestNetworkId {get; set; } /// /// Gets or sets the target subnet name. /// - [JsonProperty(PropertyName = "targetSubnetName")] - public string TargetSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetSubnetName")] + public string TargetSubnetName {get; set; } /// /// Gets or sets the selected test subnet name. /// - [JsonProperty(PropertyName = "testSubnetName")] - public string TestSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testSubnetName")] + public string TestSubnetName {get; set; } /// /// Gets or sets the target availability set ARM Id. /// - [JsonProperty(PropertyName = "targetAvailabilitySetId")] - public string TargetAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilitySetId")] + public string TargetAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target proximity placement group ARM Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// /// Gets or sets the confidential VM key vault Id for ADE installation. /// - [JsonProperty(PropertyName = "confidentialVmKeyVaultId")] - public string ConfidentialVmKeyVaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "confidentialVmKeyVaultId")] + public string ConfidentialVMKeyVaultId {get; set; } /// /// Gets or sets the target VM security profile. /// - [JsonProperty(PropertyName = "targetVmSecurityProfile")] - public VMwareCbtSecurityProfileProperties TargetVmSecurityProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSecurityProfile")] + public VMwareCbtSecurityProfileProperties TargetVMSecurityProfile {get; set; } /// /// Gets or sets the target boot diagnostics storage account ARM Id. /// - [JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] - public string TargetBootDiagnosticsStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] + public string TargetBootDiagnosticsStorageAccountId {get; set; } /// /// Gets or sets a value indicating whether auto resync is to be done. /// - [JsonProperty(PropertyName = "performAutoResync")] - public string PerformAutoResync { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "performAutoResync")] + public string PerformAutoResync {get; set; } /// /// Gets or sets the target VM tags. /// - [JsonProperty(PropertyName = "targetVmTags")] - public IDictionary TargetVmTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmTags")] + public System.Collections.Generic.IDictionary TargetVMTags {get; set; } /// /// Gets or sets the tags for the seed disks. /// - [JsonProperty(PropertyName = "seedDiskTags")] - public IDictionary SeedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedDiskTags")] + public System.Collections.Generic.IDictionary SeedDiskTags {get; set; } /// /// Gets or sets the tags for the target disks. /// - [JsonProperty(PropertyName = "targetDiskTags")] - public IDictionary TargetDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDiskTags")] + public System.Collections.Generic.IDictionary TargetDiskTags {get; set; } /// /// Gets or sets the tags for the target NICs. /// - [JsonProperty(PropertyName = "targetNicTags")] - public IDictionary TargetNicTags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicTags")] + public System.Collections.Generic.IDictionary TargetNicTags {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (VmwareMachineId == null) + if (this.VmwareMachineId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "VmwareMachineId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "VmwareMachineId"); } - if (DisksToInclude == null) + if (this.DisksToInclude == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DisksToInclude"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DisksToInclude"); } - if (DataMoverRunAsAccountId == null) + if (this.DataMoverRunAsAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DataMoverRunAsAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DataMoverRunAsAccountId"); } - if (SnapshotRunAsAccountId == null) + if (this.SnapshotRunAsAccountId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "SnapshotRunAsAccountId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SnapshotRunAsAccountId"); } - if (TargetResourceGroupId == null) + if (this.TargetResourceGroupId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetResourceGroupId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetResourceGroupId"); } - if (TargetNetworkId == null) + if (this.TargetNetworkId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetNetworkId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetNetworkId"); } - if (DisksToInclude != null) + + if (this.DisksToInclude != null) { - foreach (var element in DisksToInclude) + foreach (var element in this.DisksToInclude) { if (element != null) { @@ -306,6 +329,29 @@ public virtual void Validate() } } } + + + + + + + + + + + + + + + + + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtEventDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtEventDetails.cs index cc8787ca5d2c..5072f2333313 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtEventDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtEventDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,10 +24,13 @@ public VMwareCbtEventDetails() /// /// Initializes a new instance of the VMwareCbtEventDetails class. /// - /// The migration item name. + + /// The migration item name. + /// public VMwareCbtEventDetails(string migrationItemName = default(string)) + { - MigrationItemName = migrationItemName; + this.MigrationItemName = migrationItemName; CustomInit(); } @@ -42,11 +39,11 @@ public VMwareCbtEventDetails() /// partial void CustomInit(); + /// /// Gets the migration item name. /// - [JsonProperty(PropertyName = "migrationItemName")] - public string MigrationItemName { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "migrationItemName")] + public string MigrationItemName {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtMigrateInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtMigrateInput.cs index 5df34ca21e5c..5e8515cbb7e2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtMigrateInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtMigrateInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -31,14 +24,17 @@ public VMwareCbtMigrateInput() /// /// Initializes a new instance of the VMwareCbtMigrateInput class. /// - /// A value indicating whether VM is to - /// be shutdown. - /// A value indicating the inplace OS - /// Upgrade version. + + /// A value indicating whether VM is to be shutdown. + /// + + /// A value indicating the inplace OS Upgrade version. + /// public VMwareCbtMigrateInput(string performShutdown, string osUpgradeVersion = default(string)) + { - PerformShutdown = performShutdown; - OsUpgradeVersion = osUpgradeVersion; + this.PerformShutdown = performShutdown; + this.OSUpgradeVersion = osUpgradeVersion; CustomInit(); } @@ -47,30 +43,32 @@ public VMwareCbtMigrateInput() /// partial void CustomInit(); + /// /// Gets or sets a value indicating whether VM is to be shutdown. /// - [JsonProperty(PropertyName = "performShutdown")] - public string PerformShutdown { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "performShutdown")] + public string PerformShutdown {get; set; } /// /// Gets or sets a value indicating the inplace OS Upgrade version. /// - [JsonProperty(PropertyName = "osUpgradeVersion")] - public string OsUpgradeVersion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "osUpgradeVersion")] + public string OSUpgradeVersion {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PerformShutdown == null) + if (this.PerformShutdown == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PerformShutdown"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PerformShutdown"); } + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtMigrationDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtMigrationDetails.cs index 0208e0fda0b4..6115fea9b708 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtMigrationDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtMigrationDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,119 +24,179 @@ public VMwareCbtMigrationDetails() /// /// Initializes a new instance of the VMwareCbtMigrationDetails class. /// - /// The ARM Id of the VM discovered in - /// VMware. - /// The type of the OS on the VM. - /// The name of the OS on the VM. - /// The firmware type. - /// The target generation. - /// License Type of the VM to be - /// used. - /// The SQL Server license - /// type. - /// The data mover run as account - /// Id. - /// The snapshot run as account - /// Id. - /// The replication storage account ARM - /// Id. This is applicable only for the blob based replication test - /// hook. - /// Target VM name. - /// The target VM size. - /// The target location. - /// The target resource group - /// Id. - /// The target availability set - /// Id. - /// The target availability - /// zone. - /// The target proximity - /// placement group Id. - /// The confidential VM key - /// vault Id for ADE installation. - /// The target VM security - /// profile. - /// The target boot - /// diagnostics storage account ARM Id. - /// The target VM tags. - /// The list of protected disks. - /// The target network Id. - /// The test network Id. - /// The network details. - /// The tags for the target NICs. - /// The recovery point Id to - /// which the VM was migrated. - /// The last recovery point - /// received time. - /// The last recovery point - /// Id. - /// The initial seeding - /// progress percentage. - /// The migration progress - /// percentage. - /// The resync progress - /// percentage. - /// The resume progress - /// percentage. - /// The initial seeding retry - /// count. - /// The resync retry count. - /// The resume retry count. - /// A value indicating whether resync is - /// required. - /// The resync state. Possible values - /// include: 'None', 'PreparedForResynchronization', + + /// The ARM Id of the VM discovered in VMware. + /// + + /// The type of the OS on the VM. + /// + + /// The name of the OS on the VM. + /// + + /// The firmware type. + /// + + /// The target generation. + /// + + /// License Type of the VM to be used. + /// + + /// The SQL Server license type. + /// + + /// The data mover run as account Id. + /// + + /// The snapshot run as account Id. + /// + + /// The replication storage account ARM Id. This is applicable only for the + /// blob based replication test hook. + /// + + /// Target VM name. + /// + + /// The target VM size. + /// + + /// The target location. + /// + + /// The target resource group Id. + /// + + /// The target availability set Id. + /// + + /// The target availability zone. + /// + + /// The target proximity placement group Id. + /// + + /// The confidential VM key vault Id for ADE installation. + /// + + /// The target VM security profile. + /// + + /// The target boot diagnostics storage account ARM Id. + /// + + /// The target VM tags. + /// + + /// The list of protected disks. + /// + + /// The target network Id. + /// + + /// The test network Id. + /// + + /// The network details. + /// + + /// The tags for the target NICs. + /// + + /// The recovery point Id to which the VM was migrated. + /// + + /// The last recovery point received time. + /// + + /// The last recovery point Id. + /// + + /// The initial seeding progress percentage. + /// + + /// The migration progress percentage. + /// + + /// The resync progress percentage. + /// + + /// The resume progress percentage. + /// + + /// The initial seeding retry count. + /// + + /// The resync retry count. + /// + + /// The resume retry count. + /// + + /// A value indicating whether resync is required. + /// + + /// The resync state. + /// Possible values include: 'None', 'PreparedForResynchronization', /// 'StartedResynchronization' - /// A value indicating whether auto - /// resync is to be done. - /// The tags for the seed disks. - /// The tags for the target disks. - /// List of supported inplace OS - /// Upgrade versions. - public VMwareCbtMigrationDetails(string vmwareMachineId = default(string), string osType = default(string), string osName = default(string), string firmwareType = default(string), string targetGeneration = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), string dataMoverRunAsAccountId = default(string), string snapshotRunAsAccountId = default(string), string storageAccountId = default(string), string targetVmName = default(string), string targetVmSize = default(string), string targetLocation = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string confidentialVmKeyVaultId = default(string), VMwareCbtSecurityProfileProperties targetVmSecurityProfile = default(VMwareCbtSecurityProfileProperties), string targetBootDiagnosticsStorageAccountId = default(string), IDictionary targetVmTags = default(IDictionary), IList protectedDisks = default(IList), string targetNetworkId = default(string), string testNetworkId = default(string), IList vmNics = default(IList), IDictionary targetNicTags = default(IDictionary), string migrationRecoveryPointId = default(string), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?), string lastRecoveryPointId = default(string), int? initialSeedingProgressPercentage = default(int?), int? migrationProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), int? resumeProgressPercentage = default(int?), long? initialSeedingRetryCount = default(long?), long? resyncRetryCount = default(long?), long? resumeRetryCount = default(long?), string resyncRequired = default(string), string resyncState = default(string), string performAutoResync = default(string), IDictionary seedDiskTags = default(IDictionary), IDictionary targetDiskTags = default(IDictionary), IList supportedOSVersions = default(IList)) + + /// A value indicating whether auto resync is to be done. + /// + + /// The tags for the seed disks. + /// + + /// The tags for the target disks. + /// + + /// List of supported inplace OS Upgrade versions. + /// + public VMwareCbtMigrationDetails(string vmwareMachineId = default(string), string osType = default(string), string osName = default(string), string firmwareType = default(string), string targetGeneration = default(string), string licenseType = default(string), string sqlServerLicenseType = default(string), string dataMoverRunAsAccountId = default(string), string snapshotRunAsAccountId = default(string), string storageAccountId = default(string), string targetVMName = default(string), string targetVMSize = default(string), string targetLocation = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string confidentialVMKeyVaultId = default(string), VMwareCbtSecurityProfileProperties targetVMSecurityProfile = default(VMwareCbtSecurityProfileProperties), string targetBootDiagnosticsStorageAccountId = default(string), System.Collections.Generic.IDictionary targetVMTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList protectedDisks = default(System.Collections.Generic.IList), string targetNetworkId = default(string), string testNetworkId = default(string), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary targetNicTags = default(System.Collections.Generic.IDictionary), string migrationRecoveryPointId = default(string), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?), string lastRecoveryPointId = default(string), int? initialSeedingProgressPercentage = default(int?), int? migrationProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), int? resumeProgressPercentage = default(int?), long? initialSeedingRetryCount = default(long?), long? resyncRetryCount = default(long?), long? resumeRetryCount = default(long?), string resyncRequired = default(string), string resyncState = default(string), string performAutoResync = default(string), System.Collections.Generic.IDictionary seedDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList supportedOSVersions = default(System.Collections.Generic.IList)) + { - VmwareMachineId = vmwareMachineId; - OsType = osType; - OsName = osName; - FirmwareType = firmwareType; - TargetGeneration = targetGeneration; - LicenseType = licenseType; - SqlServerLicenseType = sqlServerLicenseType; - DataMoverRunAsAccountId = dataMoverRunAsAccountId; - SnapshotRunAsAccountId = snapshotRunAsAccountId; - StorageAccountId = storageAccountId; - TargetVmName = targetVmName; - TargetVmSize = targetVmSize; - TargetLocation = targetLocation; - TargetResourceGroupId = targetResourceGroupId; - TargetAvailabilitySetId = targetAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - ConfidentialVmKeyVaultId = confidentialVmKeyVaultId; - TargetVmSecurityProfile = targetVmSecurityProfile; - TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - TargetVmTags = targetVmTags; - ProtectedDisks = protectedDisks; - TargetNetworkId = targetNetworkId; - TestNetworkId = testNetworkId; - VmNics = vmNics; - TargetNicTags = targetNicTags; - MigrationRecoveryPointId = migrationRecoveryPointId; - LastRecoveryPointReceived = lastRecoveryPointReceived; - LastRecoveryPointId = lastRecoveryPointId; - InitialSeedingProgressPercentage = initialSeedingProgressPercentage; - MigrationProgressPercentage = migrationProgressPercentage; - ResyncProgressPercentage = resyncProgressPercentage; - ResumeProgressPercentage = resumeProgressPercentage; - InitialSeedingRetryCount = initialSeedingRetryCount; - ResyncRetryCount = resyncRetryCount; - ResumeRetryCount = resumeRetryCount; - ResyncRequired = resyncRequired; - ResyncState = resyncState; - PerformAutoResync = performAutoResync; - SeedDiskTags = seedDiskTags; - TargetDiskTags = targetDiskTags; - SupportedOSVersions = supportedOSVersions; + this.VmwareMachineId = vmwareMachineId; + this.OSType = osType; + this.OSName = osName; + this.FirmwareType = firmwareType; + this.TargetGeneration = targetGeneration; + this.LicenseType = licenseType; + this.SqlServerLicenseType = sqlServerLicenseType; + this.DataMoverRunAsAccountId = dataMoverRunAsAccountId; + this.SnapshotRunAsAccountId = snapshotRunAsAccountId; + this.StorageAccountId = storageAccountId; + this.TargetVMName = targetVMName; + this.TargetVMSize = targetVMSize; + this.TargetLocation = targetLocation; + this.TargetResourceGroupId = targetResourceGroupId; + this.TargetAvailabilitySetId = targetAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.ConfidentialVMKeyVaultId = confidentialVMKeyVaultId; + this.TargetVMSecurityProfile = targetVMSecurityProfile; + this.TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; + this.TargetVMTags = targetVMTags; + this.ProtectedDisks = protectedDisks; + this.TargetNetworkId = targetNetworkId; + this.TestNetworkId = testNetworkId; + this.VMNics = vmNics; + this.TargetNicTags = targetNicTags; + this.MigrationRecoveryPointId = migrationRecoveryPointId; + this.LastRecoveryPointReceived = lastRecoveryPointReceived; + this.LastRecoveryPointId = lastRecoveryPointId; + this.InitialSeedingProgressPercentage = initialSeedingProgressPercentage; + this.MigrationProgressPercentage = migrationProgressPercentage; + this.ResyncProgressPercentage = resyncProgressPercentage; + this.ResumeProgressPercentage = resumeProgressPercentage; + this.InitialSeedingRetryCount = initialSeedingRetryCount; + this.ResyncRetryCount = resyncRetryCount; + this.ResumeRetryCount = resumeRetryCount; + this.ResyncRequired = resyncRequired; + this.ResyncState = resyncState; + this.PerformAutoResync = performAutoResync; + this.SeedDiskTags = seedDiskTags; + this.TargetDiskTags = targetDiskTags; + this.SupportedOSVersions = supportedOSVersions; CustomInit(); } @@ -153,259 +205,258 @@ public VMwareCbtMigrationDetails() /// partial void CustomInit(); + /// /// Gets the ARM Id of the VM discovered in VMware. /// - [JsonProperty(PropertyName = "vmwareMachineId")] - public string VmwareMachineId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareMachineId")] + public string VmwareMachineId {get; private set; } /// /// Gets the type of the OS on the VM. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; private set; } /// /// Gets the name of the OS on the VM. /// - [JsonProperty(PropertyName = "osName")] - public string OsName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osName")] + public string OSName {get; private set; } /// /// Gets the firmware type. /// - [JsonProperty(PropertyName = "firmwareType")] - public string FirmwareType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "firmwareType")] + public string FirmwareType {get; private set; } /// /// Gets the target generation. /// - [JsonProperty(PropertyName = "targetGeneration")] - public string TargetGeneration { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetGeneration")] + public string TargetGeneration {get; private set; } /// /// Gets or sets license Type of the VM to be used. /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// /// Gets or sets the SQL Server license type. /// - [JsonProperty(PropertyName = "sqlServerLicenseType")] - public string SqlServerLicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerLicenseType")] + public string SqlServerLicenseType {get; set; } /// /// Gets the data mover run as account Id. /// - [JsonProperty(PropertyName = "dataMoverRunAsAccountId")] - public string DataMoverRunAsAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dataMoverRunAsAccountId")] + public string DataMoverRunAsAccountId {get; private set; } /// /// Gets the snapshot run as account Id. /// - [JsonProperty(PropertyName = "snapshotRunAsAccountId")] - public string SnapshotRunAsAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "snapshotRunAsAccountId")] + public string SnapshotRunAsAccountId {get; private set; } /// - /// Gets the replication storage account ARM Id. This is applicable - /// only for the blob based replication test hook. + /// Gets the replication storage account ARM Id. This is applicable only for + /// the blob based replication test hook. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; private set; } /// /// Gets or sets target VM name. /// - [JsonProperty(PropertyName = "targetVmName")] - public string TargetVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmName")] + public string TargetVMName {get; set; } /// /// Gets or sets the target VM size. /// - [JsonProperty(PropertyName = "targetVmSize")] - public string TargetVmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSize")] + public string TargetVMSize {get; set; } /// /// Gets the target location. /// - [JsonProperty(PropertyName = "targetLocation")] - public string TargetLocation { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetLocation")] + public string TargetLocation {get; private set; } /// /// Gets or sets the target resource group Id. /// - [JsonProperty(PropertyName = "targetResourceGroupId")] - public string TargetResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroupId")] + public string TargetResourceGroupId {get; set; } /// /// Gets or sets the target availability set Id. /// - [JsonProperty(PropertyName = "targetAvailabilitySetId")] - public string TargetAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilitySetId")] + public string TargetAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target proximity placement group Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// /// Gets or sets the confidential VM key vault Id for ADE installation. /// - [JsonProperty(PropertyName = "confidentialVmKeyVaultId")] - public string ConfidentialVmKeyVaultId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "confidentialVmKeyVaultId")] + public string ConfidentialVMKeyVaultId {get; set; } /// /// Gets or sets the target VM security profile. /// - [JsonProperty(PropertyName = "targetVmSecurityProfile")] - public VMwareCbtSecurityProfileProperties TargetVmSecurityProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSecurityProfile")] + public VMwareCbtSecurityProfileProperties TargetVMSecurityProfile {get; set; } /// /// Gets or sets the target boot diagnostics storage account ARM Id. /// - [JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] - public string TargetBootDiagnosticsStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] + public string TargetBootDiagnosticsStorageAccountId {get; set; } /// /// Gets or sets the target VM tags. /// - [JsonProperty(PropertyName = "targetVmTags")] - public IDictionary TargetVmTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmTags")] + public System.Collections.Generic.IDictionary TargetVMTags {get; set; } /// /// Gets or sets the list of protected disks. /// - [JsonProperty(PropertyName = "protectedDisks")] - public IList ProtectedDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedDisks")] + public System.Collections.Generic.IList ProtectedDisks {get; set; } /// /// Gets or sets the target network Id. /// - [JsonProperty(PropertyName = "targetNetworkId")] - public string TargetNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNetworkId")] + public string TargetNetworkId {get; set; } /// /// Gets or sets the test network Id. /// - [JsonProperty(PropertyName = "testNetworkId")] - public string TestNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testNetworkId")] + public string TestNetworkId {get; set; } /// /// Gets or sets the network details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets the tags for the target NICs. /// - [JsonProperty(PropertyName = "targetNicTags")] - public IDictionary TargetNicTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicTags")] + public System.Collections.Generic.IDictionary TargetNicTags {get; set; } /// /// Gets the recovery point Id to which the VM was migrated. /// - [JsonProperty(PropertyName = "migrationRecoveryPointId")] - public string MigrationRecoveryPointId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "migrationRecoveryPointId")] + public string MigrationRecoveryPointId {get; private set; } /// /// Gets the last recovery point received time. /// - [JsonProperty(PropertyName = "lastRecoveryPointReceived")] - public System.DateTime? LastRecoveryPointReceived { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRecoveryPointReceived")] + public System.DateTime? LastRecoveryPointReceived {get; private set; } /// /// Gets the last recovery point Id. /// - [JsonProperty(PropertyName = "lastRecoveryPointId")] - public string LastRecoveryPointId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastRecoveryPointId")] + public string LastRecoveryPointId {get; private set; } /// /// Gets the initial seeding progress percentage. /// - [JsonProperty(PropertyName = "initialSeedingProgressPercentage")] - public int? InitialSeedingProgressPercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialSeedingProgressPercentage")] + public int? InitialSeedingProgressPercentage {get; private set; } /// /// Gets the migration progress percentage. /// - [JsonProperty(PropertyName = "migrationProgressPercentage")] - public int? MigrationProgressPercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "migrationProgressPercentage")] + public int? MigrationProgressPercentage {get; private set; } /// /// Gets the resync progress percentage. /// - [JsonProperty(PropertyName = "resyncProgressPercentage")] - public int? ResyncProgressPercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage {get; private set; } /// /// Gets the resume progress percentage. /// - [JsonProperty(PropertyName = "resumeProgressPercentage")] - public int? ResumeProgressPercentage { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resumeProgressPercentage")] + public int? ResumeProgressPercentage {get; private set; } /// /// Gets the initial seeding retry count. /// - [JsonProperty(PropertyName = "initialSeedingRetryCount")] - public long? InitialSeedingRetryCount { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "initialSeedingRetryCount")] + public long? InitialSeedingRetryCount {get; private set; } /// /// Gets the resync retry count. /// - [JsonProperty(PropertyName = "resyncRetryCount")] - public long? ResyncRetryCount { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncRetryCount")] + public long? ResyncRetryCount {get; private set; } /// /// Gets the resume retry count. /// - [JsonProperty(PropertyName = "resumeRetryCount")] - public long? ResumeRetryCount { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resumeRetryCount")] + public long? ResumeRetryCount {get; private set; } /// /// Gets a value indicating whether resync is required. /// - [JsonProperty(PropertyName = "resyncRequired")] - public string ResyncRequired { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncRequired")] + public string ResyncRequired {get; private set; } /// - /// Gets the resync state. Possible values include: 'None', - /// 'PreparedForResynchronization', 'StartedResynchronization' + /// Gets the resync state. Possible values include: 'None', 'PreparedForResynchronization', 'StartedResynchronization' /// - [JsonProperty(PropertyName = "resyncState")] - public string ResyncState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resyncState")] + public string ResyncState {get; private set; } /// /// Gets or sets a value indicating whether auto resync is to be done. /// - [JsonProperty(PropertyName = "performAutoResync")] - public string PerformAutoResync { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "performAutoResync")] + public string PerformAutoResync {get; set; } /// /// Gets or sets the tags for the seed disks. /// - [JsonProperty(PropertyName = "seedDiskTags")] - public IDictionary SeedDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedDiskTags")] + public System.Collections.Generic.IDictionary SeedDiskTags {get; set; } /// /// Gets or sets the tags for the target disks. /// - [JsonProperty(PropertyName = "targetDiskTags")] - public IDictionary TargetDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDiskTags")] + public System.Collections.Generic.IDictionary TargetDiskTags {get; set; } /// /// Gets or sets list of supported inplace OS Upgrade versions. /// - [JsonProperty(PropertyName = "supportedOSVersions")] - public IList SupportedOSVersions { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "supportedOSVersions")] + public System.Collections.Generic.IList SupportedOSVersions {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtNicDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtNicDetails.cs index 9cc5b1f23d8f..d92aa1696bff 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtNicDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtNicDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,41 +23,65 @@ public VMwareCbtNicDetails() /// /// Initializes a new instance of the VMwareCbtNicDetails class. /// - /// The NIC Id. - /// A value indicating whether this is the - /// primary NIC. - /// The source IP address. + + /// The NIC Id. + /// + + /// A value indicating whether this is the primary NIC. + /// + + /// The source IP address. + /// + /// The source IP address type. /// Possible values include: 'Dynamic', 'Static' - /// Source network Id. - /// The target IP address. + + /// Source network Id. + /// + + /// The target IP address. + /// + /// The target IP address type. /// Possible values include: 'Dynamic', 'Static' - /// Target subnet name. - /// Source network Id. - /// Test subnet name. - /// The test IP address. - /// The test IP address type. Possible - /// values include: 'Dynamic', 'Static' - /// Target NIC name. - /// A value indicating whether - /// this NIC is selected for migration. + + /// Target subnet name. + /// + + /// Source network Id. + /// + + /// Test subnet name. + /// + + /// The test IP address. + /// + + /// The test IP address type. + /// Possible values include: 'Dynamic', 'Static' + + /// Target NIC name. + /// + + /// A value indicating whether this NIC is selected for migration. + /// public VMwareCbtNicDetails(string nicId = default(string), string isPrimaryNic = default(string), string sourceIPAddress = default(string), string sourceIPAddressType = default(string), string sourceNetworkId = default(string), string targetIPAddress = default(string), string targetIPAddressType = default(string), string targetSubnetName = default(string), string testNetworkId = default(string), string testSubnetName = default(string), string testIPAddress = default(string), string testIPAddressType = default(string), string targetNicName = default(string), string isSelectedForMigration = default(string)) + { - NicId = nicId; - IsPrimaryNic = isPrimaryNic; - SourceIPAddress = sourceIPAddress; - SourceIPAddressType = sourceIPAddressType; - SourceNetworkId = sourceNetworkId; - TargetIPAddress = targetIPAddress; - TargetIPAddressType = targetIPAddressType; - TargetSubnetName = targetSubnetName; - TestNetworkId = testNetworkId; - TestSubnetName = testSubnetName; - TestIPAddress = testIPAddress; - TestIPAddressType = testIPAddressType; - TargetNicName = targetNicName; - IsSelectedForMigration = isSelectedForMigration; + this.NicId = nicId; + this.IsPrimaryNic = isPrimaryNic; + this.SourceIPAddress = sourceIPAddress; + this.SourceIPAddressType = sourceIPAddressType; + this.SourceNetworkId = sourceNetworkId; + this.TargetIPAddress = targetIPAddress; + this.TargetIPAddressType = targetIPAddressType; + this.TargetSubnetName = targetSubnetName; + this.TestNetworkId = testNetworkId; + this.TestSubnetName = testSubnetName; + this.TestIPAddress = testIPAddress; + this.TestIPAddressType = testIPAddressType; + this.TargetNicName = targetNicName; + this.IsSelectedForMigration = isSelectedForMigration; CustomInit(); } @@ -72,93 +90,89 @@ public VMwareCbtNicDetails() /// partial void CustomInit(); + /// /// Gets the NIC Id. /// - [JsonProperty(PropertyName = "nicId")] - public string NicId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nicId")] + public string NicId {get; private set; } /// /// Gets or sets a value indicating whether this is the primary NIC. /// - [JsonProperty(PropertyName = "isPrimaryNic")] - public string IsPrimaryNic { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isPrimaryNic")] + public string IsPrimaryNic {get; set; } /// /// Gets the source IP address. /// - [JsonProperty(PropertyName = "sourceIPAddress")] - public string SourceIPAddress { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceIPAddress")] + public string SourceIPAddress {get; private set; } /// - /// Gets the source IP address type. Possible values include: - /// 'Dynamic', 'Static' + /// Gets the source IP address type. Possible values include: 'Dynamic', 'Static' /// - [JsonProperty(PropertyName = "sourceIPAddressType")] - public string SourceIPAddressType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceIPAddressType")] + public string SourceIPAddressType {get; private set; } /// /// Gets source network Id. /// - [JsonProperty(PropertyName = "sourceNetworkId")] - public string SourceNetworkId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceNetworkId")] + public string SourceNetworkId {get; private set; } /// /// Gets or sets the target IP address. /// - [JsonProperty(PropertyName = "targetIPAddress")] - public string TargetIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetIPAddress")] + public string TargetIPAddress {get; set; } /// - /// Gets or sets the target IP address type. Possible values include: - /// 'Dynamic', 'Static' + /// Gets or sets the target IP address type. Possible values include: 'Dynamic', 'Static' /// - [JsonProperty(PropertyName = "targetIPAddressType")] - public string TargetIPAddressType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetIPAddressType")] + public string TargetIPAddressType {get; set; } /// /// Gets or sets target subnet name. /// - [JsonProperty(PropertyName = "targetSubnetName")] - public string TargetSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetSubnetName")] + public string TargetSubnetName {get; set; } /// /// Gets or sets source network Id. /// - [JsonProperty(PropertyName = "testNetworkId")] - public string TestNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testNetworkId")] + public string TestNetworkId {get; set; } /// /// Gets or sets test subnet name. /// - [JsonProperty(PropertyName = "testSubnetName")] - public string TestSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testSubnetName")] + public string TestSubnetName {get; set; } /// /// Gets or sets the test IP address. /// - [JsonProperty(PropertyName = "testIPAddress")] - public string TestIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testIPAddress")] + public string TestIPAddress {get; set; } /// - /// Gets or sets the test IP address type. Possible values include: - /// 'Dynamic', 'Static' + /// Gets or sets the test IP address type. Possible values include: 'Dynamic', 'Static' /// - [JsonProperty(PropertyName = "testIPAddressType")] - public string TestIPAddressType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testIPAddressType")] + public string TestIPAddressType {get; set; } /// /// Gets or sets target NIC name. /// - [JsonProperty(PropertyName = "targetNicName")] - public string TargetNicName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicName")] + public string TargetNicName {get; set; } /// - /// Gets or sets a value indicating whether this NIC is selected for - /// migration. + /// Gets or sets a value indicating whether this NIC is selected for migration. /// - [JsonProperty(PropertyName = "isSelectedForMigration")] - public string IsSelectedForMigration { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isSelectedForMigration")] + public string IsSelectedForMigration {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtNicInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtNicInput.cs index 6cd8b10cdcb8..3ef2060c5b8f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtNicInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtNicInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,27 +23,41 @@ public VMwareCbtNicInput() /// /// Initializes a new instance of the VMwareCbtNicInput class. /// - /// The NIC Id. - /// A value indicating whether this is the - /// primary NIC. - /// Target subnet name. - /// The static IP address. - /// A value indicating whether - /// this NIC is selected for migration. - /// Target NIC name. - /// The test subnet name. - /// The test static IP - /// address. + + /// The NIC Id. + /// + + /// A value indicating whether this is the primary NIC. + /// + + /// Target subnet name. + /// + + /// The static IP address. + /// + + /// A value indicating whether this NIC is selected for migration. + /// + + /// Target NIC name. + /// + + /// The test subnet name. + /// + + /// The test static IP address. + /// public VMwareCbtNicInput(string nicId, string isPrimaryNic, string targetSubnetName = default(string), string targetStaticIPAddress = default(string), string isSelectedForMigration = default(string), string targetNicName = default(string), string testSubnetName = default(string), string testStaticIPAddress = default(string)) + { - NicId = nicId; - IsPrimaryNic = isPrimaryNic; - TargetSubnetName = targetSubnetName; - TargetStaticIPAddress = targetStaticIPAddress; - IsSelectedForMigration = isSelectedForMigration; - TargetNicName = targetNicName; - TestSubnetName = testSubnetName; - TestStaticIPAddress = testStaticIPAddress; + this.NicId = nicId; + this.IsPrimaryNic = isPrimaryNic; + this.TargetSubnetName = targetSubnetName; + this.TargetStaticIPAddress = targetStaticIPAddress; + this.IsSelectedForMigration = isSelectedForMigration; + this.TargetNicName = targetNicName; + this.TestSubnetName = testSubnetName; + this.TestStaticIPAddress = testStaticIPAddress; CustomInit(); } @@ -59,71 +66,78 @@ public VMwareCbtNicInput() /// partial void CustomInit(); + /// /// Gets or sets the NIC Id. /// - [JsonProperty(PropertyName = "nicId")] - public string NicId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nicId")] + public string NicId {get; set; } /// /// Gets or sets a value indicating whether this is the primary NIC. /// - [JsonProperty(PropertyName = "isPrimaryNic")] - public string IsPrimaryNic { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isPrimaryNic")] + public string IsPrimaryNic {get; set; } /// /// Gets or sets target subnet name. /// - [JsonProperty(PropertyName = "targetSubnetName")] - public string TargetSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetSubnetName")] + public string TargetSubnetName {get; set; } /// /// Gets or sets the static IP address. /// - [JsonProperty(PropertyName = "targetStaticIPAddress")] - public string TargetStaticIPAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetStaticIPAddress")] + public string TargetStaticIPAddress {get; set; } /// - /// Gets or sets a value indicating whether this NIC is selected for - /// migration. + /// Gets or sets a value indicating whether this NIC is selected for migration. /// - [JsonProperty(PropertyName = "isSelectedForMigration")] - public string IsSelectedForMigration { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isSelectedForMigration")] + public string IsSelectedForMigration {get; set; } /// /// Gets or sets target NIC name. /// - [JsonProperty(PropertyName = "targetNicName")] - public string TargetNicName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicName")] + public string TargetNicName {get; set; } /// /// Gets or sets the test subnet name. /// - [JsonProperty(PropertyName = "testSubnetName")] - public string TestSubnetName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testSubnetName")] + public string TestSubnetName {get; set; } /// /// Gets or sets the test static IP address. /// - [JsonProperty(PropertyName = "testStaticIPAddress")] - public string TestStaticIPAddress { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "testStaticIPAddress")] + public string TestStaticIPAddress {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (NicId == null) + if (this.NicId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "NicId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "NicId"); } - if (IsPrimaryNic == null) + if (this.IsPrimaryNic == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "IsPrimaryNic"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "IsPrimaryNic"); } + + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtPolicyCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtPolicyCreationInput.cs index 80667b146649..508b9a32c499 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtPolicyCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtPolicyCreationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareCbtPolicyCreationInput : PolicyProviderSpecificInput { /// - /// Initializes a new instance of the VMwareCbtPolicyCreationInput - /// class. + /// Initializes a new instance of the VMwareCbtPolicyCreationInput class. /// public VMwareCbtPolicyCreationInput() { @@ -29,20 +22,23 @@ public VMwareCbtPolicyCreationInput() } /// - /// Initializes a new instance of the VMwareCbtPolicyCreationInput - /// class. + /// Initializes a new instance of the VMwareCbtPolicyCreationInput class. /// - /// The duration in minutes - /// until which the recovery points need to be stored. - /// The crash - /// consistent snapshot frequency (in minutes). - /// The app consistent - /// snapshot frequency (in minutes). + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The crash consistent snapshot frequency (in minutes). + /// + + /// The app consistent snapshot frequency (in minutes). + /// public VMwareCbtPolicyCreationInput(int? recoveryPointHistoryInMinutes = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + { - RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; CustomInit(); } @@ -51,24 +47,24 @@ public VMwareCbtPolicyCreationInput() /// partial void CustomInit(); + /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistoryInMinutes")] - public int? RecoveryPointHistoryInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistoryInMinutes")] + public int? RecoveryPointHistoryInMinutes {get; set; } /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the app consistent snapshot frequency (in minutes). /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtProtectedDiskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtProtectedDiskDetails.cs index 45b826590932..95b00966cdfd 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtProtectedDiskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtProtectedDiskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareCbtProtectedDiskDetails { /// - /// Initializes a new instance of the VMwareCbtProtectedDiskDetails - /// class. + /// Initializes a new instance of the VMwareCbtProtectedDiskDetails class. /// public VMwareCbtProtectedDiskDetails() { @@ -28,47 +21,67 @@ public VMwareCbtProtectedDiskDetails() } /// - /// Initializes a new instance of the VMwareCbtProtectedDiskDetails - /// class. - /// - /// The disk id. - /// The disk name. - /// The disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - /// The disk path. - /// A value indicating whether the disk is the - /// OS disk. - /// The disk capacity in bytes. - /// The log storage account ARM - /// Id. - /// The key vault secret - /// name of the log storage account. - /// The DiskEncryptionSet ARM - /// Id. - /// The ARM Id of the seed managed - /// disk. - /// The uri of the seed blob. - /// The ARM Id of the target managed - /// disk. - /// The uri of the target blob. - /// The name for the target managed - /// disk. + /// Initializes a new instance of the VMwareCbtProtectedDiskDetails class. + /// + + /// The disk id. + /// + + /// The disk name. + /// + + /// The disk type. + /// Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + + /// The disk path. + /// + + /// A value indicating whether the disk is the OS disk. + /// + + /// The disk capacity in bytes. + /// + + /// The log storage account ARM Id. + /// + + /// The key vault secret name of the log storage account. + /// + + /// The DiskEncryptionSet ARM Id. + /// + + /// The ARM Id of the seed managed disk. + /// + + /// The uri of the seed blob. + /// + + /// The ARM Id of the target managed disk. + /// + + /// The uri of the target blob. + /// + + /// The name for the target managed disk. + /// public VMwareCbtProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string diskType = default(string), string diskPath = default(string), string isOSDisk = default(string), long? capacityInBytes = default(long?), string logStorageAccountId = default(string), string logStorageAccountSasSecretName = default(string), string diskEncryptionSetId = default(string), string seedManagedDiskId = default(string), string seedBlobUri = default(string), string targetManagedDiskId = default(string), string targetBlobUri = default(string), string targetDiskName = default(string)) + { - DiskId = diskId; - DiskName = diskName; - DiskType = diskType; - DiskPath = diskPath; - IsOSDisk = isOSDisk; - CapacityInBytes = capacityInBytes; - LogStorageAccountId = logStorageAccountId; - LogStorageAccountSasSecretName = logStorageAccountSasSecretName; - DiskEncryptionSetId = diskEncryptionSetId; - SeedManagedDiskId = seedManagedDiskId; - SeedBlobUri = seedBlobUri; - TargetManagedDiskId = targetManagedDiskId; - TargetBlobUri = targetBlobUri; - TargetDiskName = targetDiskName; + this.DiskId = diskId; + this.DiskName = diskName; + this.DiskType = diskType; + this.DiskPath = diskPath; + this.IsOSDisk = isOSDisk; + this.CapacityInBytes = capacityInBytes; + this.LogStorageAccountId = logStorageAccountId; + this.LogStorageAccountSasSecretName = logStorageAccountSasSecretName; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.SeedManagedDiskId = seedManagedDiskId; + this.SeedBlobUri = seedBlobUri; + this.TargetManagedDiskId = targetManagedDiskId; + this.TargetBlobUri = targetBlobUri; + this.TargetDiskName = targetDiskName; CustomInit(); } @@ -77,90 +90,89 @@ public VMwareCbtProtectedDiskDetails() /// partial void CustomInit(); + /// /// Gets the disk id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; private set; } /// /// Gets the disk name. /// - [JsonProperty(PropertyName = "diskName")] - public string DiskName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskName")] + public string DiskName {get; private set; } /// - /// Gets or sets the disk type. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + /// Gets or sets the disk type. Possible values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' /// - [JsonProperty(PropertyName = "diskType")] - public string DiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskType")] + public string DiskType {get; set; } /// /// Gets the disk path. /// - [JsonProperty(PropertyName = "diskPath")] - public string DiskPath { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskPath")] + public string DiskPath {get; private set; } /// /// Gets a value indicating whether the disk is the OS disk. /// - [JsonProperty(PropertyName = "isOSDisk")] - public string IsOSDisk { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isOSDisk")] + public string IsOSDisk {get; private set; } /// /// Gets the disk capacity in bytes. /// - [JsonProperty(PropertyName = "capacityInBytes")] - public long? CapacityInBytes { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "capacityInBytes")] + public long? CapacityInBytes {get; private set; } /// /// Gets the log storage account ARM Id. /// - [JsonProperty(PropertyName = "logStorageAccountId")] - public string LogStorageAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId {get; private set; } /// /// Gets the key vault secret name of the log storage account. /// - [JsonProperty(PropertyName = "logStorageAccountSasSecretName")] - public string LogStorageAccountSasSecretName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logStorageAccountSasSecretName")] + public string LogStorageAccountSasSecretName {get; private set; } /// /// Gets the DiskEncryptionSet ARM Id. /// - [JsonProperty(PropertyName = "diskEncryptionSetId")] - public string DiskEncryptionSetId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId {get; private set; } /// /// Gets the ARM Id of the seed managed disk. /// - [JsonProperty(PropertyName = "seedManagedDiskId")] - public string SeedManagedDiskId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedManagedDiskId")] + public string SeedManagedDiskId {get; private set; } /// /// Gets the uri of the seed blob. /// - [JsonProperty(PropertyName = "seedBlobUri")] - public string SeedBlobUri { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "seedBlobUri")] + public string SeedBlobUri {get; private set; } /// /// Gets the ARM Id of the target managed disk. /// - [JsonProperty(PropertyName = "targetManagedDiskId")] - public string TargetManagedDiskId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetManagedDiskId")] + public string TargetManagedDiskId {get; private set; } /// /// Gets the uri of the target blob. /// - [JsonProperty(PropertyName = "targetBlobUri")] - public string TargetBlobUri { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetBlobUri")] + public string TargetBlobUri {get; private set; } /// /// Gets or sets the name for the target managed disk. /// - [JsonProperty(PropertyName = "targetDiskName")] - public string TargetDiskName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDiskName")] + public string TargetDiskName {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtProtectionContainerMappingDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtProtectionContainerMappingDetails.cs index 80fba41a9603..47562b62880d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtProtectionContainerMappingDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtProtectionContainerMappingDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareCbtProtectionContainerMappingDetails : ProtectionContainerMappingProviderSpecificDetails { /// - /// Initializes a new instance of the - /// VMwareCbtProtectionContainerMappingDetails class. + /// Initializes a new instance of the VMwareCbtProtectionContainerMappingDetails class. /// public VMwareCbtProtectionContainerMappingDetails() { @@ -31,30 +22,43 @@ public VMwareCbtProtectionContainerMappingDetails() } /// - /// Initializes a new instance of the - /// VMwareCbtProtectionContainerMappingDetails class. + /// Initializes a new instance of the VMwareCbtProtectionContainerMappingDetails class. /// - /// The target key vault ARM Id. - /// The target key vault URI. - /// The storage account ARM Id. - /// The secret name of the - /// storage account. - /// The secret name - /// of the service bus connection string. - /// The target location. - /// The role size to NIC count - /// map. - /// The SKUs to be excluded. - public VMwareCbtProtectionContainerMappingDetails(string keyVaultId = default(string), string keyVaultUri = default(string), string storageAccountId = default(string), string storageAccountSasSecretName = default(string), string serviceBusConnectionStringSecretName = default(string), string targetLocation = default(string), IDictionary roleSizeToNicCountMap = default(IDictionary), IList excludedSkus = default(IList)) + + /// The target key vault ARM Id. + /// + + /// The target key vault URI. + /// + + /// The storage account ARM Id. + /// + + /// The secret name of the storage account. + /// + + /// The secret name of the service bus connection string. + /// + + /// The target location. + /// + + /// The role size to NIC count map. + /// + + /// The SKUs to be excluded. + /// + public VMwareCbtProtectionContainerMappingDetails(string keyVaultId = default(string), string keyVaultUri = default(string), string storageAccountId = default(string), string storageAccountSasSecretName = default(string), string serviceBusConnectionStringSecretName = default(string), string targetLocation = default(string), System.Collections.Generic.IDictionary roleSizeToNicCountMap = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList excludedSkus = default(System.Collections.Generic.IList)) + { - KeyVaultId = keyVaultId; - KeyVaultUri = keyVaultUri; - StorageAccountId = storageAccountId; - StorageAccountSasSecretName = storageAccountSasSecretName; - ServiceBusConnectionStringSecretName = serviceBusConnectionStringSecretName; - TargetLocation = targetLocation; - RoleSizeToNicCountMap = roleSizeToNicCountMap; - ExcludedSkus = excludedSkus; + this.KeyVaultId = keyVaultId; + this.KeyVaultUri = keyVaultUri; + this.StorageAccountId = storageAccountId; + this.StorageAccountSasSecretName = storageAccountSasSecretName; + this.ServiceBusConnectionStringSecretName = serviceBusConnectionStringSecretName; + this.TargetLocation = targetLocation; + this.RoleSizeToNicCountMap = roleSizeToNicCountMap; + this.ExcludedSkus = excludedSkus; CustomInit(); } @@ -63,53 +67,53 @@ public VMwareCbtProtectionContainerMappingDetails() /// partial void CustomInit(); + /// /// Gets the target key vault ARM Id. /// - [JsonProperty(PropertyName = "keyVaultId")] - public string KeyVaultId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultId")] + public string KeyVaultId {get; private set; } /// /// Gets the target key vault URI. /// - [JsonProperty(PropertyName = "keyVaultUri")] - public string KeyVaultUri { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultUri")] + public string KeyVaultUri {get; private set; } /// /// Gets the storage account ARM Id. /// - [JsonProperty(PropertyName = "storageAccountId")] - public string StorageAccountId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId {get; private set; } /// /// Gets the secret name of the storage account. /// - [JsonProperty(PropertyName = "storageAccountSasSecretName")] - public string StorageAccountSasSecretName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "storageAccountSasSecretName")] + public string StorageAccountSasSecretName {get; private set; } /// /// Gets the secret name of the service bus connection string. /// - [JsonProperty(PropertyName = "serviceBusConnectionStringSecretName")] - public string ServiceBusConnectionStringSecretName { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceBusConnectionStringSecretName")] + public string ServiceBusConnectionStringSecretName {get; private set; } /// /// Gets the target location. /// - [JsonProperty(PropertyName = "targetLocation")] - public string TargetLocation { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetLocation")] + public string TargetLocation {get; private set; } /// /// Gets the role size to NIC count map. /// - [JsonProperty(PropertyName = "roleSizeToNicCountMap")] - public IDictionary RoleSizeToNicCountMap { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "roleSizeToNicCountMap")] + public System.Collections.Generic.IDictionary RoleSizeToNicCountMap {get; private set; } /// /// Gets or sets the SKUs to be excluded. /// - [JsonProperty(PropertyName = "excludedSkus")] - public IList ExcludedSkus { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "excludedSkus")] + public System.Collections.Generic.IList ExcludedSkus {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtResumeReplicationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtResumeReplicationInput.cs index 6c8bcd351d8f..a280162fc962 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtResumeReplicationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtResumeReplicationInput.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareCbtResumeReplicationInput : ResumeReplicationProviderSpecificInput { /// - /// Initializes a new instance of the VMwareCbtResumeReplicationInput - /// class. + /// Initializes a new instance of the VMwareCbtResumeReplicationInput class. /// public VMwareCbtResumeReplicationInput() { @@ -29,14 +22,15 @@ public VMwareCbtResumeReplicationInput() } /// - /// Initializes a new instance of the VMwareCbtResumeReplicationInput - /// class. + /// Initializes a new instance of the VMwareCbtResumeReplicationInput class. /// - /// A value indicating whether - /// Migration resources to be deleted. + + /// A value indicating whether Migration resources to be deleted. + /// public VMwareCbtResumeReplicationInput(string deleteMigrationResources = default(string)) + { - DeleteMigrationResources = deleteMigrationResources; + this.DeleteMigrationResources = deleteMigrationResources; CustomInit(); } @@ -45,12 +39,11 @@ public VMwareCbtResumeReplicationInput() /// partial void CustomInit(); + /// - /// Gets or sets a value indicating whether Migration resources to be - /// deleted. + /// Gets or sets a value indicating whether Migration resources to be deleted. /// - [JsonProperty(PropertyName = "deleteMigrationResources")] - public string DeleteMigrationResources { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "deleteMigrationResources")] + public string DeleteMigrationResources {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtResyncInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtResyncInput.cs index 0fba4b74014a..a30f77e6f322 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtResyncInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtResyncInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -31,11 +24,13 @@ public VMwareCbtResyncInput() /// /// Initializes a new instance of the VMwareCbtResyncInput class. /// - /// A value indicating whether CBT is to be - /// reset. + + /// A value indicating whether CBT is to be reset. + /// public VMwareCbtResyncInput(string skipCbtReset) + { - SkipCbtReset = skipCbtReset; + this.SkipCbtReset = skipCbtReset; CustomInit(); } @@ -44,24 +39,25 @@ public VMwareCbtResyncInput(string skipCbtReset) /// partial void CustomInit(); + /// /// Gets or sets a value indicating whether CBT is to be reset. /// - [JsonProperty(PropertyName = "skipCbtReset")] - public string SkipCbtReset { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "skipCbtReset")] + public string SkipCbtReset {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (SkipCbtReset == null) + if (this.SkipCbtReset == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "SkipCbtReset"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SkipCbtReset"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtSecurityProfileProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtSecurityProfileProperties.cs index a90e04d9c58e..2b0b7abafb4b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtSecurityProfileProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtSecurityProfileProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareCbtSecurityProfileProperties { /// - /// Initializes a new instance of the - /// VMwareCbtSecurityProfileProperties class. + /// Initializes a new instance of the VMwareCbtSecurityProfileProperties class. /// public VMwareCbtSecurityProfileProperties() { @@ -28,28 +21,31 @@ public VMwareCbtSecurityProfileProperties() } /// - /// Initializes a new instance of the - /// VMwareCbtSecurityProfileProperties class. + /// Initializes a new instance of the VMwareCbtSecurityProfileProperties class. /// - /// The target VM security type. - /// Possible values include: 'None', 'TrustedLaunch', - /// 'ConfidentialVM' - /// A value indicating - /// whether secure boot to be enabled. - /// A value indicating whether - /// trusted platform module to be enabled. - /// A value - /// indicating whether integrity monitoring to be enabled. - /// A value - /// indicating whether confidential compute encryption to be - /// enabled. - public VMwareCbtSecurityProfileProperties(string targetVmSecurityType = default(string), string isTargetVmSecureBootEnabled = default(string), string isTargetVmTpmEnabled = default(string), string isTargetVmIntegrityMonitoringEnabled = default(string), string isTargetVmConfidentialEncryptionEnabled = default(string)) + + /// The target VM security type. + /// Possible values include: 'None', 'TrustedLaunch', 'ConfidentialVM' + + /// A value indicating whether secure boot to be enabled. + /// + + /// A value indicating whether trusted platform module to be enabled. + /// + + /// A value indicating whether integrity monitoring to be enabled. + /// + + /// A value indicating whether confidential compute encryption to be enabled. + /// + public VMwareCbtSecurityProfileProperties(string targetVMSecurityType = default(string), string isTargetVMSecureBootEnabled = default(string), string isTargetVMTpmEnabled = default(string), string isTargetVMIntegrityMonitoringEnabled = default(string), string isTargetVMConfidentialEncryptionEnabled = default(string)) + { - TargetVmSecurityType = targetVmSecurityType; - IsTargetVmSecureBootEnabled = isTargetVmSecureBootEnabled; - IsTargetVmTpmEnabled = isTargetVmTpmEnabled; - IsTargetVmIntegrityMonitoringEnabled = isTargetVmIntegrityMonitoringEnabled; - IsTargetVmConfidentialEncryptionEnabled = isTargetVmConfidentialEncryptionEnabled; + this.TargetVMSecurityType = targetVMSecurityType; + this.IsTargetVMSecureBootEnabled = isTargetVMSecureBootEnabled; + this.IsTargetVMTpmEnabled = isTargetVMTpmEnabled; + this.IsTargetVMIntegrityMonitoringEnabled = isTargetVMIntegrityMonitoringEnabled; + this.IsTargetVMConfidentialEncryptionEnabled = isTargetVMConfidentialEncryptionEnabled; CustomInit(); } @@ -58,39 +54,37 @@ public VMwareCbtSecurityProfileProperties() /// partial void CustomInit(); + /// - /// Gets or sets the target VM security type. Possible values include: - /// 'None', 'TrustedLaunch', 'ConfidentialVM' + /// Gets or sets the target VM security type. Possible values include: 'None', 'TrustedLaunch', 'ConfidentialVM' /// - [JsonProperty(PropertyName = "targetVmSecurityType")] - public string TargetVmSecurityType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSecurityType")] + public string TargetVMSecurityType {get; set; } /// /// Gets or sets a value indicating whether secure boot to be enabled. /// - [JsonProperty(PropertyName = "isTargetVmSecureBootEnabled")] - public string IsTargetVmSecureBootEnabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isTargetVmSecureBootEnabled")] + public string IsTargetVMSecureBootEnabled {get; set; } /// - /// Gets or sets a value indicating whether trusted platform module to - /// be enabled. + /// Gets or sets a value indicating whether trusted platform module to be + /// enabled. /// - [JsonProperty(PropertyName = "isTargetVmTpmEnabled")] - public string IsTargetVmTpmEnabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isTargetVmTpmEnabled")] + public string IsTargetVMTpmEnabled {get; set; } /// - /// Gets or sets a value indicating whether integrity monitoring to be - /// enabled. + /// Gets or sets a value indicating whether integrity monitoring to be enabled. /// - [JsonProperty(PropertyName = "isTargetVmIntegrityMonitoringEnabled")] - public string IsTargetVmIntegrityMonitoringEnabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isTargetVmIntegrityMonitoringEnabled")] + public string IsTargetVMIntegrityMonitoringEnabled {get; set; } /// - /// Gets or sets a value indicating whether confidential compute - /// encryption to be enabled. + /// Gets or sets a value indicating whether confidential compute encryption to + /// be enabled. /// - [JsonProperty(PropertyName = "isTargetVmConfidentialEncryptionEnabled")] - public string IsTargetVmConfidentialEncryptionEnabled { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isTargetVmConfidentialEncryptionEnabled")] + public string IsTargetVMConfidentialEncryptionEnabled {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtTestMigrateInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtTestMigrateInput.cs index d528600dcdd1..7ce976511103 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtTestMigrateInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtTestMigrateInput.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -33,17 +24,25 @@ public VMwareCbtTestMigrateInput() /// /// Initializes a new instance of the VMwareCbtTestMigrateInput class. /// - /// The recovery point Id. - /// The test network Id. - /// The list of NIC details. - /// A value indicating the inplace OS - /// Upgrade version. - public VMwareCbtTestMigrateInput(string recoveryPointId, string networkId, IList vmNics = default(IList), string osUpgradeVersion = default(string)) + + /// The recovery point Id. + /// + + /// The test network Id. + /// + + /// The list of NIC details. + /// + + /// A value indicating the inplace OS Upgrade version. + /// + public VMwareCbtTestMigrateInput(string recoveryPointId, string networkId, System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), string osUpgradeVersion = default(string)) + { - RecoveryPointId = recoveryPointId; - NetworkId = networkId; - VmNics = vmNics; - OsUpgradeVersion = osUpgradeVersion; + this.RecoveryPointId = recoveryPointId; + this.NetworkId = networkId; + this.VMNics = vmNics; + this.OSUpgradeVersion = osUpgradeVersion; CustomInit(); } @@ -52,49 +51,51 @@ public VMwareCbtTestMigrateInput() /// partial void CustomInit(); + /// /// Gets or sets the recovery point Id. /// - [JsonProperty(PropertyName = "recoveryPointId")] - public string RecoveryPointId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId {get; set; } /// /// Gets or sets the test network Id. /// - [JsonProperty(PropertyName = "networkId")] - public string NetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkId")] + public string NetworkId {get; set; } /// /// Gets or sets the list of NIC details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets a value indicating the inplace OS Upgrade version. /// - [JsonProperty(PropertyName = "osUpgradeVersion")] - public string OsUpgradeVersion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "osUpgradeVersion")] + public string OSUpgradeVersion {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (RecoveryPointId == null) + if (this.RecoveryPointId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryPointId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecoveryPointId"); } - if (NetworkId == null) + if (this.NetworkId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "NetworkId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "NetworkId"); } - if (VmNics != null) + + + if (this.VMNics != null) { - foreach (var element in VmNics) + foreach (var element in this.VMNics) { if (element != null) { @@ -102,6 +103,7 @@ public virtual void Validate() } } } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtUpdateDiskInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtUpdateDiskInput.cs index ee7f5feda094..7c564466f0cf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtUpdateDiskInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtUpdateDiskInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,15 +23,21 @@ public VMwareCbtUpdateDiskInput() /// /// Initializes a new instance of the VMwareCbtUpdateDiskInput class. /// - /// The disk Id. - /// The target disk name. - /// A value indicating whether the disk is the - /// OS disk. + + /// The disk Id. + /// + + /// The target disk name. + /// + + /// A value indicating whether the disk is the OS disk. + /// public VMwareCbtUpdateDiskInput(string diskId, string targetDiskName = default(string), string isOSDisk = default(string)) + { - DiskId = diskId; - TargetDiskName = targetDiskName; - IsOSDisk = isOSDisk; + this.DiskId = diskId; + this.TargetDiskName = targetDiskName; + this.IsOSDisk = isOSDisk; CustomInit(); } @@ -47,36 +46,39 @@ public VMwareCbtUpdateDiskInput() /// partial void CustomInit(); + /// /// Gets or sets the disk Id. /// - [JsonProperty(PropertyName = "diskId")] - public string DiskId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskId")] + public string DiskId {get; set; } /// /// Gets or sets the target disk name. /// - [JsonProperty(PropertyName = "targetDiskName")] - public string TargetDiskName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDiskName")] + public string TargetDiskName {get; set; } /// /// Gets or sets a value indicating whether the disk is the OS disk. /// - [JsonProperty(PropertyName = "isOSDisk")] - public string IsOSDisk { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isOSDisk")] + public string IsOSDisk {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (DiskId == null) + if (this.DiskId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "DiskId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DiskId"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtUpdateMigrationItemInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtUpdateMigrationItemInput.cs index 36fa71d4511e..db46eb5674d6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtUpdateMigrationItemInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareCbtUpdateMigrationItemInput.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareCbtUpdateMigrationItemInput : UpdateMigrationItemProviderSpecificInput { /// - /// Initializes a new instance of the VMwareCbtUpdateMigrationItemInput - /// class. + /// Initializes a new instance of the VMwareCbtUpdateMigrationItemInput class. /// public VMwareCbtUpdateMigrationItemInput() { @@ -31,54 +22,79 @@ public VMwareCbtUpdateMigrationItemInput() } /// - /// Initializes a new instance of the VMwareCbtUpdateMigrationItemInput - /// class. - /// - /// The target VM name. - /// The target VM size. - /// The target resource group ARM - /// Id. - /// The target availability set - /// ARM Id. - /// The target availability - /// zone. - /// The target proximity - /// placement group ARM Id. - /// The target boot - /// diagnostics storage account ARM Id. - /// The target network ARM Id. - /// The test network ARM Id. - /// The list of NIC details. - /// The list of disk update properties. - /// The license type. Possible values - /// include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' + /// Initializes a new instance of the VMwareCbtUpdateMigrationItemInput class. + /// + + /// The target VM name. + /// + + /// The target VM size. + /// + + /// The target resource group ARM Id. + /// + + /// The target availability set ARM Id. + /// + + /// The target availability zone. + /// + + /// The target proximity placement group ARM Id. + /// + + /// The target boot diagnostics storage account ARM Id. + /// + + /// The target network ARM Id. + /// + + /// The test network ARM Id. + /// + + /// The list of NIC details. + /// + + /// The list of disk update properties. + /// + + /// The license type. + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' + /// The SQL Server license type. - /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', - /// 'AHUB' - /// A value indicating whether auto - /// resync is to be done. - /// The target VM tags. - /// The tags for the target disks. - /// The tags for the target NICs. - public VMwareCbtUpdateMigrationItemInput(string targetVmName = default(string), string targetVmSize = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string targetNetworkId = default(string), string testNetworkId = default(string), IList vmNics = default(IList), IList vmDisks = default(IList), string licenseType = default(string), string sqlServerLicenseType = default(string), string performAutoResync = default(string), IDictionary targetVmTags = default(IDictionary), IDictionary targetDiskTags = default(IDictionary), IDictionary targetNicTags = default(IDictionary)) + /// Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + + /// A value indicating whether auto resync is to be done. + /// + + /// The target VM tags. + /// + + /// The tags for the target disks. + /// + + /// The tags for the target NICs. + /// + public VMwareCbtUpdateMigrationItemInput(string targetVMName = default(string), string targetVMSize = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetAvailabilityZone = default(string), string targetProximityPlacementGroupId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string targetNetworkId = default(string), string testNetworkId = default(string), System.Collections.Generic.IList vmNics = default(System.Collections.Generic.IList), System.Collections.Generic.IList vmDisks = default(System.Collections.Generic.IList), string licenseType = default(string), string sqlServerLicenseType = default(string), string performAutoResync = default(string), System.Collections.Generic.IDictionary targetVMTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetDiskTags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary targetNicTags = default(System.Collections.Generic.IDictionary)) + { - TargetVmName = targetVmName; - TargetVmSize = targetVmSize; - TargetResourceGroupId = targetResourceGroupId; - TargetAvailabilitySetId = targetAvailabilitySetId; - TargetAvailabilityZone = targetAvailabilityZone; - TargetProximityPlacementGroupId = targetProximityPlacementGroupId; - TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; - TargetNetworkId = targetNetworkId; - TestNetworkId = testNetworkId; - VmNics = vmNics; - VmDisks = vmDisks; - LicenseType = licenseType; - SqlServerLicenseType = sqlServerLicenseType; - PerformAutoResync = performAutoResync; - TargetVmTags = targetVmTags; - TargetDiskTags = targetDiskTags; - TargetNicTags = targetNicTags; + this.TargetVMName = targetVMName; + this.TargetVMSize = targetVMSize; + this.TargetResourceGroupId = targetResourceGroupId; + this.TargetAvailabilitySetId = targetAvailabilitySetId; + this.TargetAvailabilityZone = targetAvailabilityZone; + this.TargetProximityPlacementGroupId = targetProximityPlacementGroupId; + this.TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; + this.TargetNetworkId = targetNetworkId; + this.TestNetworkId = testNetworkId; + this.VMNics = vmNics; + this.VMDisks = vmDisks; + this.LicenseType = licenseType; + this.SqlServerLicenseType = sqlServerLicenseType; + this.PerformAutoResync = performAutoResync; + this.TargetVMTags = targetVMTags; + this.TargetDiskTags = targetDiskTags; + this.TargetNicTags = targetNicTags; CustomInit(); } @@ -87,109 +103,107 @@ public VMwareCbtUpdateMigrationItemInput() /// partial void CustomInit(); + /// /// Gets or sets the target VM name. /// - [JsonProperty(PropertyName = "targetVmName")] - public string TargetVmName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmName")] + public string TargetVMName {get; set; } /// /// Gets or sets the target VM size. /// - [JsonProperty(PropertyName = "targetVmSize")] - public string TargetVmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmSize")] + public string TargetVMSize {get; set; } /// /// Gets or sets the target resource group ARM Id. /// - [JsonProperty(PropertyName = "targetResourceGroupId")] - public string TargetResourceGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroupId")] + public string TargetResourceGroupId {get; set; } /// /// Gets or sets the target availability set ARM Id. /// - [JsonProperty(PropertyName = "targetAvailabilitySetId")] - public string TargetAvailabilitySetId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilitySetId")] + public string TargetAvailabilitySetId {get; set; } /// /// Gets or sets the target availability zone. /// - [JsonProperty(PropertyName = "targetAvailabilityZone")] - public string TargetAvailabilityZone { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetAvailabilityZone")] + public string TargetAvailabilityZone {get; set; } /// /// Gets or sets the target proximity placement group ARM Id. /// - [JsonProperty(PropertyName = "targetProximityPlacementGroupId")] - public string TargetProximityPlacementGroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetProximityPlacementGroupId")] + public string TargetProximityPlacementGroupId {get; set; } /// /// Gets or sets the target boot diagnostics storage account ARM Id. /// - [JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] - public string TargetBootDiagnosticsStorageAccountId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] + public string TargetBootDiagnosticsStorageAccountId {get; set; } /// /// Gets or sets the target network ARM Id. /// - [JsonProperty(PropertyName = "targetNetworkId")] - public string TargetNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNetworkId")] + public string TargetNetworkId {get; set; } /// /// Gets or sets the test network ARM Id. /// - [JsonProperty(PropertyName = "testNetworkId")] - public string TestNetworkId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "testNetworkId")] + public string TestNetworkId {get; set; } /// /// Gets or sets the list of NIC details. /// - [JsonProperty(PropertyName = "vmNics")] - public IList VmNics { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmNics")] + public System.Collections.Generic.IList VMNics {get; set; } /// /// Gets or sets the list of disk update properties. /// - [JsonProperty(PropertyName = "vmDisks")] - public IList VmDisks { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmDisks")] + public System.Collections.Generic.IList VMDisks {get; set; } /// - /// Gets or sets the license type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'WindowsServer' + /// Gets or sets the license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// - /// Gets or sets the SQL Server license type. Possible values include: - /// 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' + /// Gets or sets the SQL Server license type. Possible values include: 'NotSpecified', 'NoLicenseType', 'PAYG', 'AHUB' /// - [JsonProperty(PropertyName = "sqlServerLicenseType")] - public string SqlServerLicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sqlServerLicenseType")] + public string SqlServerLicenseType {get; set; } /// /// Gets or sets a value indicating whether auto resync is to be done. /// - [JsonProperty(PropertyName = "performAutoResync")] - public string PerformAutoResync { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "performAutoResync")] + public string PerformAutoResync {get; set; } /// /// Gets or sets the target VM tags. /// - [JsonProperty(PropertyName = "targetVmTags")] - public IDictionary TargetVmTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetVmTags")] + public System.Collections.Generic.IDictionary TargetVMTags {get; set; } /// /// Gets or sets the tags for the target disks. /// - [JsonProperty(PropertyName = "targetDiskTags")] - public IDictionary TargetDiskTags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "targetDiskTags")] + public System.Collections.Generic.IDictionary TargetDiskTags {get; set; } /// /// Gets or sets the tags for the target NICs. /// - [JsonProperty(PropertyName = "targetNicTags")] - public IDictionary TargetNicTags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNicTags")] + public System.Collections.Generic.IDictionary TargetNicTags {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareDetails.cs index 3bfa9c8b3405..74dff24e8516 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,86 +24,141 @@ public VMwareDetails() /// /// Initializes a new instance of the VMwareDetails class. /// - /// The list of Process Servers associated - /// with the fabric. - /// The list of Master Target servers - /// associated with the fabric. - /// The list of run as accounts created on - /// the server. - /// The number of replication pairs - /// configured in this CS. - /// The number of process - /// servers. - /// The number of source and target servers - /// configured to talk to this CS. - /// The number of protected - /// servers. - /// The percentage of the system load. - /// The system load status. - /// The percentage of the CPU load. - /// The CPU load status. - /// The total memory. - /// The available memory. - /// The memory usage status. - /// The total space. - /// The available space. - /// The space usage status. - /// The web load. - /// The web load status. - /// The database server load. - /// The database server load - /// status. - /// The CS service status. - /// The IP address. - /// The agent Version. - /// The host name. - /// The last heartbeat received from CS - /// server. - /// Version status. - /// CS SSL cert expiry date. - /// CS SSL cert expiry - /// date. - /// PS template version. - /// Agent expiry date. - /// The agent version - /// details. - /// The switch - /// provider blocking error information. - public VMwareDetails(IList processServers = default(IList), IList masterTargetServers = default(IList), IList runAsAccounts = default(IList), string replicationPairCount = default(string), string processServerCount = default(string), string agentCount = default(string), string protectedServers = default(string), string systemLoad = default(string), string systemLoadStatus = default(string), string cpuLoad = default(string), string cpuLoadStatus = default(string), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), string memoryUsageStatus = default(string), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), string spaceUsageStatus = default(string), string webLoad = default(string), string webLoadStatus = default(string), string databaseServerLoad = default(string), string databaseServerLoadStatus = default(string), string csServiceStatus = default(string), string ipAddress = default(string), string agentVersion = default(string), string hostName = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), System.DateTime? sslCertExpiryDate = default(System.DateTime?), int? sslCertExpiryRemainingDays = default(int?), string psTemplateVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), VersionDetails agentVersionDetails = default(VersionDetails), IList switchProviderBlockingErrorDetails = default(IList)) + + /// The list of Process Servers associated with the fabric. + /// + + /// The list of Master Target servers associated with the fabric. + /// + + /// The list of run as accounts created on the server. + /// + + /// The number of replication pairs configured in this CS. + /// + + /// The number of process servers. + /// + + /// The number of source and target servers configured to talk to this CS. + /// + + /// The number of protected servers. + /// + + /// The percentage of the system load. + /// + + /// The system load status. + /// + + /// The percentage of the CPU load. + /// + + /// The CPU load status. + /// + + /// The total memory. + /// + + /// The available memory. + /// + + /// The memory usage status. + /// + + /// The total space. + /// + + /// The available space. + /// + + /// The space usage status. + /// + + /// The web load. + /// + + /// The web load status. + /// + + /// The database server load. + /// + + /// The database server load status. + /// + + /// The CS service status. + /// + + /// The IP address. + /// + + /// The agent Version. + /// + + /// The host name. + /// + + /// The last heartbeat received from CS server. + /// + + /// Version status. + /// + + /// CS SSL cert expiry date. + /// + + /// CS SSL cert expiry date. + /// + + /// PS template version. + /// + + /// Agent expiry date. + /// + + /// The agent version details. + /// + + /// The switch provider blocking error information. + /// + public VMwareDetails(System.Collections.Generic.IList processServers = default(System.Collections.Generic.IList), System.Collections.Generic.IList masterTargetServers = default(System.Collections.Generic.IList), System.Collections.Generic.IList runAsAccounts = default(System.Collections.Generic.IList), string replicationPairCount = default(string), string processServerCount = default(string), string agentCount = default(string), string protectedServers = default(string), string systemLoad = default(string), string systemLoadStatus = default(string), string cpuLoad = default(string), string cpuLoadStatus = default(string), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), string memoryUsageStatus = default(string), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), string spaceUsageStatus = default(string), string webLoad = default(string), string webLoadStatus = default(string), string databaseServerLoad = default(string), string databaseServerLoadStatus = default(string), string csServiceStatus = default(string), string ipAddress = default(string), string agentVersion = default(string), string hostName = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), System.DateTime? sslCertExpiryDate = default(System.DateTime?), int? sslCertExpiryRemainingDays = default(int?), string psTemplateVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), VersionDetails agentVersionDetails = default(VersionDetails), System.Collections.Generic.IList switchProviderBlockingErrorDetails = default(System.Collections.Generic.IList)) + { - ProcessServers = processServers; - MasterTargetServers = masterTargetServers; - RunAsAccounts = runAsAccounts; - ReplicationPairCount = replicationPairCount; - ProcessServerCount = processServerCount; - AgentCount = agentCount; - ProtectedServers = protectedServers; - SystemLoad = systemLoad; - SystemLoadStatus = systemLoadStatus; - CpuLoad = cpuLoad; - CpuLoadStatus = cpuLoadStatus; - TotalMemoryInBytes = totalMemoryInBytes; - AvailableMemoryInBytes = availableMemoryInBytes; - MemoryUsageStatus = memoryUsageStatus; - TotalSpaceInBytes = totalSpaceInBytes; - AvailableSpaceInBytes = availableSpaceInBytes; - SpaceUsageStatus = spaceUsageStatus; - WebLoad = webLoad; - WebLoadStatus = webLoadStatus; - DatabaseServerLoad = databaseServerLoad; - DatabaseServerLoadStatus = databaseServerLoadStatus; - CsServiceStatus = csServiceStatus; - IpAddress = ipAddress; - AgentVersion = agentVersion; - HostName = hostName; - LastHeartbeat = lastHeartbeat; - VersionStatus = versionStatus; - SslCertExpiryDate = sslCertExpiryDate; - SslCertExpiryRemainingDays = sslCertExpiryRemainingDays; - PsTemplateVersion = psTemplateVersion; - AgentExpiryDate = agentExpiryDate; - AgentVersionDetails = agentVersionDetails; - SwitchProviderBlockingErrorDetails = switchProviderBlockingErrorDetails; + this.ProcessServers = processServers; + this.MasterTargetServers = masterTargetServers; + this.RunAsAccounts = runAsAccounts; + this.ReplicationPairCount = replicationPairCount; + this.ProcessServerCount = processServerCount; + this.AgentCount = agentCount; + this.ProtectedServers = protectedServers; + this.SystemLoad = systemLoad; + this.SystemLoadStatus = systemLoadStatus; + this.CpuLoad = cpuLoad; + this.CpuLoadStatus = cpuLoadStatus; + this.TotalMemoryInBytes = totalMemoryInBytes; + this.AvailableMemoryInBytes = availableMemoryInBytes; + this.MemoryUsageStatus = memoryUsageStatus; + this.TotalSpaceInBytes = totalSpaceInBytes; + this.AvailableSpaceInBytes = availableSpaceInBytes; + this.SpaceUsageStatus = spaceUsageStatus; + this.WebLoad = webLoad; + this.WebLoadStatus = webLoadStatus; + this.DatabaseServerLoad = databaseServerLoad; + this.DatabaseServerLoadStatus = databaseServerLoadStatus; + this.CsServiceStatus = csServiceStatus; + this.IPAddress = ipAddress; + this.AgentVersion = agentVersion; + this.HostName = hostName; + this.LastHeartbeat = lastHeartbeat; + this.VersionStatus = versionStatus; + this.SslCertExpiryDate = sslCertExpiryDate; + this.SslCertExpiryRemainingDays = sslCertExpiryRemainingDays; + this.PsTemplateVersion = psTemplateVersion; + this.AgentExpiryDate = agentExpiryDate; + this.AgentVersionDetails = agentVersionDetails; + this.SwitchProviderBlockingErrorDetails = switchProviderBlockingErrorDetails; CustomInit(); } @@ -120,206 +167,204 @@ public VMwareDetails() /// partial void CustomInit(); + /// - /// Gets or sets the list of Process Servers associated with the - /// fabric. + /// Gets or sets the list of Process Servers associated with the fabric. /// - [JsonProperty(PropertyName = "processServers")] - public IList ProcessServers { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServers")] + public System.Collections.Generic.IList ProcessServers {get; set; } /// - /// Gets or sets the list of Master Target servers associated with the - /// fabric. + /// Gets or sets the list of Master Target servers associated with the fabric. /// - [JsonProperty(PropertyName = "masterTargetServers")] - public IList MasterTargetServers { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "masterTargetServers")] + public System.Collections.Generic.IList MasterTargetServers {get; set; } /// /// Gets or sets the list of run as accounts created on the server. /// - [JsonProperty(PropertyName = "runAsAccounts")] - public IList RunAsAccounts { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "runAsAccounts")] + public System.Collections.Generic.IList RunAsAccounts {get; set; } /// /// Gets or sets the number of replication pairs configured in this CS. /// - [JsonProperty(PropertyName = "replicationPairCount")] - public string ReplicationPairCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "replicationPairCount")] + public string ReplicationPairCount {get; set; } /// /// Gets or sets the number of process servers. /// - [JsonProperty(PropertyName = "processServerCount")] - public string ProcessServerCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "processServerCount")] + public string ProcessServerCount {get; set; } /// - /// Gets or sets the number of source and target servers configured to - /// talk to this CS. + /// Gets or sets the number of source and target servers configured to talk to + /// this CS. /// - [JsonProperty(PropertyName = "agentCount")] - public string AgentCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentCount")] + public string AgentCount {get; set; } /// /// Gets or sets the number of protected servers. /// - [JsonProperty(PropertyName = "protectedServers")] - public string ProtectedServers { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedServers")] + public string ProtectedServers {get; set; } /// /// Gets or sets the percentage of the system load. /// - [JsonProperty(PropertyName = "systemLoad")] - public string SystemLoad { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "systemLoad")] + public string SystemLoad {get; set; } /// /// Gets or sets the system load status. /// - [JsonProperty(PropertyName = "systemLoadStatus")] - public string SystemLoadStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "systemLoadStatus")] + public string SystemLoadStatus {get; set; } /// /// Gets or sets the percentage of the CPU load. /// - [JsonProperty(PropertyName = "cpuLoad")] - public string CpuLoad { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cpuLoad")] + public string CpuLoad {get; set; } /// /// Gets or sets the CPU load status. /// - [JsonProperty(PropertyName = "cpuLoadStatus")] - public string CpuLoadStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cpuLoadStatus")] + public string CpuLoadStatus {get; set; } /// /// Gets or sets the total memory. /// - [JsonProperty(PropertyName = "totalMemoryInBytes")] - public long? TotalMemoryInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "totalMemoryInBytes")] + public long? TotalMemoryInBytes {get; set; } /// /// Gets or sets the available memory. /// - [JsonProperty(PropertyName = "availableMemoryInBytes")] - public long? AvailableMemoryInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "availableMemoryInBytes")] + public long? AvailableMemoryInBytes {get; set; } /// /// Gets or sets the memory usage status. /// - [JsonProperty(PropertyName = "memoryUsageStatus")] - public string MemoryUsageStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "memoryUsageStatus")] + public string MemoryUsageStatus {get; set; } /// /// Gets or sets the total space. /// - [JsonProperty(PropertyName = "totalSpaceInBytes")] - public long? TotalSpaceInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "totalSpaceInBytes")] + public long? TotalSpaceInBytes {get; set; } /// /// Gets or sets the available space. /// - [JsonProperty(PropertyName = "availableSpaceInBytes")] - public long? AvailableSpaceInBytes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "availableSpaceInBytes")] + public long? AvailableSpaceInBytes {get; set; } /// /// Gets or sets the space usage status. /// - [JsonProperty(PropertyName = "spaceUsageStatus")] - public string SpaceUsageStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "spaceUsageStatus")] + public string SpaceUsageStatus {get; set; } /// /// Gets or sets the web load. /// - [JsonProperty(PropertyName = "webLoad")] - public string WebLoad { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "webLoad")] + public string WebLoad {get; set; } /// /// Gets or sets the web load status. /// - [JsonProperty(PropertyName = "webLoadStatus")] - public string WebLoadStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "webLoadStatus")] + public string WebLoadStatus {get; set; } /// /// Gets or sets the database server load. /// - [JsonProperty(PropertyName = "databaseServerLoad")] - public string DatabaseServerLoad { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "databaseServerLoad")] + public string DatabaseServerLoad {get; set; } /// /// Gets or sets the database server load status. /// - [JsonProperty(PropertyName = "databaseServerLoadStatus")] - public string DatabaseServerLoadStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "databaseServerLoadStatus")] + public string DatabaseServerLoadStatus {get; set; } /// /// Gets or sets the CS service status. /// - [JsonProperty(PropertyName = "csServiceStatus")] - public string CsServiceStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "csServiceStatus")] + public string CsServiceStatus {get; set; } /// /// Gets or sets the IP address. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the agent Version. /// - [JsonProperty(PropertyName = "agentVersion")] - public string AgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion {get; set; } /// /// Gets or sets the host name. /// - [JsonProperty(PropertyName = "hostName")] - public string HostName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "hostName")] + public string HostName {get; set; } /// /// Gets or sets the last heartbeat received from CS server. /// - [JsonProperty(PropertyName = "lastHeartbeat")] - public System.DateTime? LastHeartbeat { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat {get; set; } /// /// Gets or sets version status. /// - [JsonProperty(PropertyName = "versionStatus")] - public string VersionStatus { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "versionStatus")] + public string VersionStatus {get; set; } /// - /// Gets or sets CS SSL cert expiry date. + /// Gets or sets cS SSL cert expiry date. /// - [JsonProperty(PropertyName = "sslCertExpiryDate")] - public System.DateTime? SslCertExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sslCertExpiryDate")] + public System.DateTime? SslCertExpiryDate {get; set; } /// - /// Gets or sets CS SSL cert expiry date. + /// Gets or sets cS SSL cert expiry date. /// - [JsonProperty(PropertyName = "sslCertExpiryRemainingDays")] - public int? SslCertExpiryRemainingDays { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sslCertExpiryRemainingDays")] + public int? SslCertExpiryRemainingDays {get; set; } /// - /// Gets or sets PS template version. + /// Gets or sets pS template version. /// - [JsonProperty(PropertyName = "psTemplateVersion")] - public string PsTemplateVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "psTemplateVersion")] + public string PsTemplateVersion {get; set; } /// /// Gets or sets agent expiry date. /// - [JsonProperty(PropertyName = "agentExpiryDate")] - public System.DateTime? AgentExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentExpiryDate")] + public System.DateTime? AgentExpiryDate {get; set; } /// /// Gets or sets the agent version details. /// - [JsonProperty(PropertyName = "agentVersionDetails")] - public VersionDetails AgentVersionDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersionDetails")] + public VersionDetails AgentVersionDetails {get; set; } /// /// Gets or sets the switch provider blocking error information. /// - [JsonProperty(PropertyName = "switchProviderBlockingErrorDetails")] - public IList SwitchProviderBlockingErrorDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "switchProviderBlockingErrorDetails")] + public System.Collections.Generic.IList SwitchProviderBlockingErrorDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareV2FabricCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareV2FabricCreationInput.cs index ca5eb6b78585..82a256182be3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareV2FabricCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareV2FabricCreationInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -21,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareV2FabricCreationInput : FabricSpecificCreationInput { /// - /// Initializes a new instance of the VMwareV2FabricCreationInput - /// class. + /// Initializes a new instance of the VMwareV2FabricCreationInput class. /// public VMwareV2FabricCreationInput() { @@ -30,19 +22,23 @@ public VMwareV2FabricCreationInput() } /// - /// Initializes a new instance of the VMwareV2FabricCreationInput - /// class. + /// Initializes a new instance of the VMwareV2FabricCreationInput class. /// - /// The ARM Id of the migration - /// solution. - /// The ARM Id of the VMware site. - /// The ARM Id of the physical - /// site. + + /// The ARM Id of the VMware site. + /// + + /// The ARM Id of the physical site. + /// + + /// The ARM Id of the migration solution. + /// public VMwareV2FabricCreationInput(string migrationSolutionId, string vmwareSiteId = default(string), string physicalSiteId = default(string)) + { - VmwareSiteId = vmwareSiteId; - PhysicalSiteId = physicalSiteId; - MigrationSolutionId = migrationSolutionId; + this.VmwareSiteId = vmwareSiteId; + this.PhysicalSiteId = physicalSiteId; + this.MigrationSolutionId = migrationSolutionId; CustomInit(); } @@ -51,36 +47,39 @@ public VMwareV2FabricCreationInput() /// partial void CustomInit(); + /// /// Gets or sets the ARM Id of the VMware site. /// - [JsonProperty(PropertyName = "vmwareSiteId")] - public string VmwareSiteId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareSiteId")] + public string VmwareSiteId {get; set; } /// /// Gets or sets the ARM Id of the physical site. /// - [JsonProperty(PropertyName = "physicalSiteId")] - public string PhysicalSiteId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "physicalSiteId")] + public string PhysicalSiteId {get; set; } /// /// Gets or sets the ARM Id of the migration solution. /// - [JsonProperty(PropertyName = "migrationSolutionId")] - public string MigrationSolutionId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "migrationSolutionId")] + public string MigrationSolutionId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (MigrationSolutionId == null) + if (this.MigrationSolutionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "MigrationSolutionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MigrationSolutionId"); } + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareV2FabricSpecificDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareV2FabricSpecificDetails.cs index 4f67ad5cf76b..871545fbc45c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareV2FabricSpecificDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareV2FabricSpecificDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareV2FabricSpecificDetails : FabricSpecificDetails { /// - /// Initializes a new instance of the VMwareV2FabricSpecificDetails - /// class. + /// Initializes a new instance of the VMwareV2FabricSpecificDetails class. /// public VMwareV2FabricSpecificDetails() { @@ -31,27 +22,39 @@ public VMwareV2FabricSpecificDetails() } /// - /// Initializes a new instance of the VMwareV2FabricSpecificDetails - /// class. + /// Initializes a new instance of the VMwareV2FabricSpecificDetails class. /// - /// The ARM Id of the VMware site. - /// The ARM Id of the physical - /// site. - /// The Migration solution ARM - /// Id. - /// The service endpoint. - /// The service resource Id. - /// The service container Id. - /// The list of process servers. - public VMwareV2FabricSpecificDetails(string vmwareSiteId = default(string), string physicalSiteId = default(string), string migrationSolutionId = default(string), string serviceEndpoint = default(string), string serviceResourceId = default(string), string serviceContainerId = default(string), IList processServers = default(IList)) + + /// The ARM Id of the VMware site. + /// + + /// The ARM Id of the physical site. + /// + + /// The Migration solution ARM Id. + /// + + /// The service endpoint. + /// + + /// The service resource Id. + /// + + /// The service container Id. + /// + + /// The list of process servers. + /// + public VMwareV2FabricSpecificDetails(string vmwareSiteId = default(string), string physicalSiteId = default(string), string migrationSolutionId = default(string), string serviceEndpoint = default(string), string serviceResourceId = default(string), string serviceContainerId = default(string), System.Collections.Generic.IList processServers = default(System.Collections.Generic.IList)) + { - VmwareSiteId = vmwareSiteId; - PhysicalSiteId = physicalSiteId; - MigrationSolutionId = migrationSolutionId; - ServiceEndpoint = serviceEndpoint; - ServiceResourceId = serviceResourceId; - ServiceContainerId = serviceContainerId; - ProcessServers = processServers; + this.VmwareSiteId = vmwareSiteId; + this.PhysicalSiteId = physicalSiteId; + this.MigrationSolutionId = migrationSolutionId; + this.ServiceEndpoint = serviceEndpoint; + this.ServiceResourceId = serviceResourceId; + this.ServiceContainerId = serviceContainerId; + this.ProcessServers = processServers; CustomInit(); } @@ -60,47 +63,47 @@ public VMwareV2FabricSpecificDetails() /// partial void CustomInit(); + /// /// Gets the ARM Id of the VMware site. /// - [JsonProperty(PropertyName = "vmwareSiteId")] - public string VmwareSiteId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareSiteId")] + public string VmwareSiteId {get; private set; } /// /// Gets the ARM Id of the physical site. /// - [JsonProperty(PropertyName = "physicalSiteId")] - public string PhysicalSiteId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "physicalSiteId")] + public string PhysicalSiteId {get; private set; } /// /// Gets the Migration solution ARM Id. /// - [JsonProperty(PropertyName = "migrationSolutionId")] - public string MigrationSolutionId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "migrationSolutionId")] + public string MigrationSolutionId {get; private set; } /// /// Gets the service endpoint. /// - [JsonProperty(PropertyName = "serviceEndpoint")] - public string ServiceEndpoint { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceEndpoint")] + public string ServiceEndpoint {get; private set; } /// /// Gets the service resource Id. /// - [JsonProperty(PropertyName = "serviceResourceId")] - public string ServiceResourceId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceResourceId")] + public string ServiceResourceId {get; private set; } /// /// Gets the service container Id. /// - [JsonProperty(PropertyName = "serviceContainerId")] - public string ServiceContainerId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceContainerId")] + public string ServiceContainerId {get; private set; } /// /// Gets the list of process servers. /// - [JsonProperty(PropertyName = "processServers")] - public IList ProcessServers { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "processServers")] + public System.Collections.Generic.IList ProcessServers {get; private set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareVirtualMachineDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareVirtualMachineDetails.cs index 81280d067154..8a4098cdc3e1 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareVirtualMachineDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VMwareVirtualMachineDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VMwareVirtualMachineDetails : ConfigurationSettings { /// - /// Initializes a new instance of the VMwareVirtualMachineDetails - /// class. + /// Initializes a new instance of the VMwareVirtualMachineDetails class. /// public VMwareVirtualMachineDetails() { @@ -31,37 +22,53 @@ public VMwareVirtualMachineDetails() } /// - /// Initializes a new instance of the VMwareVirtualMachineDetails - /// class. + /// Initializes a new instance of the VMwareVirtualMachineDetails class. /// - /// The ID generated by the InMage agent - /// after it gets installed on guest. This is the ID to be used during - /// InMage CreateProtection. - /// The value indicating if InMage scout - /// agent is installed on guest. - /// The OsType installed on VM. - /// The agent version. - /// The IP address. - /// The value indicating whether VM is powered - /// on. - /// The VCenter infrastructure - /// Id. - /// A value indicating the discovery type - /// of the machine. Value can be vCenter or physical. - /// The disk details. - /// The validation errors. - public VMwareVirtualMachineDetails(string agentGeneratedId = default(string), string agentInstalled = default(string), string osType = default(string), string agentVersion = default(string), string ipAddress = default(string), string poweredOn = default(string), string vCenterInfrastructureId = default(string), string discoveryType = default(string), IList diskDetails = default(IList), IList validationErrors = default(IList)) + + /// The ID generated by the InMage agent after it gets installed on guest. This + /// is the ID to be used during InMage CreateProtection. + /// + + /// The value indicating if InMage scout agent is installed on guest. + /// + + /// The OsType installed on VM. + /// + + /// The agent version. + /// + + /// The IP address. + /// + + /// The value indicating whether VM is powered on. + /// + + /// The VCenter infrastructure Id. + /// + + /// A value indicating the discovery type of the machine. Value can be vCenter + /// or physical. + /// + + /// The disk details. + /// + + /// The validation errors. + /// + public VMwareVirtualMachineDetails(string agentGeneratedId = default(string), string agentInstalled = default(string), string osType = default(string), string agentVersion = default(string), string ipAddress = default(string), string poweredOn = default(string), string vCenterInfrastructureId = default(string), string discoveryType = default(string), System.Collections.Generic.IList diskDetails = default(System.Collections.Generic.IList), System.Collections.Generic.IList validationErrors = default(System.Collections.Generic.IList)) + { - AgentGeneratedId = agentGeneratedId; - AgentInstalled = agentInstalled; - OsType = osType; - AgentVersion = agentVersion; - IpAddress = ipAddress; - PoweredOn = poweredOn; - VCenterInfrastructureId = vCenterInfrastructureId; - DiscoveryType = discoveryType; - DiskDetails = diskDetails; - ValidationErrors = validationErrors; + this.AgentGeneratedId = agentGeneratedId; + this.AgentInstalled = agentInstalled; + this.OSType = osType; + this.AgentVersion = agentVersion; + this.IPAddress = ipAddress; + this.PoweredOn = poweredOn; + this.VCenterInfrastructureId = vCenterInfrastructureId; + this.DiscoveryType = discoveryType; + this.DiskDetails = diskDetails; + this.ValidationErrors = validationErrors; CustomInit(); } @@ -70,69 +77,68 @@ public VMwareVirtualMachineDetails() /// partial void CustomInit(); + /// - /// Gets or sets the ID generated by the InMage agent after it gets - /// installed on guest. This is the ID to be used during InMage - /// CreateProtection. + /// Gets or sets the ID generated by the InMage agent after it gets installed + /// on guest. This is the ID to be used during InMage CreateProtection. /// - [JsonProperty(PropertyName = "agentGeneratedId")] - public string AgentGeneratedId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentGeneratedId")] + public string AgentGeneratedId {get; set; } /// - /// Gets or sets the value indicating if InMage scout agent is - /// installed on guest. + /// Gets or sets the value indicating if InMage scout agent is installed on + /// guest. /// - [JsonProperty(PropertyName = "agentInstalled")] - public string AgentInstalled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentInstalled")] + public string AgentInstalled {get; set; } /// /// Gets or sets the OsType installed on VM. /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// /// Gets or sets the agent version. /// - [JsonProperty(PropertyName = "agentVersion")] - public string AgentVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion {get; set; } /// /// Gets or sets the IP address. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the value indicating whether VM is powered on. /// - [JsonProperty(PropertyName = "poweredOn")] - public string PoweredOn { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "poweredOn")] + public string PoweredOn {get; set; } /// /// Gets or sets the VCenter infrastructure Id. /// - [JsonProperty(PropertyName = "vCenterInfrastructureId")] - public string VCenterInfrastructureId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vCenterInfrastructureId")] + public string VCenterInfrastructureId {get; set; } /// - /// Gets or sets a value indicating the discovery type of the machine. - /// Value can be vCenter or physical. + /// Gets or sets a value indicating the discovery type of the machine. Value + /// can be vCenter or physical. /// - [JsonProperty(PropertyName = "discoveryType")] - public string DiscoveryType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "discoveryType")] + public string DiscoveryType {get; set; } /// /// Gets or sets the disk details. /// - [JsonProperty(PropertyName = "diskDetails")] - public IList DiskDetails { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskDetails")] + public System.Collections.Generic.IList DiskDetails {get; set; } /// /// Gets or sets the validation errors. /// - [JsonProperty(PropertyName = "validationErrors")] - public IList ValidationErrors { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "validationErrors")] + public System.Collections.Generic.IList ValidationErrors {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultHealthDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultHealthDetails.cs index 7ebb03568bc9..0dfdc51bf56f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultHealthDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultHealthDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public VaultHealthDetails() /// /// Initializes a new instance of the VaultHealthDetails class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The vault health related data. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The vault health related data. + /// public VaultHealthDetails(string id = default(string), string name = default(string), string type = default(string), string location = default(string), VaultHealthProperties properties = default(VaultHealthProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public VaultHealthDetails() /// partial void CustomInit(); + /// /// Gets or sets the vault health related data. /// - [JsonProperty(PropertyName = "properties")] - public VaultHealthProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public VaultHealthProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultHealthProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultHealthProperties.cs index 1ca4f6a3bbaa..685ca22893ad 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultHealthProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultHealthProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,19 +23,25 @@ public VaultHealthProperties() /// /// Initializes a new instance of the VaultHealthProperties class. /// - /// The list of errors on the vault. - /// The list of the health detail of - /// the protected items in the vault. - /// The list of the health detail of the - /// fabrics in the vault. - /// The list of the health detail of the - /// containers in the vault. - public VaultHealthProperties(IList vaultErrors = default(IList), ResourceHealthSummary protectedItemsHealth = default(ResourceHealthSummary), ResourceHealthSummary fabricsHealth = default(ResourceHealthSummary), ResourceHealthSummary containersHealth = default(ResourceHealthSummary)) + + /// The list of errors on the vault. + /// + + /// The list of the health detail of the protected items in the vault. + /// + + /// The list of the health detail of the fabrics in the vault. + /// + + /// The list of the health detail of the containers in the vault. + /// + public VaultHealthProperties(System.Collections.Generic.IList vaultErrors = default(System.Collections.Generic.IList), ResourceHealthSummary protectedItemsHealth = default(ResourceHealthSummary), ResourceHealthSummary fabricsHealth = default(ResourceHealthSummary), ResourceHealthSummary containersHealth = default(ResourceHealthSummary)) + { - VaultErrors = vaultErrors; - ProtectedItemsHealth = protectedItemsHealth; - FabricsHealth = fabricsHealth; - ContainersHealth = containersHealth; + this.VaultErrors = vaultErrors; + this.ProtectedItemsHealth = protectedItemsHealth; + this.FabricsHealth = fabricsHealth; + this.ContainersHealth = containersHealth; CustomInit(); } @@ -52,32 +50,30 @@ public VaultHealthProperties() /// partial void CustomInit(); + /// /// Gets or sets the list of errors on the vault. /// - [JsonProperty(PropertyName = "vaultErrors")] - public IList VaultErrors { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vaultErrors")] + public System.Collections.Generic.IList VaultErrors {get; set; } /// - /// Gets or sets the list of the health detail of the protected items - /// in the vault. + /// Gets or sets the list of the health detail of the protected items in the + /// vault. /// - [JsonProperty(PropertyName = "protectedItemsHealth")] - public ResourceHealthSummary ProtectedItemsHealth { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protectedItemsHealth")] + public ResourceHealthSummary ProtectedItemsHealth {get; set; } /// - /// Gets or sets the list of the health detail of the fabrics in the - /// vault. + /// Gets or sets the list of the health detail of the fabrics in the vault. /// - [JsonProperty(PropertyName = "fabricsHealth")] - public ResourceHealthSummary FabricsHealth { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fabricsHealth")] + public ResourceHealthSummary FabricsHealth {get; set; } /// - /// Gets or sets the list of the health detail of the containers in the - /// vault. + /// Gets or sets the list of the health detail of the containers in the vault. /// - [JsonProperty(PropertyName = "containersHealth")] - public ResourceHealthSummary ContainersHealth { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "containersHealth")] + public ResourceHealthSummary ContainersHealth {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSetting.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSetting.cs index 69bab0993006..8725628e9276 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSetting.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSetting.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,15 +23,26 @@ public VaultSetting() /// /// Initializes a new instance of the VaultSetting class. /// - /// Resource Id - /// Resource Name - /// Resource Type - /// Resource Location - /// The vault setting properties. + + /// Resource Id + /// + + /// Resource Name + /// + + /// Resource Type + /// + + /// Resource Location + /// + + /// The vault setting properties. + /// public VaultSetting(string id = default(string), string name = default(string), string type = default(string), string location = default(string), VaultSettingProperties properties = default(VaultSettingProperties)) - : base(id, name, type, location) + + : base(id, name, type, location) { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -46,11 +51,11 @@ public VaultSetting() /// partial void CustomInit(); + /// /// Gets or sets the vault setting properties. /// - [JsonProperty(PropertyName = "properties")] - public VaultSettingProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public VaultSettingProperties Properties {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingCreationInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingCreationInput.cs index 2b6be921bfba..8f4818612af2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingCreationInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingCreationInput.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,11 +23,13 @@ public VaultSettingCreationInput() /// /// Initializes a new instance of the VaultSettingCreationInput class. /// - /// Vault setting creation input - /// properties. + + /// Vault setting creation input properties. + /// public VaultSettingCreationInput(VaultSettingCreationInputProperties properties) + { - Properties = properties; + this.Properties = properties; CustomInit(); } @@ -43,24 +38,25 @@ public VaultSettingCreationInput(VaultSettingCreationInputProperties properties) /// partial void CustomInit(); + /// /// Gets or sets vault setting creation input properties. /// - [JsonProperty(PropertyName = "properties")] - public VaultSettingCreationInputProperties Properties { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public VaultSettingCreationInputProperties Properties {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Properties == null) + if (this.Properties == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); } + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingCreationInputProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingCreationInputProperties.cs index ce3dfec681af..4724bb566652 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingCreationInputProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingCreationInputProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VaultSettingCreationInputProperties { /// - /// Initializes a new instance of the - /// VaultSettingCreationInputProperties class. + /// Initializes a new instance of the VaultSettingCreationInputProperties class. /// public VaultSettingCreationInputProperties() { @@ -28,17 +21,19 @@ public VaultSettingCreationInputProperties() } /// - /// Initializes a new instance of the - /// VaultSettingCreationInputProperties class. + /// Initializes a new instance of the VaultSettingCreationInputProperties class. /// - /// The migration solution - /// Id. - /// VMware to Azure provider - /// type. + + /// The migration solution Id. + /// + + /// VMware to Azure provider type. + /// public VaultSettingCreationInputProperties(string migrationSolutionId = default(string), string vmwareToAzureProviderType = default(string)) + { - MigrationSolutionId = migrationSolutionId; - VmwareToAzureProviderType = vmwareToAzureProviderType; + this.MigrationSolutionId = migrationSolutionId; + this.VmwareToAzureProviderType = vmwareToAzureProviderType; CustomInit(); } @@ -47,17 +42,17 @@ public VaultSettingCreationInputProperties() /// partial void CustomInit(); + /// /// Gets or sets the migration solution Id. /// - [JsonProperty(PropertyName = "migrationSolutionId")] - public string MigrationSolutionId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "migrationSolutionId")] + public string MigrationSolutionId {get; set; } /// /// Gets or sets vMware to Azure provider type. /// - [JsonProperty(PropertyName = "vmwareToAzureProviderType")] - public string VmwareToAzureProviderType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareToAzureProviderType")] + public string VmwareToAzureProviderType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingProperties.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingProperties.cs index 80d32e28b9ff..e0f569953199 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingProperties.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VaultSettingProperties.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,14 +23,17 @@ public VaultSettingProperties() /// /// Initializes a new instance of the VaultSettingProperties class. /// - /// The migration solution ARM - /// Id. - /// VMware to Azure provider - /// type. + + /// The migration solution ARM Id. + /// + + /// VMware to Azure provider type. + /// public VaultSettingProperties(string migrationSolutionId = default(string), string vmwareToAzureProviderType = default(string)) + { - MigrationSolutionId = migrationSolutionId; - VmwareToAzureProviderType = vmwareToAzureProviderType; + this.MigrationSolutionId = migrationSolutionId; + this.VmwareToAzureProviderType = vmwareToAzureProviderType; CustomInit(); } @@ -45,17 +42,17 @@ public VaultSettingProperties() /// partial void CustomInit(); + /// /// Gets or sets the migration solution ARM Id. /// - [JsonProperty(PropertyName = "migrationSolutionId")] - public string MigrationSolutionId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "migrationSolutionId")] + public string MigrationSolutionId {get; set; } /// /// Gets or sets vMware to Azure provider type. /// - [JsonProperty(PropertyName = "vmwareToAzureProviderType")] - public string VmwareToAzureProviderType { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vmwareToAzureProviderType")] + public string VmwareToAzureProviderType {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VersionDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VersionDetails.cs index fe69a7fd1a87..5812df5084ed 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VersionDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VersionDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,16 +23,22 @@ public VersionDetails() /// /// Initializes a new instance of the VersionDetails class. /// - /// The agent version. - /// Version expiry date. - /// A value indicating whether security update - /// required. Possible values include: 'Supported', 'NotSupported', - /// 'Deprecated', 'UpdateRequired', 'SecurityUpdateRequired' + + /// The agent version. + /// + + /// Version expiry date. + /// + + /// A value indicating whether security update required. + /// Possible values include: 'Supported', 'NotSupported', 'Deprecated', + /// 'UpdateRequired', 'SecurityUpdateRequired' public VersionDetails(string version = default(string), System.DateTime? expiryDate = default(System.DateTime?), string status = default(string)) + { - Version = version; - ExpiryDate = expiryDate; - Status = status; + this.Version = version; + this.ExpiryDate = expiryDate; + this.Status = status; CustomInit(); } @@ -47,25 +47,23 @@ public VersionDetails() /// partial void CustomInit(); + /// /// Gets or sets the agent version. /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; set; } /// /// Gets or sets version expiry date. /// - [JsonProperty(PropertyName = "expiryDate")] - public System.DateTime? ExpiryDate { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "expiryDate")] + public System.DateTime? ExpiryDate {get; set; } /// - /// Gets or sets a value indicating whether security update required. - /// Possible values include: 'Supported', 'NotSupported', 'Deprecated', - /// 'UpdateRequired', 'SecurityUpdateRequired' + /// Gets or sets a value indicating whether security update required. Possible values include: 'Supported', 'NotSupported', 'Deprecated', 'UpdateRequired', 'SecurityUpdateRequired' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VirtualMachineTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VirtualMachineTaskDetails.cs index a9e503768df6..5ae27d6c493c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VirtualMachineTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VirtualMachineTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,15 +24,21 @@ public VirtualMachineTaskDetails() /// /// Initializes a new instance of the VirtualMachineTaskDetails class. /// - /// The job entity. - /// The skipped reason. - /// The skipped reason - /// string. + + /// The job entity. + /// + + /// The skipped reason. + /// + + /// The skipped reason string. + /// public VirtualMachineTaskDetails(JobEntity jobTask = default(JobEntity), string skippedReason = default(string), string skippedReasonString = default(string)) - : base(jobTask) + + : base(jobTask) { - SkippedReason = skippedReason; - SkippedReasonString = skippedReasonString; + this.SkippedReason = skippedReason; + this.SkippedReasonString = skippedReasonString; CustomInit(); } @@ -47,17 +47,17 @@ public VirtualMachineTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets the skipped reason. /// - [JsonProperty(PropertyName = "skippedReason")] - public string SkippedReason { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "skippedReason")] + public string SkippedReason {get; set; } /// /// Gets or sets the skipped reason string. /// - [JsonProperty(PropertyName = "skippedReasonString")] - public string SkippedReasonString { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "skippedReasonString")] + public string SkippedReasonString {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmEncryptionType.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmEncryptionType.cs index 505bf21c9c88..3e07de31a942 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmEncryptionType.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmEncryptionType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,10 +9,12 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for VmEncryptionType. /// + + public static class VmEncryptionType { public const string NotEncrypted = "NotEncrypted"; public const string OnePassEncrypted = "OnePassEncrypted"; public const string TwoPassEncrypted = "TwoPassEncrypted"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmNicUpdatesTaskDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmNicUpdatesTaskDetails.cs index 94ae11aefc68..cf5e374652ba 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmNicUpdatesTaskDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmNicUpdatesTaskDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,14 +24,21 @@ public VmNicUpdatesTaskDetails() /// /// Initializes a new instance of the VmNicUpdatesTaskDetails class. /// - /// Virtual machine Id. - /// Nic Id. - /// Name of the Nic. + + /// Virtual machine Id. + /// + + /// Nic Id. + /// + + /// Name of the Nic. + /// public VmNicUpdatesTaskDetails(string vmId = default(string), string nicId = default(string), string name = default(string)) + { - VmId = vmId; - NicId = nicId; - Name = name; + this.VMId = vmId; + this.NicId = nicId; + this.Name = name; CustomInit(); } @@ -46,23 +47,23 @@ public VmNicUpdatesTaskDetails() /// partial void CustomInit(); + /// /// Gets or sets virtual machine Id. /// - [JsonProperty(PropertyName = "vmId")] - public string VmId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmId")] + public string VMId {get; set; } /// /// Gets or sets nic Id. /// - [JsonProperty(PropertyName = "nicId")] - public string NicId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nicId")] + public string NicId {get; set; } /// /// Gets or sets name of the Nic. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmReplicationProgressHealth.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmReplicationProgressHealth.cs index 1f6b319aeb50..d6c85f24ca06 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmReplicationProgressHealth.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmReplicationProgressHealth.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// Defines values for VmReplicationProgressHealth. /// + + public static class VmReplicationProgressHealth { public const string None = "None"; @@ -21,4 +18,4 @@ public static class VmReplicationProgressHealth public const string SlowProgress = "SlowProgress"; public const string NoProgress = "NoProgress"; } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmDetails.cs index 2de94d90f710..73ae19a512b3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -34,4 +28,4 @@ public VmmDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureCreateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureCreateNetworkMappingInput.cs index 54f1a2a4af6a..19942e736870 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureCreateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureCreateNetworkMappingInput.cs @@ -1,28 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Create network mappings input properties/behavior specific to Vmm to - /// Azure Network mapping. + /// Create network mappings input properties/behavior specific to Vmm to Azure + /// Network mapping. /// [Newtonsoft.Json.JsonObject("VmmToAzure")] public partial class VmmToAzureCreateNetworkMappingInput : FabricSpecificCreateNetworkMappingInput { /// - /// Initializes a new instance of the - /// VmmToAzureCreateNetworkMappingInput class. + /// Initializes a new instance of the VmmToAzureCreateNetworkMappingInput class. /// public VmmToAzureCreateNetworkMappingInput() { @@ -36,4 +29,4 @@ public VmmToAzureCreateNetworkMappingInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureNetworkMappingSettings.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureNetworkMappingSettings.cs index 814af85eb8f2..53b948b42709 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureNetworkMappingSettings.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureNetworkMappingSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VmmToAzureNetworkMappingSettings : NetworkMappingFabricSpecificSettings { /// - /// Initializes a new instance of the VmmToAzureNetworkMappingSettings - /// class. + /// Initializes a new instance of the VmmToAzureNetworkMappingSettings class. /// public VmmToAzureNetworkMappingSettings() { @@ -35,4 +28,4 @@ public VmmToAzureNetworkMappingSettings() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureUpdateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureUpdateNetworkMappingInput.cs index bc5d3229bc24..3b28f8a13e0b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureUpdateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToAzureUpdateNetworkMappingInput.cs @@ -1,28 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Update network mappings input properties/behavior specific to vmm to - /// azure. + /// Update network mappings input properties/behavior specific to vmm to azure. /// [Newtonsoft.Json.JsonObject("VmmToAzure")] public partial class VmmToAzureUpdateNetworkMappingInput : FabricSpecificUpdateNetworkMappingInput { /// - /// Initializes a new instance of the - /// VmmToAzureUpdateNetworkMappingInput class. + /// Initializes a new instance of the VmmToAzureUpdateNetworkMappingInput class. /// public VmmToAzureUpdateNetworkMappingInput() { @@ -36,4 +28,4 @@ public VmmToAzureUpdateNetworkMappingInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmCreateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmCreateNetworkMappingInput.cs index 848c1618254c..a38121b37444 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmCreateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmCreateNetworkMappingInput.cs @@ -1,28 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Create network mappings input properties/behavior specific to vmm to - /// vmm Network mapping. + /// Create network mappings input properties/behavior specific to vmm to vmm + /// Network mapping. /// [Newtonsoft.Json.JsonObject("VmmToVmm")] public partial class VmmToVmmCreateNetworkMappingInput : FabricSpecificCreateNetworkMappingInput { /// - /// Initializes a new instance of the VmmToVmmCreateNetworkMappingInput - /// class. + /// Initializes a new instance of the VmmToVmmCreateNetworkMappingInput class. /// public VmmToVmmCreateNetworkMappingInput() { @@ -36,4 +29,4 @@ public VmmToVmmCreateNetworkMappingInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmNetworkMappingSettings.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmNetworkMappingSettings.cs index aff9a1054d7a..d03a11d55e6e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmNetworkMappingSettings.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmNetworkMappingSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models public partial class VmmToVmmNetworkMappingSettings : NetworkMappingFabricSpecificSettings { /// - /// Initializes a new instance of the VmmToVmmNetworkMappingSettings - /// class. + /// Initializes a new instance of the VmmToVmmNetworkMappingSettings class. /// public VmmToVmmNetworkMappingSettings() { @@ -35,4 +28,4 @@ public VmmToVmmNetworkMappingSettings() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmUpdateNetworkMappingInput.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmUpdateNetworkMappingInput.cs index f82bd6026cfd..6030f0066fe9 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmUpdateNetworkMappingInput.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmToVmmUpdateNetworkMappingInput.cs @@ -1,28 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Update network mappings input properties/behavior specific to vmm to - /// vmm. + /// Update network mappings input properties/behavior specific to vmm to vmm. /// [Newtonsoft.Json.JsonObject("VmmToVmm")] public partial class VmmToVmmUpdateNetworkMappingInput : FabricSpecificUpdateNetworkMappingInput { /// - /// Initializes a new instance of the VmmToVmmUpdateNetworkMappingInput - /// class. + /// Initializes a new instance of the VmmToVmmUpdateNetworkMappingInput class. /// public VmmToVmmUpdateNetworkMappingInput() { @@ -36,4 +28,4 @@ public VmmToVmmUpdateNetworkMappingInput() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmVirtualMachineDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmVirtualMachineDetails.cs index c5409a9ffe2a..d95e9a22b1a8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmVirtualMachineDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmmVirtualMachineDetails.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -32,27 +24,36 @@ public VmmVirtualMachineDetails() /// /// Initializes a new instance of the VmmVirtualMachineDetails class. /// - /// The source id of the object. - /// The id of the object in fabric. - /// The Last replication time. - /// The Last successful failover - /// time. - /// A value indicating whether the VM has - /// a physical disk attached. String value of - /// SrsDataContract.PresenceStatus enum. Possible values include: - /// 'Unknown', 'Present', 'NotPresent' - /// A value indicating whether the - /// VM has a fibre channel adapter attached. String value of - /// SrsDataContract.PresenceStatus enum. Possible values include: - /// 'Unknown', 'Present', 'NotPresent' - /// A value indicating whether the VM has a - /// shared VHD attached. String value of SrsDataContract.PresenceStatus - /// enum. Possible values include: 'Unknown', 'Present', - /// 'NotPresent' - /// The Id of the hyper-v host in - /// fabric. - public VmmVirtualMachineDetails(string sourceItemId = default(string), string generation = default(string), OSDetails osDetails = default(OSDetails), IList diskDetails = default(IList), string hasPhysicalDisk = default(string), string hasFibreChannelAdapter = default(string), string hasSharedVhd = default(string), string hyperVHostId = default(string)) - : base(sourceItemId, generation, osDetails, diskDetails, hasPhysicalDisk, hasFibreChannelAdapter, hasSharedVhd, hyperVHostId) + + /// The source id of the object. + /// + + /// The id of the object in fabric. + /// + + /// The Last replication time. + /// + + /// The Last successful failover time. + /// + + /// A value indicating whether the VM has a physical disk attached. String + /// value of SrsDataContract.PresenceStatus enum. + /// Possible values include: 'Unknown', 'Present', 'NotPresent' + + /// A value indicating whether the VM has a fibre channel adapter attached. + /// String value of SrsDataContract.PresenceStatus enum. + /// Possible values include: 'Unknown', 'Present', 'NotPresent' + + /// A value indicating whether the VM has a shared VHD attached. String value + /// of SrsDataContract.PresenceStatus enum. + /// Possible values include: 'Unknown', 'Present', 'NotPresent' + + /// The Id of the hyper-v host in fabric. + /// + public VmmVirtualMachineDetails(string sourceItemId = default(string), string generation = default(string), OSDetails osDetails = default(OSDetails), System.Collections.Generic.IList diskDetails = default(System.Collections.Generic.IList), string hasPhysicalDisk = default(string), string hasFibreChannelAdapter = default(string), string hasSharedVhd = default(string), string hyperVHostId = default(string)) + + : base(sourceItemId, generation, osDetails, diskDetails, hasPhysicalDisk, hasFibreChannelAdapter, hasSharedVhd, hyperVHostId) { CustomInit(); } @@ -63,4 +64,4 @@ public VmmVirtualMachineDetails() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmwareCbtPolicyDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmwareCbtPolicyDetails.cs index bc06e3616e00..5d7b70f8a02b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmwareCbtPolicyDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Models/VmwareCbtPolicyDetails.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -30,17 +24,21 @@ public VmwareCbtPolicyDetails() /// /// Initializes a new instance of the VmwareCbtPolicyDetails class. /// - /// The duration in minutes - /// until which the recovery points need to be stored. - /// The app consistent - /// snapshot frequency in minutes. - /// The crash - /// consistent snapshot frequency in minutes. + + /// The duration in minutes until which the recovery points need to be stored. + /// + + /// The app consistent snapshot frequency in minutes. + /// + + /// The crash consistent snapshot frequency in minutes. + /// public VmwareCbtPolicyDetails(int? recoveryPointHistoryInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?), int? crashConsistentFrequencyInMinutes = default(int?)) + { - RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; - AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + this.RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + this.AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + this.CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; CustomInit(); } @@ -49,24 +47,24 @@ public VmwareCbtPolicyDetails() /// partial void CustomInit(); + /// - /// Gets or sets the duration in minutes until which the recovery - /// points need to be stored. + /// Gets or sets the duration in minutes until which the recovery points need + /// to be stored. /// - [JsonProperty(PropertyName = "recoveryPointHistoryInMinutes")] - public int? RecoveryPointHistoryInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "recoveryPointHistoryInMinutes")] + public int? RecoveryPointHistoryInMinutes {get; set; } /// /// Gets or sets the app consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] - public int? AppConsistentFrequencyInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes {get; set; } /// /// Gets or sets the crash consistent snapshot frequency in minutes. /// - [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] - public int? CrashConsistentFrequencyInMinutes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes {get; set; } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Operations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Operations.cs index 15fda7bee3e2..54a05ed033f8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Operations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/Operations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// Operations operations. /// - internal partial class Operations : IServiceOperations, IOperations + internal partial class Operations : Microsoft.Rest.IServiceOperations, IOperations { /// /// Initializes a new instance of the Operations class. @@ -36,13 +24,13 @@ internal partial class Operations : IServiceOperations /// Thrown when a required parameter is null /// - internal Operations(SiteRecoveryManagementClient client) + internal Operations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,24 +39,21 @@ internal Operations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Returns the list of available operations. - /// - /// /// Operation to return the list of available operations. - /// + /// /// /// 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 /// /// @@ -77,64 +62,74 @@ internal Operations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.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("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -146,55 +141,56 @@ internal Operations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -204,9 +200,10 @@ internal Operations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -217,31 +214,32 @@ internal Operations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Returns the list of available operations. - /// - /// /// Operation to return the list of available operations. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -251,13 +249,13 @@ internal Operations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -266,51 +264,54 @@ internal Operations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -322,55 +323,56 @@ internal Operations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -380,9 +382,10 @@ internal Operations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -393,24 +396,28 @@ internal Operations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/OperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/OperationsExtensions.cs index 9cb8c06c7d40..993fb69eff25 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/OperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/OperationsExtensions.cs @@ -1,99 +1,76 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for Operations. + /// Extension methods for Operations /// public static partial class OperationsExtensions { - /// - /// Returns the list of available operations. - /// - /// - /// Operation to return the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } + /// + /// Operation to return the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IOperations operations) + { + return ((IOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Returns the list of available operations. - /// - /// - /// Operation to return the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Operation to return the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Operation to return the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IOperations operations, string nextPageLink) + { + return ((IOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Returns the list of available operations. - /// - /// - /// Operation to return the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IOperations operations, string nextPageLink) + /// + /// Operation to return the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Returns the list of available operations. - /// - /// - /// Operation to return the list of available operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/RecoveryPointsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/RecoveryPointsOperations.cs index 000abc04b7fe..9f64453797c5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/RecoveryPointsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/RecoveryPointsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// RecoveryPointsOperations operations. /// - internal partial class RecoveryPointsOperations : IServiceOperations, IRecoveryPointsOperations + internal partial class RecoveryPointsOperations : Microsoft.Rest.IServiceOperations, IRecoveryPointsOperations { /// /// Initializes a new instance of the RecoveryPointsOperations class. @@ -36,13 +24,13 @@ internal partial class RecoveryPointsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal RecoveryPointsOperations(SiteRecoveryManagementClient client) + internal RecoveryPointsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of recovery points for a replication protected item. - /// - /// /// Lists the available recovery points for a replication protected item. - /// + /// /// /// The fabric name. /// @@ -71,13 +56,13 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -86,87 +71,101 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItems", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItems", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -178,55 +177,56 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -236,9 +236,10 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -249,31 +250,32 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a recovery point. - /// - /// /// Get the details of specified recovery point. - /// + /// /// /// The fabric name. /// @@ -292,13 +294,13 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -307,93 +309,108 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + if (recoveryPointName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPointName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); tracingParameters.Add("recoveryPointName", recoveryPointName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints/{recoveryPointName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); _url = _url.Replace("{recoveryPointName}", System.Uri.EscapeDataString(recoveryPointName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -405,55 +422,56 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -463,9 +481,10 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -476,31 +495,32 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of recovery points for a replication protected item. - /// - /// /// Lists the available recovery points for a replication protected item. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -510,13 +530,13 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -525,51 +545,54 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItemsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItemsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -581,55 +604,56 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -639,9 +663,10 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -652,24 +677,28 @@ internal RecoveryPointsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs index 6a8979683dfc..f21cdb0af20a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/RecoveryPointsOperationsExtensions.cs @@ -1,175 +1,145 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for RecoveryPointsOperations. + /// Extension methods for RecoveryPointsOperations /// public static partial class RecoveryPointsOperationsExtensions { - /// - /// Gets the list of recovery points for a replication protected item. - /// - /// - /// Lists the available recovery points for a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fabric name. - /// - /// - /// The protection container name. - /// - /// - /// The replication protected item name. - /// - public static IPage ListByReplicationProtectedItems(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - return operations.ListByReplicationProtectedItemsAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of recovery points for a replication protected item. - /// - /// - /// Lists the available recovery points for a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fabric name. - /// - /// - /// The protection container name. - /// - /// - /// The replication protected item name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectedItemsAsync(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectedItemsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectedItems(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return ((IRecoveryPointsOperations)operations).ListByReplicationProtectedItemsAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } - /// - /// Gets a recovery point. - /// - /// - /// Get the details of specified recovery point. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fabric name. - /// - /// - /// The protection container name. - /// - /// - /// The replication protected item name. - /// - /// - /// The recovery point name. - /// - public static RecoveryPoint Get(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName) + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectedItemsAsync(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectedItemsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Get the details of specified recovery point. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item name. + /// + /// + /// The recovery point name. + /// + public static RecoveryPoint Get(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName) + { + return ((IRecoveryPointsOperations)operations).GetAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName).GetAwaiter().GetResult(); + } - /// - /// Gets a recovery point. - /// - /// - /// Get the details of specified recovery point. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The fabric name. - /// - /// - /// The protection container name. - /// - /// - /// The replication protected item name. - /// - /// - /// The recovery point name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Get the details of specified recovery point. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item name. + /// + /// + /// The recovery point name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectedItemsNext(this IRecoveryPointsOperations operations, string nextPageLink) + { + return ((IRecoveryPointsOperations)operations).ListByReplicationProtectedItemsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of recovery points for a replication protected item. - /// - /// - /// Lists the available recovery points for a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationProtectedItemsNext(this IRecoveryPointsOperations operations, string nextPageLink) + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectedItemsNextAsync(this IRecoveryPointsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectedItemsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationProtectedItemsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of recovery points for a replication protected item. - /// - /// - /// Lists the available recovery points for a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectedItemsNextAsync(this IRecoveryPointsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectedItemsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAlertSettingsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAlertSettingsOperations.cs index 99f0993bacf5..1266e1c64f29 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAlertSettingsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAlertSettingsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationAlertSettingsOperations operations. /// - internal partial class ReplicationAlertSettingsOperations : IServiceOperations, IReplicationAlertSettingsOperations + internal partial class ReplicationAlertSettingsOperations : Microsoft.Rest.IServiceOperations, IReplicationAlertSettingsOperations { /// /// Initializes a new instance of the ReplicationAlertSettingsOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationAlertSettingsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) + internal ReplicationAlertSettingsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,24 +39,21 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of configured email notification(alert) configurations. - /// - /// /// Gets the list of email notification(alert) configurations for the 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 /// /// @@ -77,69 +62,80 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -151,55 +147,56 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -209,9 +206,10 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -222,31 +220,32 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets an email notification(alert) configuration. - /// - /// /// Gets the details of the specified email notification(alert) configuration. - /// + /// /// /// The name of the email notification configuration. /// @@ -256,13 +255,13 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -271,75 +270,87 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string alertSettingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string alertSettingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (alertSettingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "alertSettingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "alertSettingName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("alertSettingName", alertSettingName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{alertSettingName}", System.Uri.EscapeDataString(alertSettingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -351,55 +362,56 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -409,9 +421,10 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -422,31 +435,32 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Configures email notifications for this vault. - /// - /// /// Create or update an email notification(alert) configuration. - /// + /// /// /// The name of the email notification(alert) configuration. /// @@ -459,13 +473,13 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -474,81 +488,93 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateWithHttpMessagesAsync(string alertSettingName, ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string alertSettingName, ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (alertSettingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "alertSettingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "alertSettingName"); } + ConfigureAlertRequest request = new ConfigureAlertRequest(); - if (properties != null) + if(properties != null) { request.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("alertSettingName", alertSettingName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{alertSettingName}", System.Uri.EscapeDataString(alertSettingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -560,61 +586,62 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(request != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(request, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -624,9 +651,10 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -637,31 +665,32 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of configured email notification(alert) configurations. - /// - /// /// Gets the list of email notification(alert) configurations for the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -671,13 +700,13 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -686,51 +715,54 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -742,55 +774,56 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -800,9 +833,10 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -813,24 +847,28 @@ internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAlertSettingsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAlertSettingsOperationsExtensions.cs index 7de4284bfd0b..f5133aad3f4a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAlertSettingsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAlertSettingsOperationsExtensions.cs @@ -1,185 +1,142 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationAlertSettingsOperations. + /// Extension methods for ReplicationAlertSettingsOperations /// public static partial class ReplicationAlertSettingsOperationsExtensions { - /// - /// Gets the list of configured email notification(alert) configurations. - /// - /// - /// Gets the list of email notification(alert) configurations for the vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationAlertSettingsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } + /// + /// Gets the list of email notification(alert) configurations for the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationAlertSettingsOperations operations) + { + return ((IReplicationAlertSettingsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Gets the list of configured email notification(alert) configurations. - /// - /// - /// Gets the list of email notification(alert) configurations for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationAlertSettingsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the list of email notification(alert) configurations for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationAlertSettingsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the details of the specified email notification(alert) configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the email notification configuration. + /// + public static Alert Get(this IReplicationAlertSettingsOperations operations, string alertSettingName) + { + return ((IReplicationAlertSettingsOperations)operations).GetAsync(alertSettingName).GetAwaiter().GetResult(); + } - /// - /// Gets an email notification(alert) configuration. - /// - /// - /// Gets the details of the specified email notification(alert) configuration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the email notification configuration. - /// - public static Alert Get(this IReplicationAlertSettingsOperations operations, string alertSettingName) + /// + /// Gets the details of the specified email notification(alert) configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the email notification configuration. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationAlertSettingsOperations operations, string alertSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(alertSettingName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(alertSettingName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Create or update an email notification(alert) configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the email notification(alert) configuration. + /// + public static Alert Create(this IReplicationAlertSettingsOperations operations, string alertSettingName, ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties)) + { + return ((IReplicationAlertSettingsOperations)operations).CreateAsync(alertSettingName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets an email notification(alert) configuration. - /// - /// - /// Gets the details of the specified email notification(alert) configuration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the email notification configuration. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationAlertSettingsOperations operations, string alertSettingName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Create or update an email notification(alert) configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the email notification(alert) configuration. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationAlertSettingsOperations operations, string alertSettingName, ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(alertSettingName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(alertSettingName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the list of email notification(alert) configurations for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationAlertSettingsOperations operations, string nextPageLink) + { + return ((IReplicationAlertSettingsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Configures email notifications for this vault. - /// - /// - /// Create or update an email notification(alert) configuration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the email notification(alert) configuration. - /// - /// - /// The properties of a configure alert request. - /// - public static Alert Create(this IReplicationAlertSettingsOperations operations, string alertSettingName, ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties)) + /// + /// Gets the list of email notification(alert) configurations for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationAlertSettingsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.CreateAsync(alertSettingName, properties).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Configures email notifications for this vault. - /// - /// - /// Create or update an email notification(alert) configuration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the email notification(alert) configuration. - /// - /// - /// The properties of a configure alert request. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationAlertSettingsOperations operations, string alertSettingName, ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(alertSettingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of configured email notification(alert) configurations. - /// - /// - /// Gets the list of email notification(alert) configurations for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationAlertSettingsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of configured email notification(alert) configurations. - /// - /// - /// Gets the list of email notification(alert) configurations for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationAlertSettingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAppliancesOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAppliancesOperations.cs index c7f45913ff5b..f241fd13f43b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAppliancesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAppliancesOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationAppliancesOperations operations. /// - internal partial class ReplicationAppliancesOperations : IServiceOperations, IReplicationAppliancesOperations + internal partial class ReplicationAppliancesOperations : Microsoft.Rest.IServiceOperations, IReplicationAppliancesOperations { /// /// Initializes a new instance of the ReplicationAppliancesOperations class. @@ -37,13 +24,13 @@ internal partial class ReplicationAppliancesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) + internal ReplicationAppliancesOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,13 +39,10 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of appliances. - /// - /// /// Gets the list of Azure Site Recovery appliances for the vault. - /// + /// /// - /// OData parameters to apply to the operation. + /// /// /// /// Headers that will be added to request. @@ -66,13 +50,13 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -81,78 +65,90 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAppliances").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _applianceQueryParameter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_applianceQueryParameter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_applianceQueryParameter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -164,55 +160,56 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -222,9 +219,10 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -235,31 +233,32 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of appliances. - /// - /// /// Gets the list of Azure Site Recovery appliances for the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -269,13 +268,13 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -284,51 +283,54 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -340,55 +342,56 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -398,9 +401,10 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -411,24 +415,28 @@ internal ReplicationAppliancesOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAppliancesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAppliancesOperationsExtensions.cs index a5003776f35c..ab7d6a98ce04 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAppliancesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationAppliancesOperationsExtensions.cs @@ -1,106 +1,82 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationAppliancesOperations. + /// Extension methods for ReplicationAppliancesOperations /// public static partial class ReplicationAppliancesOperationsExtensions { - /// - /// Gets the list of appliances. - /// - /// - /// Gets the list of Azure Site Recovery appliances for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IReplicationAppliancesOperations operations, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(odataQuery).GetAwaiter().GetResult(); - } + /// + /// Gets the list of Azure Site Recovery appliances for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationAppliancesOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IReplicationAppliancesOperations)operations).ListAsync(odataQuery).GetAwaiter().GetResult(); + } - /// - /// Gets the list of appliances. - /// - /// - /// Gets the list of Azure Site Recovery appliances for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationAppliancesOperations operations, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the list of Azure Site Recovery appliances for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationAppliancesOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the list of Azure Site Recovery appliances for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationAppliancesOperations operations, string nextPageLink) + { + return ((IReplicationAppliancesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of appliances. - /// - /// - /// Gets the list of Azure Site Recovery appliances for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationAppliancesOperations operations, string nextPageLink) + /// + /// Gets the list of Azure Site Recovery appliances for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationAppliancesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of appliances. - /// - /// - /// Gets the list of Azure Site Recovery appliances for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationAppliancesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEligibilityResultsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEligibilityResultsOperations.cs index 18cae8d5ab1a..5f3e1681bba3 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEligibilityResultsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEligibilityResultsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationEligibilityResultsOperations operations. /// - internal partial class ReplicationEligibilityResultsOperations : IServiceOperations, IReplicationEligibilityResultsOperations + internal partial class ReplicationEligibilityResultsOperations : Microsoft.Rest.IServiceOperations, IReplicationEligibilityResultsOperations { /// /// Initializes a new instance of the ReplicationEligibilityResultsOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationEligibilityResultsOperations : IServiceOperati /// /// Thrown when a required parameter is null /// - internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient client) + internal ReplicationEligibilityResultsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,12 +39,8 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the validation errors in case the VM is unsuitable for protection. + /// Validates whether a given VM can be protected or not in which case returns list of errors. /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// /// /// Virtual Machine name. /// @@ -66,13 +50,13 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl /// /// 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 /// /// @@ -81,70 +65,81 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl /// /// A response object containing the response body and response headers. /// - public async Task> ListWithHttpMessagesAsync(string virtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string virtualMachineName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (virtualMachineName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "virtualMachineName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "virtualMachineName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("virtualMachineName", virtualMachineName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{virtualMachineName}", System.Uri.EscapeDataString(virtualMachineName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -156,55 +151,56 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -214,9 +210,10 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -227,32 +224,32 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the validation errors in case the VM is unsuitable for protection. + /// Validates whether a given VM can be protected or not in which case returns list of errors. /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// /// /// Virtual Machine name. /// @@ -262,13 +259,13 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl /// /// 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 /// /// @@ -277,70 +274,81 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string virtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string virtualMachineName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (virtualMachineName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "virtualMachineName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "virtualMachineName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("virtualMachineName", virtualMachineName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{virtualMachineName}", System.Uri.EscapeDataString(virtualMachineName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -352,55 +360,56 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -410,9 +419,10 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -423,24 +433,28 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEligibilityResultsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEligibilityResultsOperationsExtensions.cs index 5eecf2b118fb..f2de9786b120 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEligibilityResultsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEligibilityResultsOperationsExtensions.cs @@ -1,109 +1,82 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationEligibilityResultsOperations. + /// Extension methods for ReplicationEligibilityResultsOperations /// public static partial class ReplicationEligibilityResultsOperationsExtensions { - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Virtual Machine name. - /// - public static ReplicationEligibilityResultsCollection List(this IReplicationEligibilityResultsOperations operations, string virtualMachineName) - { - return operations.ListAsync(virtualMachineName).GetAwaiter().GetResult(); - } + /// + /// Validates whether a given VM can be protected or not in which case returns list of errors. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Virtual Machine name. + /// + public static ReplicationEligibilityResultsCollection List(this IReplicationEligibilityResultsOperations operations, string virtualMachineName) + { + return ((IReplicationEligibilityResultsOperations)operations).ListAsync(virtualMachineName).GetAwaiter().GetResult(); + } - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Virtual Machine name. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this IReplicationEligibilityResultsOperations operations, string virtualMachineName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Validates whether a given VM can be protected or not in which case returns list of errors. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Virtual Machine name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListAsync(this IReplicationEligibilityResultsOperations operations, string virtualMachineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(virtualMachineName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(virtualMachineName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Validates whether a given VM can be protected or not in which case returns list of errors. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Virtual Machine name. + /// + public static ReplicationEligibilityResults Get(this IReplicationEligibilityResultsOperations operations, string virtualMachineName) + { + return ((IReplicationEligibilityResultsOperations)operations).GetAsync(virtualMachineName).GetAwaiter().GetResult(); + } - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Virtual Machine name. - /// - public static ReplicationEligibilityResults Get(this IReplicationEligibilityResultsOperations operations, string virtualMachineName) + /// + /// Validates whether a given VM can be protected or not in which case returns list of errors. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Virtual Machine name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationEligibilityResultsOperations operations, string virtualMachineName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(virtualMachineName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(virtualMachineName).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Virtual Machine name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationEligibilityResultsOperations operations, string virtualMachineName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(virtualMachineName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEventsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEventsOperations.cs index 38f89393be3d..9d35b36082b6 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEventsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEventsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationEventsOperations operations. /// - internal partial class ReplicationEventsOperations : IServiceOperations, IReplicationEventsOperations + internal partial class ReplicationEventsOperations : Microsoft.Rest.IServiceOperations, IReplicationEventsOperations { /// /// Initializes a new instance of the ReplicationEventsOperations class. @@ -37,13 +24,13 @@ internal partial class ReplicationEventsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationEventsOperations(SiteRecoveryManagementClient client) + internal ReplicationEventsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,13 +39,10 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of Azure Site Recovery events. - /// - /// /// Gets the list of Azure Site Recovery events for the vault. - /// + /// /// - /// OData parameters to apply to the operation. + /// /// /// /// Headers that will be added to request. @@ -66,13 +50,13 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -81,78 +65,90 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _eventQueryParameter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_eventQueryParameter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_eventQueryParameter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -164,55 +160,56 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -222,9 +219,10 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -235,31 +233,32 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Get the details of an Azure Site recovery event. - /// - /// /// The operation to get the details of an Azure Site recovery event. - /// + /// /// /// The name of the Azure Site Recovery event. /// @@ -269,13 +268,13 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -284,75 +283,87 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string eventName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string eventName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (eventName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "eventName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "eventName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("eventName", eventName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents/{eventName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{eventName}", System.Uri.EscapeDataString(eventName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -364,55 +375,56 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -422,9 +434,10 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -435,31 +448,32 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of Azure Site Recovery events. - /// - /// /// Gets the list of Azure Site Recovery events for the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -469,13 +483,13 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -484,51 +498,54 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -540,55 +557,56 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -598,9 +616,10 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -611,24 +630,28 @@ internal ReplicationEventsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEventsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEventsOperationsExtensions.cs index 447315f1f72f..42dd89f5b123 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEventsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationEventsOperationsExtensions.cs @@ -1,146 +1,115 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationEventsOperations. + /// Extension methods for ReplicationEventsOperations /// public static partial class ReplicationEventsOperationsExtensions { - /// - /// Gets the list of Azure Site Recovery events. - /// - /// - /// Gets the list of Azure Site Recovery events for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IReplicationEventsOperations operations, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of Azure Site Recovery events. - /// - /// - /// Gets the list of Azure Site Recovery events for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationEventsOperations operations, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationEventsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IReplicationEventsOperations)operations).ListAsync(odataQuery).GetAwaiter().GetResult(); + } - /// - /// Get the details of an Azure Site recovery event. - /// - /// - /// The operation to get the details of an Azure Site recovery event. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the Azure Site Recovery event. - /// - public static EventModel Get(this IReplicationEventsOperations operations, string eventName) + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationEventsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(eventName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to get the details of an Azure Site recovery event. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the Azure Site Recovery event. + /// + public static EventModel Get(this IReplicationEventsOperations operations, string eventName) + { + return ((IReplicationEventsOperations)operations).GetAsync(eventName).GetAwaiter().GetResult(); + } - /// - /// Get the details of an Azure Site recovery event. - /// - /// - /// The operation to get the details of an Azure Site recovery event. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the Azure Site Recovery event. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationEventsOperations operations, string eventName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to get the details of an Azure Site recovery event. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the Azure Site Recovery event. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationEventsOperations operations, string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(eventName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(eventName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationEventsOperations operations, string nextPageLink) + { + return ((IReplicationEventsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of Azure Site Recovery events. - /// - /// - /// Gets the list of Azure Site Recovery events for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationEventsOperations operations, string nextPageLink) + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationEventsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of Azure Site Recovery events. - /// - /// - /// Gets the list of Azure Site Recovery events for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationEventsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationFabricsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationFabricsOperations.cs index abf24a843848..4b8ebb67b3bf 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationFabricsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationFabricsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationFabricsOperations operations. /// - internal partial class ReplicationFabricsOperations : IServiceOperations, IReplicationFabricsOperations + internal partial class ReplicationFabricsOperations : Microsoft.Rest.IServiceOperations, IReplicationFabricsOperations { /// /// Initializes a new instance of the ReplicationFabricsOperations class. @@ -37,13 +24,13 @@ internal partial class ReplicationFabricsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) + internal ReplicationFabricsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,24 +39,21 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of ASR fabrics. - /// - /// /// Gets a list of the Azure Site Recovery fabrics in the 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 /// /// @@ -78,69 +62,80 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -152,55 +147,56 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -210,9 +206,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -223,50 +220,51 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the details of an ASR fabric. - /// - /// /// Gets the details of an Azure Site Recovery fabric. - /// + /// + /// + /// + /// /// /// Fabric name. /// - /// - /// OData parameters to apply to the operation. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -275,84 +273,97 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _fabricQueryParameter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_fabricQueryParameter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_fabricQueryParameter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -364,55 +375,56 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -422,9 +434,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -435,32 +448,32 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates an Azure Site Recovery fabric. + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). /// - /// - /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V - /// site). - /// /// /// Name of the ASR fabric. /// @@ -468,91 +481,78 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// Fabric creation input. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Purges the site. - /// - /// /// The operation to purge(force delete) an Azure Site Recovery fabric. - /// + /// /// /// ASR fabric to purge. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task PurgeWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task PurgeWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Checks the consistency of the ASR fabric. - /// - /// /// The operation to perform a consistency check on the fabric. - /// + /// /// /// Fabric name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CheckConsistencyWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CheckConsistencyWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginCheckConsistencyWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCheckConsistencyWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Migrates the site to AAD. - /// - /// /// The operation to migrate an Azure Site Recovery fabric to AAD. - /// + /// /// /// ASR fabric to migrate. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task MigrateToAadWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task MigrateToAadWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginMigrateToAadWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginMigrateToAadWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Perform failover of the process server. + /// The operation to move replications from a process server to another process server. /// - /// - /// The operation to move replications from a process server to another process - /// server. - /// /// /// The name of the fabric containing the process server. /// @@ -560,46 +560,40 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// The properties of the PS Failover request. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginReassociateGatewayWithHttpMessagesAsync(fabricName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginReassociateGatewayWithHttpMessagesAsync(fabricName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Deletes the site. - /// - /// /// The operation to delete or remove an Azure Site Recovery fabric. - /// + /// /// /// ASR fabric to delete. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Renews certificate for the fabric. - /// - /// /// Renews the connection certificate for the ASR replication fabric. - /// + /// /// /// fabric name to renew certs for. /// @@ -607,25 +601,21 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// Renew certificate input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> RenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginRenewCertificateWithHttpMessagesAsync(fabricName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRenewCertificateWithHttpMessagesAsync(fabricName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Creates an Azure Site Recovery fabric. + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). /// - /// - /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V - /// site). - /// /// /// Name of the ASR fabric. /// @@ -638,13 +628,13 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -653,81 +643,93 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + FabricCreationInput input = new FabricCreationInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -739,61 +741,62 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -803,9 +806,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -816,31 +820,32 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Purges the site. - /// - /// /// The operation to purge(force delete) an Azure Site Recovery fabric. - /// + /// /// /// ASR fabric to purge. /// @@ -850,10 +855,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -862,75 +867,87 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginPurgeWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginPurgeWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -942,55 +959,56 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1000,26 +1018,28 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Checks the consistency of the ASR fabric. - /// - /// /// The operation to perform a consistency check on the fabric. - /// + /// /// /// Fabric name. /// @@ -1029,13 +1049,13 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1044,75 +1064,87 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCheckConsistencyWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCheckConsistencyWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCheckConsistency", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCheckConsistency", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1124,55 +1156,56 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1182,9 +1215,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1195,31 +1229,32 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Migrates the site to AAD. - /// - /// /// The operation to migrate an Azure Site Recovery fabric to AAD. - /// + /// /// /// ASR fabric to migrate. /// @@ -1229,10 +1264,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1241,75 +1276,87 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginMigrateToAadWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginMigrateToAadWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateToAad", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateToAad", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1321,55 +1368,56 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1379,27 +1427,28 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Perform failover of the process server. + /// The operation to move replications from a process server to another process server. /// - /// - /// The operation to move replications from a process server to another process - /// server. - /// /// /// The name of the fabric containing the process server. /// @@ -1412,13 +1461,13 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1427,81 +1476,93 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + FailoverProcessServerRequest failoverProcessServerRequest = new FailoverProcessServerRequest(); - if (properties != null) + if(properties != null) { failoverProcessServerRequest.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("failoverProcessServerRequest", failoverProcessServerRequest); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginReassociateGateway", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginReassociateGateway", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1513,61 +1574,62 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(failoverProcessServerRequest != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(failoverProcessServerRequest, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(failoverProcessServerRequest, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1577,9 +1639,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1590,31 +1653,32 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes the site. - /// - /// /// The operation to delete or remove an Azure Site Recovery fabric. - /// + /// /// /// ASR fabric to delete. /// @@ -1624,10 +1688,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1636,75 +1700,87 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1716,55 +1792,56 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1774,26 +1851,28 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Renews certificate for the fabric. - /// - /// /// Renews the connection certificate for the ASR replication fabric. - /// + /// /// /// fabric name to renew certs for. /// @@ -1806,13 +1885,13 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1821,81 +1900,93 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginRenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginRenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + RenewCertificateInput renewCertificate = new RenewCertificateInput(); - if (properties != null) + if(properties != null) { renewCertificate.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("renewCertificate", renewCertificate); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRenewCertificate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRenewCertificate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1907,61 +1998,62 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(renewCertificate != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(renewCertificate, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(renewCertificate, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1971,9 +2063,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1984,31 +2077,32 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of ASR fabrics. - /// - /// /// Gets a list of the Azure Site Recovery fabrics in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -2018,13 +2112,13 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -2033,51 +2127,54 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2089,55 +2186,56 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2147,9 +2245,10 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2160,24 +2259,28 @@ internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationFabricsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationFabricsOperationsExtensions.cs index e4d9cf3c4bc7..ae5d50225668 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationFabricsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationFabricsOperationsExtensions.cs @@ -1,732 +1,559 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationFabricsOperations. + /// Extension methods for ReplicationFabricsOperations /// public static partial class ReplicationFabricsOperationsExtensions { - /// - /// Gets the list of ASR fabrics. - /// - /// - /// Gets a list of the Azure Site Recovery fabrics in the vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationFabricsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets the list of ASR fabrics. - /// - /// - /// Gets a list of the Azure Site Recovery fabrics in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationFabricsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of an ASR fabric. - /// - /// - /// Gets the details of an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// OData parameters to apply to the operation. - /// - public static Fabric Get(this IReplicationFabricsOperations operations, string fabricName, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.GetAsync(fabricName, odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of an ASR fabric. - /// - /// - /// Gets the details of an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationFabricsOperations operations, string fabricName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates an Azure Site Recovery fabric. - /// - /// - /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V - /// site). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the ASR fabric. - /// - /// - /// Fabric creation input. - /// - public static Fabric Create(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties)) - { - return operations.CreateAsync(fabricName, properties).GetAwaiter().GetResult(); - } - - /// - /// Creates an Azure Site Recovery fabric. - /// - /// - /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V - /// site). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the ASR fabric. - /// - /// - /// Fabric creation input. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Purges the site. - /// - /// - /// The operation to purge(force delete) an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to purge. - /// - public static void Purge(this IReplicationFabricsOperations operations, string fabricName) - { - operations.PurgeAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Purges the site. - /// - /// - /// The operation to purge(force delete) an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to purge. - /// - /// - /// The cancellation token. - /// - public static async Task PurgeAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.PurgeWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Checks the consistency of the ASR fabric. - /// - /// - /// The operation to perform a consistency check on the fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - public static Fabric CheckConsistency(this IReplicationFabricsOperations operations, string fabricName) - { - return operations.CheckConsistencyAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Checks the consistency of the ASR fabric. - /// - /// - /// The operation to perform a consistency check on the fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// The cancellation token. - /// - public static async Task CheckConsistencyAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckConsistencyWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Migrates the site to AAD. - /// - /// - /// The operation to migrate an Azure Site Recovery fabric to AAD. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to migrate. - /// - public static void MigrateToAad(this IReplicationFabricsOperations operations, string fabricName) - { - operations.MigrateToAadAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Migrates the site to AAD. - /// - /// - /// The operation to migrate an Azure Site Recovery fabric to AAD. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to migrate. - /// - /// - /// The cancellation token. - /// - public static async Task MigrateToAadAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.MigrateToAadWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Perform failover of the process server. - /// - /// - /// The operation to move replications from a process server to another process - /// server. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric containing the process server. - /// - /// - /// The properties of the PS Failover request. - /// - public static Fabric ReassociateGateway(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties)) - { - return operations.ReassociateGatewayAsync(fabricName, properties).GetAwaiter().GetResult(); - } - - /// - /// Perform failover of the process server. - /// - /// - /// The operation to move replications from a process server to another process - /// server. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric containing the process server. - /// - /// - /// The properties of the PS Failover request. - /// - /// - /// The cancellation token. - /// - public static async Task ReassociateGatewayAsync(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ReassociateGatewayWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the site. - /// - /// - /// The operation to delete or remove an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to delete. - /// - public static void Delete(this IReplicationFabricsOperations operations, string fabricName) - { - operations.DeleteAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the site. - /// - /// - /// The operation to delete or remove an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to delete. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Renews certificate for the fabric. - /// - /// - /// Renews the connection certificate for the ASR replication fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// fabric name to renew certs for. - /// - /// - /// Renew certificate input properties. - /// - public static Fabric RenewCertificate(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties)) - { - return operations.RenewCertificateAsync(fabricName, properties).GetAwaiter().GetResult(); - } - - /// - /// Renews certificate for the fabric. - /// - /// - /// Renews the connection certificate for the ASR replication fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// fabric name to renew certs for. - /// - /// - /// Renew certificate input properties. - /// - /// - /// The cancellation token. - /// - public static async Task RenewCertificateAsync(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RenewCertificateWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates an Azure Site Recovery fabric. - /// - /// - /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V - /// site). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the ASR fabric. - /// - /// - /// Fabric creation input. - /// - public static Fabric BeginCreate(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties)) - { - return operations.BeginCreateAsync(fabricName, properties).GetAwaiter().GetResult(); - } - - /// - /// Creates an Azure Site Recovery fabric. - /// - /// - /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V - /// site). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the ASR fabric. - /// - /// - /// Fabric creation input. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Purges the site. - /// - /// - /// The operation to purge(force delete) an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to purge. - /// - public static void BeginPurge(this IReplicationFabricsOperations operations, string fabricName) - { - operations.BeginPurgeAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Purges the site. - /// - /// - /// The operation to purge(force delete) an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to purge. - /// - /// - /// The cancellation token. - /// - public static async Task BeginPurgeAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Checks the consistency of the ASR fabric. - /// - /// - /// The operation to perform a consistency check on the fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - public static Fabric BeginCheckConsistency(this IReplicationFabricsOperations operations, string fabricName) - { - return operations.BeginCheckConsistencyAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Checks the consistency of the ASR fabric. - /// - /// - /// The operation to perform a consistency check on the fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCheckConsistencyAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCheckConsistencyWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Migrates the site to AAD. - /// - /// - /// The operation to migrate an Azure Site Recovery fabric to AAD. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to migrate. - /// - public static void BeginMigrateToAad(this IReplicationFabricsOperations operations, string fabricName) - { - operations.BeginMigrateToAadAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Migrates the site to AAD. - /// - /// - /// The operation to migrate an Azure Site Recovery fabric to AAD. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to migrate. - /// - /// - /// The cancellation token. - /// - public static async Task BeginMigrateToAadAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginMigrateToAadWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Perform failover of the process server. - /// - /// - /// The operation to move replications from a process server to another process - /// server. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric containing the process server. - /// - /// - /// The properties of the PS Failover request. - /// - public static Fabric BeginReassociateGateway(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties)) - { - return operations.BeginReassociateGatewayAsync(fabricName, properties).GetAwaiter().GetResult(); - } - - /// - /// Perform failover of the process server. - /// - /// - /// The operation to move replications from a process server to another process - /// server. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric containing the process server. - /// - /// - /// The properties of the PS Failover request. - /// - /// - /// The cancellation token. - /// - public static async Task BeginReassociateGatewayAsync(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginReassociateGatewayWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the site. - /// - /// - /// The operation to delete or remove an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to delete. - /// - public static void BeginDelete(this IReplicationFabricsOperations operations, string fabricName) - { - operations.BeginDeleteAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the site. - /// - /// - /// The operation to delete or remove an Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// ASR fabric to delete. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Renews certificate for the fabric. - /// - /// - /// Renews the connection certificate for the ASR replication fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// fabric name to renew certs for. - /// - /// - /// Renew certificate input properties. - /// - public static Fabric BeginRenewCertificate(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties)) - { - return operations.BeginRenewCertificateAsync(fabricName, properties).GetAwaiter().GetResult(); - } - - /// - /// Renews certificate for the fabric. - /// - /// - /// Renews the connection certificate for the ASR replication fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// fabric name to renew certs for. - /// - /// - /// Renew certificate input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRenewCertificateAsync(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginRenewCertificateWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of ASR fabrics. - /// - /// - /// Gets a list of the Azure Site Recovery fabrics in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationFabricsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of ASR fabrics. - /// - /// - /// Gets a list of the Azure Site Recovery fabrics in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationFabricsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationFabricsOperations operations) + { + return ((IReplicationFabricsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationFabricsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the details of an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Fabric name. + /// + public static Fabric Get(this IReplicationFabricsOperations operations, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IReplicationFabricsOperations)operations).GetAsync(fabricName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationFabricsOperations operations, string fabricName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the ASR fabric. + /// + public static Fabric Create(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties)) + { + return ((IReplicationFabricsOperations)operations).CreateAsync(fabricName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the ASR fabric. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to purge. + /// + public static void Purge(this IReplicationFabricsOperations operations, string fabricName) + { + ((IReplicationFabricsOperations)operations).PurgeAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to purge. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PurgeAsync(this IReplicationFabricsOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.PurgeWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static Fabric CheckConsistency(this IReplicationFabricsOperations operations, string fabricName) + { + return ((IReplicationFabricsOperations)operations).CheckConsistencyAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CheckConsistencyAsync(this IReplicationFabricsOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CheckConsistencyWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to migrate an Azure Site Recovery fabric to AAD. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to migrate. + /// + public static void MigrateToAad(this IReplicationFabricsOperations operations, string fabricName) + { + ((IReplicationFabricsOperations)operations).MigrateToAadAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// The operation to migrate an Azure Site Recovery fabric to AAD. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to migrate. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task MigrateToAadAsync(this IReplicationFabricsOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.MigrateToAadWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to move replications from a process server to another process server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the process server. + /// + public static Fabric ReassociateGateway(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties)) + { + return ((IReplicationFabricsOperations)operations).ReassociateGatewayAsync(fabricName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to move replications from a process server to another process server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ReassociateGatewayAsync(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ReassociateGatewayWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to delete. + /// + public static void Delete(this IReplicationFabricsOperations operations, string fabricName) + { + ((IReplicationFabricsOperations)operations).DeleteAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to delete. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationFabricsOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// fabric name to renew certs for. + /// + public static Fabric RenewCertificate(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties)) + { + return ((IReplicationFabricsOperations)operations).RenewCertificateAsync(fabricName, properties).GetAwaiter().GetResult(); + } + + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RenewCertificateAsync(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RenewCertificateWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the ASR fabric. + /// + public static Fabric BeginCreate(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties)) + { + return ((IReplicationFabricsOperations)operations).BeginCreateAsync(fabricName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the ASR fabric. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInputProperties properties = default(FabricCreationInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to purge. + /// + public static void BeginPurge(this IReplicationFabricsOperations operations, string fabricName) + { + ((IReplicationFabricsOperations)operations).BeginPurgeAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to purge. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPurgeAsync(this IReplicationFabricsOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static Fabric BeginCheckConsistency(this IReplicationFabricsOperations operations, string fabricName) + { + return ((IReplicationFabricsOperations)operations).BeginCheckConsistencyAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCheckConsistencyAsync(this IReplicationFabricsOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCheckConsistencyWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to migrate an Azure Site Recovery fabric to AAD. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to migrate. + /// + public static void BeginMigrateToAad(this IReplicationFabricsOperations operations, string fabricName) + { + ((IReplicationFabricsOperations)operations).BeginMigrateToAadAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// The operation to migrate an Azure Site Recovery fabric to AAD. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to migrate. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginMigrateToAadAsync(this IReplicationFabricsOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginMigrateToAadWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to move replications from a process server to another process server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the process server. + /// + public static Fabric BeginReassociateGateway(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties)) + { + return ((IReplicationFabricsOperations)operations).BeginReassociateGatewayAsync(fabricName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to move replications from a process server to another process server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginReassociateGatewayAsync(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginReassociateGatewayWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to delete. + /// + public static void BeginDelete(this IReplicationFabricsOperations operations, string fabricName) + { + ((IReplicationFabricsOperations)operations).BeginDeleteAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to delete. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationFabricsOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// fabric name to renew certs for. + /// + public static Fabric BeginRenewCertificate(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties)) + { + return ((IReplicationFabricsOperations)operations).BeginRenewCertificateAsync(fabricName, properties).GetAwaiter().GetResult(); + } + + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRenewCertificateAsync(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInputProperties properties = default(RenewCertificateInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRenewCertificateWithHttpMessagesAsync(fabricName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationFabricsOperations operations, string nextPageLink) + { + return ((IReplicationFabricsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationFabricsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationJobsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationJobsOperations.cs index e6172106ab29..6dba364b8242 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationJobsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationJobsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationJobsOperations operations. /// - internal partial class ReplicationJobsOperations : IServiceOperations, IReplicationJobsOperations + internal partial class ReplicationJobsOperations : Microsoft.Rest.IServiceOperations, IReplicationJobsOperations { /// /// Initializes a new instance of the ReplicationJobsOperations class. @@ -37,13 +24,13 @@ internal partial class ReplicationJobsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationJobsOperations(SiteRecoveryManagementClient client) + internal ReplicationJobsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,13 +39,10 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of jobs. - /// - /// /// Gets the list of Azure Site Recovery Jobs for the vault. - /// + /// /// - /// OData parameters to apply to the operation. + /// /// /// /// Headers that will be added to request. @@ -66,13 +50,13 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -81,78 +65,90 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _jobQueryParameter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_jobQueryParameter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_jobQueryParameter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -164,55 +160,56 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -222,9 +219,10 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -235,31 +233,32 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the job details. - /// - /// /// Get the details of an Azure Site Recovery job. - /// + /// /// /// Job identifier. /// @@ -269,13 +268,13 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -284,75 +283,87 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (jobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "jobName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("jobName", jobName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -364,55 +375,56 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -422,9 +434,10 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -435,75 +448,70 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Cancels the specified job. - /// - /// /// The operation to cancel an Azure Site Recovery job. - /// + /// /// /// Job identifier. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CancelWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CancelWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginCancelWithHttpMessagesAsync(jobName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCancelWithHttpMessagesAsync(jobName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Restarts the specified job. - /// - /// /// The operation to restart an Azure Site Recovery job. - /// + /// /// /// Job identifier. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> RestartWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RestartWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginRestartWithHttpMessagesAsync(jobName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRestartWithHttpMessagesAsync(jobName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Resumes the specified job. - /// - /// /// The operation to resume an Azure Site Recovery job. - /// + /// /// /// Job identifier. /// @@ -511,47 +519,40 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// Resume job properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ResumeWithHttpMessagesAsync(string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ResumeWithHttpMessagesAsync(string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginResumeWithHttpMessagesAsync(jobName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginResumeWithHttpMessagesAsync(jobName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Exports the details of the Azure Site Recovery jobs of the vault. + /// The operation to export the details of the Azure Site Recovery jobs of the vault. /// - /// - /// The operation to export the details of the Azure Site Recovery jobs of the - /// vault. - /// /// /// job query filter. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginExportWithHttpMessagesAsync(jobQueryParameter, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginExportWithHttpMessagesAsync(jobQueryParameter, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Cancels the specified job. - /// - /// /// The operation to cancel an Azure Site Recovery job. - /// + /// /// /// Job identifier. /// @@ -561,13 +562,13 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -576,75 +577,87 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCancelWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCancelWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (jobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "jobName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("jobName", jobName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCancel", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCancel", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/cancel").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -656,55 +669,56 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -714,9 +728,10 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -727,31 +742,32 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Restarts the specified job. - /// - /// /// The operation to restart an Azure Site Recovery job. - /// + /// /// /// Job identifier. /// @@ -761,13 +777,13 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -776,75 +792,87 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginRestartWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginRestartWithHttpMessagesAsync(string jobName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (jobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "jobName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("jobName", jobName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestart", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRestart", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/restart").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -856,55 +884,56 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -914,9 +943,10 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -927,31 +957,32 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Resumes the specified job. - /// - /// /// The operation to resume an Azure Site Recovery job. - /// + /// /// /// Job identifier. /// @@ -964,13 +995,13 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -979,81 +1010,93 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginResumeWithHttpMessagesAsync(string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginResumeWithHttpMessagesAsync(string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (jobName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "jobName"); } + ResumeJobParams resumeJobParams = new ResumeJobParams(); - if (properties != null) + if(properties != null) { resumeJobParams.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("jobName", jobName); + tracingParameters.Add("resumeJobParams", resumeJobParams); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResume", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginResume", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/resume").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1065,61 +1108,62 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(resumeJobParams != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resumeJobParams, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resumeJobParams, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1129,9 +1173,10 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1142,32 +1187,32 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Exports the details of the Azure Site Recovery jobs of the vault. + /// The operation to export the details of the Azure Site Recovery jobs of the vault. /// - /// - /// The operation to export the details of the Azure Site Recovery jobs of the - /// vault. - /// /// /// job query filter. /// @@ -1177,13 +1222,13 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1192,74 +1237,86 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (jobQueryParameter == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "jobQueryParameter"); } - if (Client.ResourceName == null) + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.SubscriptionId == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (jobQueryParameter == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "jobQueryParameter"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("jobQueryParameter", jobQueryParameter); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginExport", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginExport", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/export").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1271,61 +1328,62 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(jobQueryParameter != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(jobQueryParameter, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(jobQueryParameter, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1335,9 +1393,10 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1348,31 +1407,32 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of jobs. - /// - /// /// Gets the list of Azure Site Recovery Jobs for the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1382,13 +1442,13 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1397,51 +1457,54 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1453,55 +1516,56 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1511,9 +1575,10 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1524,24 +1589,28 @@ internal ReplicationJobsOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationJobsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationJobsOperationsExtensions.cs index d340415c3cac..f1f31e5c2624 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationJobsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationJobsOperationsExtensions.cs @@ -1,482 +1,367 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationJobsOperations. + /// Extension methods for ReplicationJobsOperations /// public static partial class ReplicationJobsOperationsExtensions { - /// - /// Gets the list of jobs. - /// - /// - /// Gets the list of Azure Site Recovery Jobs for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - public static IPage List(this IReplicationJobsOperations operations, ODataQuery odataQuery = default(ODataQuery)) - { - return operations.ListAsync(odataQuery).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of jobs. - /// - /// - /// Gets the list of Azure Site Recovery Jobs for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationJobsOperations operations, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the job details. - /// - /// - /// Get the details of an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - public static Job Get(this IReplicationJobsOperations operations, string jobName) - { - return operations.GetAsync(jobName).GetAwaiter().GetResult(); - } - - /// - /// Gets the job details. - /// - /// - /// Get the details of an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Cancels the specified job. - /// - /// - /// The operation to cancel an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - public static Job Cancel(this IReplicationJobsOperations operations, string jobName) - { - return operations.CancelAsync(jobName).GetAwaiter().GetResult(); - } - - /// - /// Cancels the specified job. - /// - /// - /// The operation to cancel an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - /// - /// The cancellation token. - /// - public static async Task CancelAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CancelWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationJobsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IReplicationJobsOperations)operations).ListAsync(odataQuery).GetAwaiter().GetResult(); + } - /// - /// Restarts the specified job. - /// - /// - /// The operation to restart an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - public static Job Restart(this IReplicationJobsOperations operations, string jobName) + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationJobsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) { - return operations.RestartAsync(jobName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Get the details of an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + public static Job Get(this IReplicationJobsOperations operations, string jobName) + { + return ((IReplicationJobsOperations)operations).GetAsync(jobName).GetAwaiter().GetResult(); + } - /// - /// Restarts the specified job. - /// - /// - /// The operation to restart an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - /// - /// The cancellation token. - /// - public static async Task RestartAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Get the details of an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationJobsOperations operations, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.RestartWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + public static Job Cancel(this IReplicationJobsOperations operations, string jobName) + { + return ((IReplicationJobsOperations)operations).CancelAsync(jobName).GetAwaiter().GetResult(); + } - /// - /// Resumes the specified job. - /// - /// - /// The operation to resume an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - /// - /// Resume job properties. - /// - public static Job Resume(this IReplicationJobsOperations operations, string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties)) + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CancelAsync(this IReplicationJobsOperations operations, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CancelWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) { - return operations.ResumeAsync(jobName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + public static Job Restart(this IReplicationJobsOperations operations, string jobName) + { + return ((IReplicationJobsOperations)operations).RestartAsync(jobName).GetAwaiter().GetResult(); + } - /// - /// Resumes the specified job. - /// - /// - /// The operation to resume an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - /// - /// Resume job properties. - /// - /// - /// The cancellation token. - /// - public static async Task ResumeAsync(this IReplicationJobsOperations operations, string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RestartAsync(this IReplicationJobsOperations operations, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RestartWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ResumeWithHttpMessagesAsync(jobName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to resume an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + public static Job Resume(this IReplicationJobsOperations operations, string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties)) + { + return ((IReplicationJobsOperations)operations).ResumeAsync(jobName, properties).GetAwaiter().GetResult(); + } - /// - /// Exports the details of the Azure Site Recovery jobs of the vault. - /// - /// - /// The operation to export the details of the Azure Site Recovery jobs of the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// job query filter. - /// - public static Job Export(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter) + /// + /// The operation to resume an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ResumeAsync(this IReplicationJobsOperations operations, string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ResumeWithHttpMessagesAsync(jobName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.ExportAsync(jobQueryParameter).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to export the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Job Export(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter) + { + return ((IReplicationJobsOperations)operations).ExportAsync(jobQueryParameter).GetAwaiter().GetResult(); + } - /// - /// Exports the details of the Azure Site Recovery jobs of the vault. - /// - /// - /// The operation to export the details of the Azure Site Recovery jobs of the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// job query filter. - /// - /// - /// The cancellation token. - /// - public static async Task ExportAsync(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to export the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ExportAsync(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ExportWithHttpMessagesAsync(jobQueryParameter, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ExportWithHttpMessagesAsync(jobQueryParameter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + public static Job BeginCancel(this IReplicationJobsOperations operations, string jobName) + { + return ((IReplicationJobsOperations)operations).BeginCancelAsync(jobName).GetAwaiter().GetResult(); + } - /// - /// Cancels the specified job. - /// - /// - /// The operation to cancel an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - public static Job BeginCancel(this IReplicationJobsOperations operations, string jobName) + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCancelAsync(this IReplicationJobsOperations operations, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCancelWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCancelAsync(jobName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + public static Job BeginRestart(this IReplicationJobsOperations operations, string jobName) + { + return ((IReplicationJobsOperations)operations).BeginRestartAsync(jobName).GetAwaiter().GetResult(); + } - /// - /// Cancels the specified job. - /// - /// - /// The operation to cancel an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCancelAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRestartAsync(this IReplicationJobsOperations operations, string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRestartWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginCancelWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to resume an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + public static Job BeginResume(this IReplicationJobsOperations operations, string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties)) + { + return ((IReplicationJobsOperations)operations).BeginResumeAsync(jobName, properties).GetAwaiter().GetResult(); + } - /// - /// Restarts the specified job. - /// - /// - /// The operation to restart an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - public static Job BeginRestart(this IReplicationJobsOperations operations, string jobName) + /// + /// The operation to resume an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginResumeAsync(this IReplicationJobsOperations operations, string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginResumeWithHttpMessagesAsync(jobName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginRestartAsync(jobName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to export the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Job BeginExport(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter) + { + return ((IReplicationJobsOperations)operations).BeginExportAsync(jobQueryParameter).GetAwaiter().GetResult(); + } - /// - /// Restarts the specified job. - /// - /// - /// The operation to restart an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRestartAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to export the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginExportAsync(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginExportWithHttpMessagesAsync(jobQueryParameter, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginRestartWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationJobsOperations operations, string nextPageLink) + { + return ((IReplicationJobsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Resumes the specified job. - /// - /// - /// The operation to resume an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - /// - /// Resume job properties. - /// - public static Job BeginResume(this IReplicationJobsOperations operations, string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties)) + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationJobsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginResumeAsync(jobName, properties).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Resumes the specified job. - /// - /// - /// The operation to resume an Azure Site Recovery job. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Job identifier. - /// - /// - /// Resume job properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginResumeAsync(this IReplicationJobsOperations operations, string jobName, ResumeJobParamsProperties properties = default(ResumeJobParamsProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginResumeWithHttpMessagesAsync(jobName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Exports the details of the Azure Site Recovery jobs of the vault. - /// - /// - /// The operation to export the details of the Azure Site Recovery jobs of the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// job query filter. - /// - public static Job BeginExport(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter) - { - return operations.BeginExportAsync(jobQueryParameter).GetAwaiter().GetResult(); - } - - /// - /// Exports the details of the Azure Site Recovery jobs of the vault. - /// - /// - /// The operation to export the details of the Azure Site Recovery jobs of the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// job query filter. - /// - /// - /// The cancellation token. - /// - public static async Task BeginExportAsync(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginExportWithHttpMessagesAsync(jobQueryParameter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of jobs. - /// - /// - /// Gets the list of Azure Site Recovery Jobs for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationJobsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of jobs. - /// - /// - /// Gets the list of Azure Site Recovery Jobs for the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationJobsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationLogicalNetworksOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationLogicalNetworksOperations.cs index fbbcadf2cb67..817fb7f2166f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationLogicalNetworksOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationLogicalNetworksOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationLogicalNetworksOperations operations. /// - internal partial class ReplicationLogicalNetworksOperations : IServiceOperations, IReplicationLogicalNetworksOperations + internal partial class ReplicationLogicalNetworksOperations : Microsoft.Rest.IServiceOperations, IReplicationLogicalNetworksOperations { /// /// Initializes a new instance of the ReplicationLogicalNetworksOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationLogicalNetworksOperations : IServiceOperations /// /// Thrown when a required parameter is null /// - internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient client) + internal ReplicationLogicalNetworksOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of logical networks under a fabric. - /// - /// /// Lists all the logical networks of the Azure Site Recovery fabric. - /// + /// /// /// Server Id. /// @@ -65,13 +50,13 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien /// /// 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 /// /// @@ -80,75 +65,87 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,55 +157,56 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -218,9 +216,10 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -231,31 +230,32 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a logical network with specified server id and logical network name. - /// - /// /// Gets the details of a logical network. - /// + /// /// /// Server Id. /// @@ -268,13 +268,13 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien /// /// 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 /// /// @@ -283,81 +283,94 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string logicalNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string logicalNetworkName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (logicalNetworkName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "logicalNetworkName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "logicalNetworkName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("logicalNetworkName", logicalNetworkName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks/{logicalNetworkName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{logicalNetworkName}", System.Uri.EscapeDataString(logicalNetworkName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -369,55 +382,56 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -427,9 +441,10 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -440,31 +455,32 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of logical networks under a fabric. - /// - /// /// Lists all the logical networks of the Azure Site Recovery fabric. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -474,13 +490,13 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien /// /// 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 /// /// @@ -489,51 +505,54 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -545,55 +564,56 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -603,9 +623,10 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -616,24 +637,28 @@ internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationLogicalNetworksOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationLogicalNetworksOperationsExtensions.cs index b399ec952da5..1cd18a261522 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationLogicalNetworksOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationLogicalNetworksOperationsExtensions.cs @@ -1,151 +1,121 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationLogicalNetworksOperations. + /// Extension methods for ReplicationLogicalNetworksOperations /// public static partial class ReplicationLogicalNetworksOperationsExtensions { - /// - /// Gets the list of logical networks under a fabric. - /// - /// - /// Lists all the logical networks of the Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Server Id. - /// - public static IPage ListByReplicationFabrics(this IReplicationLogicalNetworksOperations operations, string fabricName) - { - return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of logical networks under a fabric. - /// - /// - /// Lists all the logical networks of the Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Server Id. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsAsync(this IReplicationLogicalNetworksOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Lists all the logical networks of the Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabrics(this IReplicationLogicalNetworksOperations operations, string fabricName) + { + return ((IReplicationLogicalNetworksOperations)operations).ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } - /// - /// Gets a logical network with specified server id and logical network name. - /// - /// - /// Gets the details of a logical network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Server Id. - /// - /// - /// Logical network name. - /// - public static LogicalNetwork Get(this IReplicationLogicalNetworksOperations operations, string fabricName, string logicalNetworkName) + /// + /// Lists all the logical networks of the Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsAsync(this IReplicationLogicalNetworksOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(fabricName, logicalNetworkName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of a logical network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// Logical network name. + /// + public static LogicalNetwork Get(this IReplicationLogicalNetworksOperations operations, string fabricName, string logicalNetworkName) + { + return ((IReplicationLogicalNetworksOperations)operations).GetAsync(fabricName, logicalNetworkName).GetAwaiter().GetResult(); + } - /// - /// Gets a logical network with specified server id and logical network name. - /// - /// - /// Gets the details of a logical network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Server Id. - /// - /// - /// Logical network name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationLogicalNetworksOperations operations, string fabricName, string logicalNetworkName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of a logical network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// Logical network name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationLogicalNetworksOperations operations, string fabricName, string logicalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, logicalNetworkName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, logicalNetworkName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists all the logical networks of the Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabricsNext(this IReplicationLogicalNetworksOperations operations, string nextPageLink) + { + return ((IReplicationLogicalNetworksOperations)operations).ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of logical networks under a fabric. - /// - /// - /// Lists all the logical networks of the Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationFabricsNext(this IReplicationLogicalNetworksOperations operations, string nextPageLink) + /// + /// Lists all the logical networks of the Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsNextAsync(this IReplicationLogicalNetworksOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of logical networks under a fabric. - /// - /// - /// Lists all the logical networks of the Azure Site Recovery fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsNextAsync(this IReplicationLogicalNetworksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationMigrationItemsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationMigrationItemsOperations.cs index ab61c9252e5b..77ab42ad7980 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationMigrationItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationMigrationItemsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationMigrationItemsOperations operations. /// - internal partial class ReplicationMigrationItemsOperations : IServiceOperations, IReplicationMigrationItemsOperations + internal partial class ReplicationMigrationItemsOperations : Microsoft.Rest.IServiceOperations, IReplicationMigrationItemsOperations { /// /// Initializes a new instance of the ReplicationMigrationItemsOperations class. @@ -37,13 +24,13 @@ internal partial class ReplicationMigrationItemsOperations : IServiceOperations< /// /// Thrown when a required parameter is null /// - internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client) + internal ReplicationMigrationItemsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,20 +39,17 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of migration items in the protection container. - /// - /// /// Gets the list of ASR migration items in the protection container. - /// + /// + /// + /// + /// /// /// Fabric name. /// /// /// Protection container name. /// - /// - /// OData parameters to apply to the operation. - /// /// /// The pagination token. /// @@ -78,13 +62,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -93,67 +77,84 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string takeToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), string takeToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("takeToken", takeToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _migrationItemsQueryParameter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_migrationItemsQueryParameter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_migrationItemsQueryParameter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -168,25 +169,24 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -198,55 +198,56 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -256,9 +257,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -269,25 +271,29 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the details of a migration item. /// @@ -306,13 +312,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -321,87 +327,101 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -413,55 +433,56 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -471,9 +492,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -484,31 +506,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Enables migration. - /// - /// /// The operation to create an ASR migration item (enable migration). - /// + /// /// /// Fabric name. /// @@ -522,24 +545,21 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// Enable migration input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Delete the migration item. - /// - /// /// The operation to delete an ASR migration item. - /// + /// /// /// Fabric name. /// @@ -553,24 +573,21 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// The delete option. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, deleteOption, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, deleteOption, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Updates migration item. - /// - /// /// The operation to update the recovery settings of an ASR migration item. - /// + /// /// /// Fabric name. /// @@ -584,24 +601,21 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// Update migration item input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Migrate item. - /// - /// /// The operation to initiate migration of the item. - /// + /// /// /// Fabric name. /// @@ -615,24 +629,21 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// Migrate input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> MigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> MigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Pause replication. - /// - /// /// The operation to initiate pause replication of the item. - /// + /// /// /// Fabric name. /// @@ -646,24 +657,21 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// Pause replication input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> PauseReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> PauseReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginPauseReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPauseReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Resume replication. - /// - /// /// The operation to initiate resume replication of the item. - /// + /// /// /// Fabric name. /// @@ -677,24 +685,21 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// Resume replication input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ResumeReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ResumeReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginResumeReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginResumeReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Resynchronizes replication. - /// - /// /// The operation to resynchronize replication of an ASR migration item. - /// + /// /// /// Fabric name. /// @@ -708,24 +713,21 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// Resync input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginResyncWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginResyncWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Test migrate item. - /// - /// /// The operation to initiate test migration of the item. - /// + /// /// /// Fabric name. /// @@ -739,24 +741,21 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// Test migrate input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> TestMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> TestMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginTestMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginTestMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Test migrate cleanup. - /// - /// /// The operation to initiate test migrate cleanup. - /// + /// /// /// Fabric name. /// @@ -770,23 +769,23 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// Test migrate cleanup input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> TestMigrateCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> TestMigrateCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginTestMigrateCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginTestMigrateCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// /// Gets the list of migration items in the vault. /// /// - /// OData parameters to apply to the operation. + /// /// /// /// The pagination token. @@ -800,13 +799,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -815,55 +814,70 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string takeToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), string takeToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("takeToken", takeToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationMigrationItems").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _migrationItemsQueryParameter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_migrationItemsQueryParameter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_migrationItemsQueryParameter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -878,25 +892,24 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -908,55 +921,56 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -966,9 +980,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -979,31 +994,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Enables migration. - /// - /// /// The operation to create an ASR migration item (enable migration). - /// + /// /// /// Fabric name. /// @@ -1022,13 +1038,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -1037,101 +1053,107 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + EnableMigrationInput input = new EnableMigrationInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1143,61 +1165,62 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1207,9 +1230,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1220,31 +1244,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Delete the migration item. - /// - /// /// The operation to delete an ASR migration item. - /// + /// /// /// Fabric name. /// @@ -1263,10 +1288,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1275,63 +1300,79 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); tracingParameters.Add("deleteOption", deleteOption); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (deleteOption != null) { @@ -1342,25 +1383,24 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1372,55 +1412,56 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1430,26 +1471,28 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Updates migration item. - /// - /// /// The operation to update the recovery settings of an ASR migration item. - /// + /// /// /// Fabric name. /// @@ -1468,13 +1511,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -1483,97 +1526,107 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + UpdateMigrationItemInput input = new UpdateMigrationItemInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1585,61 +1638,62 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1649,9 +1703,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1662,31 +1717,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Migrate item. - /// - /// /// The operation to initiate migration of the item. - /// + /// /// /// Fabric name. /// @@ -1705,13 +1761,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -1720,101 +1776,107 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + MigrateInput migrateInput = new MigrateInput(); - if (properties != null) + if(properties != null) { migrateInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + tracingParameters.Add("migrateInput", migrateInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMigrate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginMigrate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrate").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1826,61 +1888,62 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(migrateInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrateInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(migrateInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1890,9 +1953,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1903,31 +1967,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Pause replication. - /// - /// /// The operation to initiate pause replication of the item. - /// + /// /// /// Fabric name. /// @@ -1946,13 +2011,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -1961,101 +2026,107 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginPauseReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginPauseReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + PauseReplicationInput pauseReplicationInput = new PauseReplicationInput(); - if (properties != null) + if(properties != null) { pauseReplicationInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + tracingParameters.Add("pauseReplicationInput", pauseReplicationInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPauseReplication", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPauseReplication", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/pauseReplication").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2067,61 +2138,62 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(pauseReplicationInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(pauseReplicationInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(pauseReplicationInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2131,9 +2203,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2144,31 +2217,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Resume replication. - /// - /// /// The operation to initiate resume replication of the item. - /// + /// /// /// Fabric name. /// @@ -2187,13 +2261,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -2202,101 +2276,107 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginResumeReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginResumeReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + ResumeReplicationInput resumeReplicationInput = new ResumeReplicationInput(); - if (properties != null) + if(properties != null) { resumeReplicationInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + tracingParameters.Add("resumeReplicationInput", resumeReplicationInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResumeReplication", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginResumeReplication", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resumeReplication").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2308,61 +2388,62 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(resumeReplicationInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resumeReplicationInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resumeReplicationInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2372,9 +2453,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2385,31 +2467,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Resynchronizes replication. - /// - /// /// The operation to resynchronize replication of an ASR migration item. - /// + /// /// /// Fabric name. /// @@ -2428,13 +2511,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -2443,101 +2526,107 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + ResyncInput input = new ResyncInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResync", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginResync", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resync").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2549,61 +2638,62 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2613,9 +2703,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2626,31 +2717,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Test migrate item. - /// - /// /// The operation to initiate test migration of the item. - /// + /// /// /// Fabric name. /// @@ -2669,13 +2761,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -2684,101 +2776,107 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginTestMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginTestMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + TestMigrateInput testMigrateInput = new TestMigrateInput(); - if (properties != null) + if(properties != null) { testMigrateInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + tracingParameters.Add("testMigrateInput", testMigrateInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginTestMigrate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTestMigrate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrate").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2790,61 +2888,62 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(testMigrateInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(testMigrateInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(testMigrateInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2854,9 +2953,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2867,31 +2967,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Test migrate cleanup. - /// - /// /// The operation to initiate test migrate cleanup. - /// + /// /// /// Fabric name. /// @@ -2910,13 +3011,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -2925,101 +3026,107 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginTestMigrateCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginTestMigrateCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (migrationItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "migrationItemName"); } + TestMigrateCleanupInput testMigrateCleanupInput = new TestMigrateCleanupInput(); - if (properties != null) + if(properties != null) { testMigrateCleanupInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("migrationItemName", migrationItemName); + tracingParameters.Add("testMigrateCleanupInput", testMigrateCleanupInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginTestMigrateCleanup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTestMigrateCleanup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrateCleanup").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3031,61 +3138,62 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(testMigrateCleanupInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(testMigrateCleanupInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(testMigrateCleanupInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3095,9 +3203,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3108,31 +3217,32 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of migration items in the protection container. - /// - /// /// Gets the list of ASR migration items in the protection container. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -3142,13 +3252,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -3157,51 +3267,54 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3213,55 +3326,56 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3271,9 +3385,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3284,25 +3399,29 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the list of migration items in the vault. /// @@ -3315,13 +3434,13 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -3330,51 +3449,54 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3386,55 +3508,56 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3444,9 +3567,10 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3457,24 +3581,28 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationMigrationItemsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationMigrationItemsOperationsExtensions.cs index 0ed8428c3462..1c30becf91f5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationMigrationItemsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationMigrationItemsOperationsExtensions.cs @@ -1,1294 +1,1045 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationMigrationItemsOperations. + /// Extension methods for ReplicationMigrationItemsOperations /// public static partial class ReplicationMigrationItemsOperationsExtensions { - /// - /// Gets the list of migration items in the protection container. - /// - /// - /// Gets the list of ASR migration items in the protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The pagination token. - /// - /// - /// The page size. - /// - public static IPage ListByReplicationProtectionContainers(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string takeToken = default(string)) - { - return operations.ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName, odataQuery, skipToken, takeToken).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of migration items in the protection container. - /// - /// - /// Gets the list of ASR migration items in the protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The pagination token. - /// - /// - /// The page size. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectionContainersAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string takeToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, odataQuery, skipToken, takeToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric unique name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - public static MigrationItem Get(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName) - { - return operations.GetAsync(fabricName, protectionContainerName, migrationItemName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric unique name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Enables migration. - /// - /// - /// The operation to create an ASR migration item (enable migration). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Enable migration input properties. - /// - public static MigrationItem Create(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties) - { - return operations.CreateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Enables migration. - /// - /// - /// The operation to create an ASR migration item (enable migration). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Enable migration input properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete the migration item. - /// - /// - /// The operation to delete an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// The delete option. - /// - public static void Delete(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string)) - { - operations.DeleteAsync(fabricName, protectionContainerName, migrationItemName, deleteOption).GetAwaiter().GetResult(); - } - - /// - /// Delete the migration item. - /// - /// - /// The operation to delete an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// The delete option. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, deleteOption, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates migration item. - /// - /// - /// The operation to update the recovery settings of an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Update migration item input properties. - /// - public static MigrationItem Update(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties)) - { - return operations.UpdateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Updates migration item. - /// - /// - /// The operation to update the recovery settings of an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Update migration item input properties. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Migrate item. - /// - /// - /// The operation to initiate migration of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Migrate input properties. - /// - public static MigrationItem Migrate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties) - { - return operations.MigrateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Migrate item. - /// - /// - /// The operation to initiate migration of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Migrate input properties. - /// - /// - /// The cancellation token. - /// - public static async Task MigrateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.MigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Pause replication. - /// - /// - /// The operation to initiate pause replication of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Pause replication input properties. - /// - public static MigrationItem PauseReplication(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties) - { - return operations.PauseReplicationAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Pause replication. - /// - /// - /// The operation to initiate pause replication of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Pause replication input properties. - /// - /// - /// The cancellation token. - /// - public static async Task PauseReplicationAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PauseReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Gets the list of ASR migration items in the protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The pagination token. + /// + /// + /// The page size. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectionContainers(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), string takeToken = default(string)) + { + return ((IReplicationMigrationItemsOperations)operations).ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName, odataQuery, skipToken, takeToken).GetAwaiter().GetResult(); + } - /// - /// Resume replication. - /// - /// - /// The operation to initiate resume replication of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Resume replication input properties. - /// - public static MigrationItem ResumeReplication(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties) + /// + /// Gets the list of ASR migration items in the protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The pagination token. + /// + /// + /// The page size. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectionContainersAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), string takeToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, odataQuery, skipToken, takeToken, null, cancellationToken).ConfigureAwait(false)) { - return operations.ResumeReplicationAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of a migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem Get(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName) + { + return ((IReplicationMigrationItemsOperations)operations).GetAsync(fabricName, protectionContainerName, migrationItemName).GetAwaiter().GetResult(); + } - /// - /// Resume replication. - /// - /// - /// The operation to initiate resume replication of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Resume replication input properties. - /// - /// - /// The cancellation token. - /// - public static async Task ResumeReplicationAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of a migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ResumeReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create an ASR migration item (enable migration). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem Create(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).CreateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Resynchronizes replication. - /// - /// - /// The operation to resynchronize replication of an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Resync input properties. - /// - public static MigrationItem Resync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties) + /// + /// The operation to create an ASR migration item (enable migration). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.ResyncAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to delete an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The delete option. + /// + public static void Delete(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string)) + { + ((IReplicationMigrationItemsOperations)operations).DeleteAsync(fabricName, protectionContainerName, migrationItemName, deleteOption).GetAwaiter().GetResult(); + } - /// - /// Resynchronizes replication. - /// - /// - /// The operation to resynchronize replication of an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Resync input properties. - /// - /// - /// The cancellation token. - /// - public static async Task ResyncAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ResyncWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// The operation to delete an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The delete option. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, deleteOption, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update the recovery settings of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem Update(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties)) + { + return ((IReplicationMigrationItemsOperations)operations).UpdateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Test migrate item. - /// - /// - /// The operation to initiate test migration of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Test migrate input properties. - /// - public static MigrationItem TestMigrate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties) + /// + /// The operation to update the recovery settings of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.TestMigrateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to initiate migration of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem Migrate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).MigrateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Test migrate item. - /// - /// - /// The operation to initiate test migration of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Test migrate input properties. - /// - /// - /// The cancellation token. - /// - public static async Task TestMigrateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to initiate migration of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task MigrateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.MigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.TestMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to initiate pause replication of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem PauseReplication(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).PauseReplicationAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Test migrate cleanup. - /// - /// - /// The operation to initiate test migrate cleanup. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Test migrate cleanup input properties. - /// - public static MigrationItem TestMigrateCleanup(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties) + /// + /// The operation to initiate pause replication of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PauseReplicationAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PauseReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.TestMigrateCleanupAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to initiate resume replication of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem ResumeReplication(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).ResumeReplicationAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Test migrate cleanup. - /// - /// - /// The operation to initiate test migrate cleanup. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Test migrate cleanup input properties. - /// - /// - /// The cancellation token. - /// - public static async Task TestMigrateCleanupAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to initiate resume replication of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ResumeReplicationAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ResumeReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.TestMigrateCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem Resync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).ResyncAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets the list of migration items in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The pagination token. - /// - /// - /// The page size. - /// - public static IPage List(this IReplicationMigrationItemsOperations operations, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string takeToken = default(string)) + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ResyncAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ResyncWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListAsync(odataQuery, skipToken, takeToken).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to initiate test migration of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem TestMigrate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).TestMigrateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets the list of migration items in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The pagination token. - /// - /// - /// The page size. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationMigrationItemsOperations operations, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), string takeToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to initiate test migration of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TestMigrateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.TestMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, skipToken, takeToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to initiate test migrate cleanup. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem TestMigrateCleanup(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).TestMigrateCleanupAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Enables migration. - /// - /// - /// The operation to create an ASR migration item (enable migration). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Enable migration input properties. - /// - public static MigrationItem BeginCreate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties) + /// + /// The operation to initiate test migrate cleanup. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TestMigrateCleanupAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.TestMigrateCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCreateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the list of migration items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The pagination token. + /// + /// + /// The page size. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationMigrationItemsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), string takeToken = default(string)) + { + return ((IReplicationMigrationItemsOperations)operations).ListAsync(odataQuery, skipToken, takeToken).GetAwaiter().GetResult(); + } - /// - /// Enables migration. - /// - /// - /// The operation to create an ASR migration item (enable migration). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Enable migration input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the list of migration items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The pagination token. + /// + /// + /// The page size. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationMigrationItemsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), string takeToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, skipToken, takeToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create an ASR migration item (enable migration). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem BeginCreate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).BeginCreateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Delete the migration item. - /// - /// - /// The operation to delete an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// The delete option. - /// - public static void BeginDelete(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string)) + /// + /// The operation to create an ASR migration item (enable migration). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, EnableMigrationInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - operations.BeginDeleteAsync(fabricName, protectionContainerName, migrationItemName, deleteOption).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to delete an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The delete option. + /// + public static void BeginDelete(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string)) + { + ((IReplicationMigrationItemsOperations)operations).BeginDeleteAsync(fabricName, protectionContainerName, migrationItemName, deleteOption).GetAwaiter().GetResult(); + } - /// - /// Delete the migration item. - /// - /// - /// The operation to delete an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// The delete option. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, deleteOption, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// The operation to delete an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The delete option. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, string deleteOption = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, deleteOption, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update the recovery settings of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem BeginUpdate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties)) + { + return ((IReplicationMigrationItemsOperations)operations).BeginUpdateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Updates migration item. - /// - /// - /// The operation to update the recovery settings of an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Update migration item input properties. - /// - public static MigrationItem BeginUpdate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties)) + /// + /// The operation to update the recovery settings of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginUpdateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to initiate migration of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem BeginMigrate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).BeginMigrateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Updates migration item. - /// - /// - /// The operation to update the recovery settings of an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Update migration item input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, UpdateMigrationItemInputProperties properties = default(UpdateMigrationItemInputProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to initiate migration of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginMigrateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to initiate pause replication of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem BeginPauseReplication(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).BeginPauseReplicationAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Migrate item. - /// - /// - /// The operation to initiate migration of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Migrate input properties. - /// - public static MigrationItem BeginMigrate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties) + /// + /// The operation to initiate pause replication of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPauseReplicationAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginPauseReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginMigrateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to initiate resume replication of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem BeginResumeReplication(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).BeginResumeReplicationAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Migrate item. - /// - /// - /// The operation to initiate migration of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Migrate input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginMigrateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, MigrateInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to initiate resume replication of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginResumeReplicationAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginResumeReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem BeginResync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).BeginResyncAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Pause replication. - /// - /// - /// The operation to initiate pause replication of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Pause replication input properties. - /// - public static MigrationItem BeginPauseReplication(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties) + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginResyncAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginResyncWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginPauseReplicationAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to initiate test migration of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem BeginTestMigrate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).BeginTestMigrateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Pause replication. - /// - /// - /// The operation to initiate pause replication of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Pause replication input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginPauseReplicationAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, PauseReplicationInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to initiate test migration of the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginTestMigrateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginTestMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginPauseReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to initiate test migrate cleanup. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + public static MigrationItem BeginTestMigrateCleanup(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties) + { + return ((IReplicationMigrationItemsOperations)operations).BeginTestMigrateCleanupAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + } - /// - /// Resume replication. - /// - /// - /// The operation to initiate resume replication of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Resume replication input properties. - /// - public static MigrationItem BeginResumeReplication(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties) + /// + /// The operation to initiate test migrate cleanup. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginTestMigrateCleanupAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginTestMigrateCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginResumeReplicationAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the list of ASR migration items in the protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectionContainersNext(this IReplicationMigrationItemsOperations operations, string nextPageLink) + { + return ((IReplicationMigrationItemsOperations)operations).ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Resume replication. - /// - /// - /// The operation to initiate resume replication of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Resume replication input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginResumeReplicationAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResumeReplicationInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the list of ASR migration items in the protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectionContainersNextAsync(this IReplicationMigrationItemsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginResumeReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the list of migration items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationMigrationItemsOperations operations, string nextPageLink) + { + return ((IReplicationMigrationItemsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Resynchronizes replication. - /// - /// - /// The operation to resynchronize replication of an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Resync input properties. - /// - public static MigrationItem BeginResync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties) + /// + /// Gets the list of migration items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationMigrationItemsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginResyncAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Resynchronizes replication. - /// - /// - /// The operation to resynchronize replication of an ASR migration item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Resync input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginResyncAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginResyncWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Test migrate item. - /// - /// - /// The operation to initiate test migration of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Test migrate input properties. - /// - public static MigrationItem BeginTestMigrate(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties) - { - return operations.BeginTestMigrateAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Test migrate item. - /// - /// - /// The operation to initiate test migration of the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Test migrate input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginTestMigrateAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginTestMigrateWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Test migrate cleanup. - /// - /// - /// The operation to initiate test migrate cleanup. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Test migrate cleanup input properties. - /// - public static MigrationItem BeginTestMigrateCleanup(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties) - { - return operations.BeginTestMigrateCleanupAsync(fabricName, protectionContainerName, migrationItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Test migrate cleanup. - /// - /// - /// The operation to initiate test migrate cleanup. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Migration item name. - /// - /// - /// Test migrate cleanup input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginTestMigrateCleanupAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, TestMigrateCleanupInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginTestMigrateCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of migration items in the protection container. - /// - /// - /// Gets the list of ASR migration items in the protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationProtectionContainersNext(this IReplicationMigrationItemsOperations operations, string nextPageLink) - { - return operations.ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of migration items in the protection container. - /// - /// - /// Gets the list of ASR migration items in the protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectionContainersNextAsync(this IReplicationMigrationItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of migration items in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationMigrationItemsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of migration items in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationMigrationItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworkMappingsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworkMappingsOperations.cs index 7a6b7e0d5dfc..376c92bcab04 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworkMappingsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworkMappingsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationNetworkMappingsOperations operations. /// - internal partial class ReplicationNetworkMappingsOperations : IServiceOperations, IReplicationNetworkMappingsOperations + internal partial class ReplicationNetworkMappingsOperations : Microsoft.Rest.IServiceOperations, IReplicationNetworkMappingsOperations { /// /// Initializes a new instance of the ReplicationNetworkMappingsOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationNetworkMappingsOperations : IServiceOperations /// /// Thrown when a required parameter is null /// - internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient client) + internal ReplicationNetworkMappingsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets all the network mappings under a network. - /// - /// /// Lists all ASR network mappings for the specified network. - /// + /// /// /// Primary fabric name. /// @@ -68,13 +53,13 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// 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 /// /// @@ -83,81 +68,94 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationNetworksWithHttpMessagesAsync(string fabricName, string networkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationNetworksWithHttpMessagesAsync(string fabricName, string networkName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (networkName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("networkName", networkName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationNetworks", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationNetworks", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -169,55 +167,56 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -227,9 +226,10 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -240,31 +240,32 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets network mapping by name. - /// - /// /// Gets the details of an ASR network mapping. - /// + /// /// /// Primary fabric name. /// @@ -280,13 +281,13 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// 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 /// /// @@ -295,87 +296,101 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (networkName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkName"); } + if (networkMappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkMappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkMappingName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("networkName", networkName); tracingParameters.Add("networkMappingName", networkMappingName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); _url = _url.Replace("{networkMappingName}", System.Uri.EscapeDataString(networkMappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -387,55 +402,56 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -445,9 +461,10 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -458,31 +475,32 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates network mapping. - /// - /// /// The operation to create an ASR network mapping. - /// + /// /// /// Primary fabric name. /// @@ -496,24 +514,21 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// Input properties for creating network mapping. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Delete network mapping. - /// - /// /// The operation to delete a network mapping. - /// + /// /// /// Primary fabric name. /// @@ -524,24 +539,21 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// ARM Resource Name for network mapping. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, networkName, networkMappingName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, networkName, networkMappingName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Updates network mapping. - /// - /// /// The operation to update an ASR network mapping. - /// + /// /// /// Primary fabric name. /// @@ -555,37 +567,34 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// The input properties needed to update network mapping. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Gets all the network mappings under a vault. - /// - /// /// Lists all ASR network mappings in the 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 /// /// @@ -594,69 +603,80 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworkMappings").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -668,55 +688,56 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -726,9 +747,10 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -739,31 +761,32 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates network mapping. - /// - /// /// The operation to create an ASR network mapping. - /// + /// /// /// Primary fabric name. /// @@ -782,13 +805,13 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// 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 /// /// @@ -797,101 +820,107 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (networkName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkName"); } + if (networkMappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkMappingName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkMappingName"); } + CreateNetworkMappingInput input = new CreateNetworkMappingInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("networkName", networkName); tracingParameters.Add("networkMappingName", networkMappingName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); _url = _url.Replace("{networkMappingName}", System.Uri.EscapeDataString(networkMappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -903,61 +932,62 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -967,9 +997,10 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -980,31 +1011,32 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Delete network mapping. - /// - /// /// The operation to delete a network mapping. - /// + /// /// /// Primary fabric name. /// @@ -1020,10 +1052,10 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1032,87 +1064,101 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (networkName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkName"); } + if (networkMappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkMappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkMappingName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("networkName", networkName); tracingParameters.Add("networkMappingName", networkMappingName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); _url = _url.Replace("{networkMappingName}", System.Uri.EscapeDataString(networkMappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1124,55 +1170,56 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1182,26 +1229,28 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Updates network mapping. - /// - /// /// The operation to update an ASR network mapping. - /// + /// /// /// Primary fabric name. /// @@ -1220,13 +1269,13 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// 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 /// /// @@ -1235,93 +1284,107 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (networkName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkName"); } + if (networkMappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkMappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkMappingName"); } + UpdateNetworkMappingInput input = new UpdateNetworkMappingInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("networkName", networkName); tracingParameters.Add("networkMappingName", networkMappingName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); _url = _url.Replace("{networkMappingName}", System.Uri.EscapeDataString(networkMappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1333,61 +1396,62 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1397,9 +1461,10 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1410,31 +1475,32 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets all the network mappings under a network. - /// - /// /// Lists all ASR network mappings for the specified network. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1444,13 +1510,13 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// 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 /// /// @@ -1459,51 +1525,54 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationNetworksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationNetworksNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationNetworksNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationNetworksNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1515,55 +1584,56 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1573,9 +1643,10 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1586,31 +1657,32 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets all the network mappings under a vault. - /// - /// /// Lists all ASR network mappings in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1620,13 +1692,13 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// 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 /// /// @@ -1635,51 +1707,54 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1691,55 +1766,56 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1749,9 +1825,10 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1762,24 +1839,28 @@ internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworkMappingsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworkMappingsOperationsExtensions.cs index b3fe6c3819fc..22b06b809c12 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworkMappingsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworkMappingsOperationsExtensions.cs @@ -1,567 +1,457 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationNetworkMappingsOperations. + /// Extension methods for ReplicationNetworkMappingsOperations /// public static partial class ReplicationNetworkMappingsOperationsExtensions { - /// - /// Gets all the network mappings under a network. - /// - /// - /// Lists all ASR network mappings for the specified network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - public static IPage ListByReplicationNetworks(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName) - { - return operations.ListByReplicationNetworksAsync(fabricName, networkName).GetAwaiter().GetResult(); - } - - /// - /// Gets all the network mappings under a network. - /// - /// - /// Lists all ASR network mappings for the specified network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationNetworksAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationNetworksWithHttpMessagesAsync(fabricName, networkName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets network mapping by name. - /// - /// - /// Gets the details of an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - public static NetworkMapping Get(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName) - { - return operations.GetAsync(fabricName, networkName, networkMappingName).GetAwaiter().GetResult(); - } - - /// - /// Gets network mapping by name. - /// - /// - /// Gets the details of an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, networkName, networkMappingName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates network mapping. - /// - /// - /// The operation to create an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - /// - /// Input properties for creating network mapping. - /// - public static NetworkMapping Create(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties) - { - return operations.CreateAsync(fabricName, networkName, networkMappingName, properties).GetAwaiter().GetResult(); - } - - /// - /// Creates network mapping. - /// - /// - /// The operation to create an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - /// - /// Input properties for creating network mapping. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete network mapping. - /// - /// - /// The operation to delete a network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// ARM Resource Name for network mapping. - /// - public static void Delete(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName) - { - operations.DeleteAsync(fabricName, networkName, networkMappingName).GetAwaiter().GetResult(); - } - - /// - /// Delete network mapping. - /// - /// - /// The operation to delete a network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// ARM Resource Name for network mapping. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(fabricName, networkName, networkMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationNetworks(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName) + { + return ((IReplicationNetworkMappingsOperations)operations).ListByReplicationNetworksAsync(fabricName, networkName).GetAwaiter().GetResult(); + } - /// - /// Updates network mapping. - /// - /// - /// The operation to update an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - /// - /// The input properties needed to update network mapping. - /// - public static NetworkMapping Update(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties)) + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationNetworksAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationNetworksWithHttpMessagesAsync(fabricName, networkName, null, cancellationToken).ConfigureAwait(false)) { - return operations.UpdateAsync(fabricName, networkName, networkMappingName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + public static NetworkMapping Get(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName) + { + return ((IReplicationNetworkMappingsOperations)operations).GetAsync(fabricName, networkName, networkMappingName).GetAwaiter().GetResult(); + } - /// - /// Updates network mapping. - /// - /// - /// The operation to update an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - /// - /// The input properties needed to update network mapping. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, networkName, networkMappingName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + public static NetworkMapping Create(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties) + { + return ((IReplicationNetworkMappingsOperations)operations).CreateAsync(fabricName, networkName, networkMappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets all the network mappings under a vault. - /// - /// - /// Lists all ASR network mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationNetworkMappingsOperations operations) + /// + /// The operation to create an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListAsync().GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to delete a network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + public static void Delete(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName) + { + ((IReplicationNetworkMappingsOperations)operations).DeleteAsync(fabricName, networkName, networkMappingName).GetAwaiter().GetResult(); + } - /// - /// Gets all the network mappings under a vault. - /// - /// - /// Lists all ASR network mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationNetworkMappingsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// The operation to delete a network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, networkName, networkMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + public static NetworkMapping Update(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties)) + { + return ((IReplicationNetworkMappingsOperations)operations).UpdateAsync(fabricName, networkName, networkMappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Creates network mapping. - /// - /// - /// The operation to create an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - /// - /// Input properties for creating network mapping. - /// - public static NetworkMapping BeginCreate(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties) + /// + /// The operation to update an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCreateAsync(fabricName, networkName, networkMappingName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationNetworkMappingsOperations operations) + { + return ((IReplicationNetworkMappingsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Creates network mapping. - /// - /// - /// The operation to create an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - /// - /// Input properties for creating network mapping. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationNetworkMappingsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + public static NetworkMapping BeginCreate(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties) + { + return ((IReplicationNetworkMappingsOperations)operations).BeginCreateAsync(fabricName, networkName, networkMappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Delete network mapping. - /// - /// - /// The operation to delete a network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// ARM Resource Name for network mapping. - /// - public static void BeginDelete(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName) + /// + /// The operation to create an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - operations.BeginDeleteAsync(fabricName, networkName, networkMappingName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to delete a network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + public static void BeginDelete(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName) + { + ((IReplicationNetworkMappingsOperations)operations).BeginDeleteAsync(fabricName, networkName, networkMappingName).GetAwaiter().GetResult(); + } - /// - /// Delete network mapping. - /// - /// - /// The operation to delete a network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// ARM Resource Name for network mapping. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, networkName, networkMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// The operation to delete a network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, networkName, networkMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + public static NetworkMapping BeginUpdate(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties)) + { + return ((IReplicationNetworkMappingsOperations)operations).BeginUpdateAsync(fabricName, networkName, networkMappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Updates network mapping. - /// - /// - /// The operation to update an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - /// - /// The input properties needed to update network mapping. - /// - public static NetworkMapping BeginUpdate(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties)) + /// + /// The operation to update an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginUpdateAsync(fabricName, networkName, networkMappingName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationNetworksNext(this IReplicationNetworkMappingsOperations operations, string nextPageLink) + { + return ((IReplicationNetworkMappingsOperations)operations).ListByReplicationNetworksNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Updates network mapping. - /// - /// - /// The operation to update an ASR network mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Primary fabric name. - /// - /// - /// Primary network name. - /// - /// - /// Network mapping name. - /// - /// - /// The input properties needed to update network mapping. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationNetworksNextAsync(this IReplicationNetworkMappingsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationNetworksNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationNetworkMappingsOperations operations, string nextPageLink) + { + return ((IReplicationNetworkMappingsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets all the network mappings under a network. - /// - /// - /// Lists all ASR network mappings for the specified network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationNetworksNext(this IReplicationNetworkMappingsOperations operations, string nextPageLink) + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationNetworkMappingsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationNetworksNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets all the network mappings under a network. - /// - /// - /// Lists all ASR network mappings for the specified network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationNetworksNextAsync(this IReplicationNetworkMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationNetworksNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all the network mappings under a vault. - /// - /// - /// Lists all ASR network mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationNetworkMappingsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all the network mappings under a vault. - /// - /// - /// Lists all ASR network mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationNetworkMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworksOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworksOperations.cs index c9ab1748d20a..e35a31709e22 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworksOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworksOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationNetworksOperations operations. /// - internal partial class ReplicationNetworksOperations : IServiceOperations, IReplicationNetworksOperations + internal partial class ReplicationNetworksOperations : Microsoft.Rest.IServiceOperations, IReplicationNetworksOperations { /// /// Initializes a new instance of the ReplicationNetworksOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationNetworksOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) + internal ReplicationNetworksOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of networks under a fabric. - /// - /// /// Lists the networks available for a fabric. - /// + /// /// /// Fabric name. /// @@ -65,13 +50,13 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -80,75 +65,87 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,55 +157,56 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -218,9 +216,10 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -231,31 +230,32 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a network with specified server id and network name. - /// - /// /// Gets the details of a network. - /// + /// /// /// Server Id. /// @@ -268,13 +268,13 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -283,81 +283,94 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string networkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string networkName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (networkName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "networkName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("networkName", networkName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -369,55 +382,56 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -427,9 +441,10 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -440,44 +455,45 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of networks. View-only API. - /// - /// /// Lists the networks available in a 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 /// /// @@ -486,69 +502,80 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworks").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -560,55 +587,56 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -618,9 +646,10 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -631,31 +660,32 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of networks under a fabric. - /// - /// /// Lists the networks available for a fabric. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -665,13 +695,13 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -680,51 +710,54 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -736,55 +769,56 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -794,9 +828,10 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -807,31 +842,32 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of networks. View-only API. - /// - /// /// Lists the networks available in a vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -841,13 +877,13 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -856,51 +892,54 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -912,55 +951,56 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -970,9 +1010,10 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -983,24 +1024,28 @@ internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworksOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworksOperationsExtensions.cs index 96b9df0dabf3..0e86d0242123 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworksOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationNetworksOperationsExtensions.cs @@ -1,225 +1,181 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationNetworksOperations. + /// Extension methods for ReplicationNetworksOperations /// public static partial class ReplicationNetworksOperationsExtensions { - /// - /// Gets the list of networks under a fabric. - /// - /// - /// Lists the networks available for a fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - public static IPage ListByReplicationFabrics(this IReplicationNetworksOperations operations, string fabricName) - { - return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of networks under a fabric. - /// - /// - /// Lists the networks available for a fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsAsync(this IReplicationNetworksOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a network with specified server id and network name. - /// - /// - /// Gets the details of a network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Server Id. - /// - /// - /// Primary network name. - /// - public static Network Get(this IReplicationNetworksOperations operations, string fabricName, string networkName) - { - return operations.GetAsync(fabricName, networkName).GetAwaiter().GetResult(); - } - - /// - /// Gets a network with specified server id and network name. - /// - /// - /// Gets the details of a network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Server Id. - /// - /// - /// Primary network name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationNetworksOperations operations, string fabricName, string networkName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, networkName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Lists the networks available for a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabrics(this IReplicationNetworksOperations operations, string fabricName) + { + return ((IReplicationNetworksOperations)operations).ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of networks. View-only API. - /// - /// - /// Lists the networks available in a vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationNetworksOperations operations) + /// + /// Lists the networks available for a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsAsync(this IReplicationNetworksOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListAsync().GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of a network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// Primary network name. + /// + public static Network Get(this IReplicationNetworksOperations operations, string fabricName, string networkName) + { + return ((IReplicationNetworksOperations)operations).GetAsync(fabricName, networkName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of networks. View-only API. - /// - /// - /// Lists the networks available in a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationNetworksOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of a network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// Primary network name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationNetworksOperations operations, string fabricName, string networkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, networkName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the networks available in a vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationNetworksOperations operations) + { + return ((IReplicationNetworksOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Gets the list of networks under a fabric. - /// - /// - /// Lists the networks available for a fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationFabricsNext(this IReplicationNetworksOperations operations, string nextPageLink) + /// + /// Lists the networks available in a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationNetworksOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the networks available for a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabricsNext(this IReplicationNetworksOperations operations, string nextPageLink) + { + return ((IReplicationNetworksOperations)operations).ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of networks under a fabric. - /// - /// - /// Lists the networks available for a fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsNextAsync(this IReplicationNetworksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the networks available for a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsNextAsync(this IReplicationNetworksOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the networks available in a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationNetworksOperations operations, string nextPageLink) + { + return ((IReplicationNetworksOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of networks. View-only API. - /// - /// - /// Lists the networks available in a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationNetworksOperations operations, string nextPageLink) + /// + /// Lists the networks available in a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationNetworksOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of networks. View-only API. - /// - /// - /// Lists the networks available in a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationNetworksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationPoliciesOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationPoliciesOperations.cs index 66145d6e55a0..4caac5a48be5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationPoliciesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationPoliciesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationPoliciesOperations operations. /// - internal partial class ReplicationPoliciesOperations : IServiceOperations, IReplicationPoliciesOperations + internal partial class ReplicationPoliciesOperations : Microsoft.Rest.IServiceOperations, IReplicationPoliciesOperations { /// /// Initializes a new instance of the ReplicationPoliciesOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationPoliciesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) + internal ReplicationPoliciesOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,24 +39,21 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of replication policies. - /// - /// /// Lists the replication policies for a 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 /// /// @@ -77,69 +62,80 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -151,55 +147,56 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -209,9 +206,10 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -222,31 +220,32 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the requested policy. - /// - /// /// Gets the details of a replication policy. - /// + /// /// /// Replication policy name. /// @@ -256,13 +255,13 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -271,75 +270,87 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (policyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "policyName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("policyName", policyName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -351,55 +362,56 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -409,9 +421,10 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -422,31 +435,32 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates the policy. - /// - /// /// The operation to create a replication policy. - /// + /// /// /// Replication policy name. /// @@ -454,46 +468,40 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// Policy creation properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(policyName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(policyName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Delete the policy. - /// - /// /// The operation to delete a replication policy. - /// + /// /// /// Replication policy name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(policyName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(policyName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Updates the policy. - /// - /// /// The operation to update a replication policy. - /// + /// /// /// Policy Id. /// @@ -501,24 +509,21 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// The ReplicationProviderSettings. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(policyName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(policyName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Creates the policy. - /// - /// /// The operation to create a replication policy. - /// + /// /// /// Replication policy name. /// @@ -531,13 +536,13 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -546,81 +551,93 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (policyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "policyName"); } + CreatePolicyInput input = new CreatePolicyInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("policyName", policyName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -632,61 +649,62 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -696,9 +714,10 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -709,31 +728,32 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Delete the policy. - /// - /// /// The operation to delete a replication policy. - /// + /// /// /// Replication policy name. /// @@ -743,10 +763,10 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -755,75 +775,87 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string policyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (policyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "policyName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("policyName", policyName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -835,55 +867,56 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -893,26 +926,28 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Updates the policy. - /// - /// /// The operation to update a replication policy. - /// + /// /// /// Policy Id. /// @@ -925,13 +960,13 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -940,81 +975,93 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (policyName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "policyName"); } + UpdatePolicyInput input = new UpdatePolicyInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("policyName", policyName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1026,61 +1073,62 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1090,9 +1138,10 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1103,31 +1152,32 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of replication policies. - /// - /// /// Lists the replication policies for a vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1137,13 +1187,13 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1152,51 +1202,54 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1208,55 +1261,56 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1266,9 +1320,10 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1279,24 +1334,28 @@ internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationPoliciesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationPoliciesOperationsExtensions.cs index 3afec57c014e..2e2ee997296a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationPoliciesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationPoliciesOperationsExtensions.cs @@ -1,397 +1,301 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationPoliciesOperations. + /// Extension methods for ReplicationPoliciesOperations /// public static partial class ReplicationPoliciesOperationsExtensions { - /// - /// Gets the list of replication policies. - /// - /// - /// Lists the replication policies for a vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationPoliciesOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets the list of replication policies. - /// - /// - /// Lists the replication policies for a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationPoliciesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the requested policy. - /// - /// - /// Gets the details of a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - public static Policy Get(this IReplicationPoliciesOperations operations, string policyName) - { - return operations.GetAsync(policyName).GetAwaiter().GetResult(); - } - - /// - /// Gets the requested policy. - /// - /// - /// Gets the details of a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationPoliciesOperations operations, string policyName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates the policy. - /// - /// - /// The operation to create a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - /// - /// Policy creation properties. - /// - public static Policy Create(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties)) - { - return operations.CreateAsync(policyName, properties).GetAwaiter().GetResult(); - } - - /// - /// Creates the policy. - /// - /// - /// The operation to create a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - /// - /// Policy creation properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(policyName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete the policy. - /// - /// - /// The operation to delete a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - public static void Delete(this IReplicationPoliciesOperations operations, string policyName) - { - operations.DeleteAsync(policyName).GetAwaiter().GetResult(); - } - - /// - /// Delete the policy. - /// - /// - /// The operation to delete a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationPoliciesOperations operations, string policyName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Lists the replication policies for a vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationPoliciesOperations operations) + { + return ((IReplicationPoliciesOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Updates the policy. - /// - /// - /// The operation to update a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Policy Id. - /// - /// - /// The ReplicationProviderSettings. - /// - public static Policy Update(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties)) + /// + /// Lists the replication policies for a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationPoliciesOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - return operations.UpdateAsync(policyName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + public static Policy Get(this IReplicationPoliciesOperations operations, string policyName) + { + return ((IReplicationPoliciesOperations)operations).GetAsync(policyName).GetAwaiter().GetResult(); + } - /// - /// Updates the policy. - /// - /// - /// The operation to update a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Policy Id. - /// - /// - /// The ReplicationProviderSettings. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationPoliciesOperations operations, string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(policyName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + public static Policy Create(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties)) + { + return ((IReplicationPoliciesOperations)operations).CreateAsync(policyName, properties).GetAwaiter().GetResult(); + } - /// - /// Creates the policy. - /// - /// - /// The operation to create a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - /// - /// Policy creation properties. - /// - public static Policy BeginCreate(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties)) + /// + /// The operation to create a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(policyName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCreateAsync(policyName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to delete a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + public static void Delete(this IReplicationPoliciesOperations operations, string policyName) + { + ((IReplicationPoliciesOperations)operations).DeleteAsync(policyName).GetAwaiter().GetResult(); + } - /// - /// Creates the policy. - /// - /// - /// The operation to create a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - /// - /// Policy creation properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(policyName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete the policy. - /// - /// - /// The operation to delete a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - public static void BeginDelete(this IReplicationPoliciesOperations operations, string policyName) - { - operations.BeginDeleteAsync(policyName).GetAwaiter().GetResult(); - } + /// + /// The operation to delete a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationPoliciesOperations operations, string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Policy Id. + /// + public static Policy Update(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties)) + { + return ((IReplicationPoliciesOperations)operations).UpdateAsync(policyName, properties).GetAwaiter().GetResult(); + } - /// - /// Delete the policy. - /// - /// - /// The operation to delete a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication policy name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationPoliciesOperations operations, string policyName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to update a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Policy Id. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(policyName, properties, null, cancellationToken).ConfigureAwait(false)) { - (await operations.BeginDeleteWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// The operation to create a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + public static Policy BeginCreate(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties)) + { + return ((IReplicationPoliciesOperations)operations).BeginCreateAsync(policyName, properties).GetAwaiter().GetResult(); + } - /// - /// Updates the policy. - /// - /// - /// The operation to update a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Policy Id. - /// - /// - /// The ReplicationProviderSettings. - /// - public static Policy BeginUpdate(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties)) + /// + /// The operation to create a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInputProperties properties = default(CreatePolicyInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(policyName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginUpdateAsync(policyName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to delete a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + public static void BeginDelete(this IReplicationPoliciesOperations operations, string policyName) + { + ((IReplicationPoliciesOperations)operations).BeginDeleteAsync(policyName).GetAwaiter().GetResult(); + } - /// - /// Updates the policy. - /// - /// - /// The operation to update a replication policy. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Policy Id. - /// - /// - /// The ReplicationProviderSettings. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(policyName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// The operation to delete a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationPoliciesOperations operations, string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Policy Id. + /// + public static Policy BeginUpdate(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties)) + { + return ((IReplicationPoliciesOperations)operations).BeginUpdateAsync(policyName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets the list of replication policies. - /// - /// - /// Lists the replication policies for a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationPoliciesOperations operations, string nextPageLink) + /// + /// The operation to update a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Policy Id. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(policyName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the replication policies for a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationPoliciesOperations operations, string nextPageLink) + { + return ((IReplicationPoliciesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of replication policies. - /// - /// - /// Lists the replication policies for a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the replication policies for a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationPoliciesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectableItemsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectableItemsOperations.cs index f2fce88cc59b..3c75e6293ea7 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectableItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectableItemsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationProtectableItemsOperations operations. /// - internal partial class ReplicationProtectableItemsOperations : IServiceOperations, IReplicationProtectableItemsOperations + internal partial class ReplicationProtectableItemsOperations : Microsoft.Rest.IServiceOperations, IReplicationProtectableItemsOperations { /// /// Initializes a new instance of the ReplicationProtectableItemsOperations class. @@ -37,13 +24,13 @@ internal partial class ReplicationProtectableItemsOperations : IServiceOperation /// /// Thrown when a required parameter is null /// - internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient client) + internal ReplicationProtectableItemsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,20 +39,17 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of protectable items. - /// - /// /// Lists the protectable items in a protection container. - /// + /// + /// + /// + /// /// /// Fabric name. /// /// /// Protection container name. /// - /// - /// OData parameters to apply to the operation. - /// /// /// take OData query parameter. /// @@ -78,13 +62,13 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie /// /// 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 /// /// @@ -93,67 +77,84 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, ODataQuery odataQuery = default(ODataQuery), string take = default(string), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string take = default(string), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("take", take); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _protectableItemQueryParameter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_protectableItemQueryParameter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_protectableItemQueryParameter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (take != null) { @@ -168,25 +169,24 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -198,55 +198,56 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -256,9 +257,10 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -269,31 +271,32 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the details of a protectable item. - /// - /// /// The operation to get the details of a protectable item. - /// + /// /// /// Fabric name. /// @@ -309,13 +312,13 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie /// /// 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 /// /// @@ -324,87 +327,101 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string protectableItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string protectableItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (protectableItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectableItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectableItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("protectableItemName", protectableItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems/{protectableItemName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{protectableItemName}", System.Uri.EscapeDataString(protectableItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -416,55 +433,56 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -474,9 +492,10 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -487,31 +506,32 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of protectable items. - /// - /// /// Lists the protectable items in a protection container. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -521,13 +541,13 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie /// /// 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 /// /// @@ -536,51 +556,54 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -592,55 +615,56 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -650,9 +674,10 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -663,24 +688,28 @@ internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient clie _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectableItemsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectableItemsOperationsExtensions.cs index 8be3bcfd5ecb..3081c0380d43 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectableItemsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectableItemsOperationsExtensions.cs @@ -1,182 +1,151 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationProtectableItemsOperations. + /// Extension methods for ReplicationProtectableItemsOperations /// public static partial class ReplicationProtectableItemsOperationsExtensions { - /// - /// Gets the list of protectable items. - /// - /// - /// Lists the protectable items in a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// take OData query parameter. - /// - /// - /// skipToken OData query parameter. - /// - public static IPage ListByReplicationProtectionContainers(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, ODataQuery odataQuery = default(ODataQuery), string take = default(string), string skipToken = default(string)) - { - return operations.ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName, odataQuery, take, skipToken).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of protectable items. - /// - /// - /// Lists the protectable items in a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// take OData query parameter. - /// - /// - /// skipToken OData query parameter. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectionContainersAsync(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, ODataQuery odataQuery = default(ODataQuery), string take = default(string), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, odataQuery, take, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// take OData query parameter. + /// + /// + /// skipToken OData query parameter. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectionContainers(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string take = default(string), string skipToken = default(string)) + { + return ((IReplicationProtectableItemsOperations)operations).ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName, odataQuery, take, skipToken).GetAwaiter().GetResult(); + } - /// - /// Gets the details of a protectable item. - /// - /// - /// The operation to get the details of a protectable item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protectable item name. - /// - public static ProtectableItem Get(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, string protectableItemName) + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// take OData query parameter. + /// + /// + /// skipToken OData query parameter. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectionContainersAsync(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string take = default(string), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, odataQuery, take, skipToken, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(fabricName, protectionContainerName, protectableItemName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to get the details of a protectable item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protectable item name. + /// + public static ProtectableItem Get(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, string protectableItemName) + { + return ((IReplicationProtectableItemsOperations)operations).GetAsync(fabricName, protectionContainerName, protectableItemName).GetAwaiter().GetResult(); + } - /// - /// Gets the details of a protectable item. - /// - /// - /// The operation to get the details of a protectable item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protectable item name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, string protectableItemName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to get the details of a protectable item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protectable item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, string protectableItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, protectableItemName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, protectableItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectionContainersNext(this IReplicationProtectableItemsOperations operations, string nextPageLink) + { + return ((IReplicationProtectableItemsOperations)operations).ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of protectable items. - /// - /// - /// Lists the protectable items in a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationProtectionContainersNext(this IReplicationProtectableItemsOperations operations, string nextPageLink) + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectionContainersNextAsync(this IReplicationProtectableItemsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of protectable items. - /// - /// - /// Lists the protectable items in a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectionContainersNextAsync(this IReplicationProtectableItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectedItemsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectedItemsOperations.cs index 3e16df42c13c..e7cbbd303e8c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectedItemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectedItemsOperations.cs @@ -1,32 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ReplicationProtectedItemsOperations operations. /// - internal partial class ReplicationProtectedItemsOperations : IServiceOperations, IReplicationProtectedItemsOperations + internal partial class ReplicationProtectedItemsOperations : Microsoft.Rest.IServiceOperations, IReplicationProtectedItemsOperations { /// /// Initializes a new instance of the ReplicationProtectedItemsOperations class. @@ -37,13 +24,13 @@ internal partial class ReplicationProtectedItemsOperations : IServiceOperations< /// /// Thrown when a required parameter is null /// - internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client) + internal ReplicationProtectedItemsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -52,12 +39,8 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of Replication protected items. + /// Gets the list of ASR replication protected items in the protection container. /// - /// - /// Gets the list of ASR replication protected items in the protection - /// container. - /// /// /// Fabric name. /// @@ -70,13 +53,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -85,81 +68,94 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -171,55 +167,56 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -229,9 +226,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -242,31 +240,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the details of a Replication protected item. - /// - /// /// Gets the details of an ASR replication protected item. - /// + /// /// /// Fabric unique name. /// @@ -282,13 +281,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -297,87 +296,101 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -389,55 +402,56 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -447,9 +461,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -460,32 +475,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Enables protection. + /// The operation to create an ASR replication protected item (Enable replication). /// - /// - /// The operation to create an ASR replication protected item (Enable - /// replication). - /// /// /// Name of the fabric. /// @@ -499,27 +514,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Enable protection input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Purges protection. + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. /// - /// - /// The operation to delete or purge a replication protected item. This - /// operation will force delete the replication protected item. Use the remove - /// operation on replication protected item to perform a clean disable - /// replication for the item. - /// /// /// Fabric name. /// @@ -530,25 +539,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Replication protected item name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Updates the replication protected item settings. + /// The operation to update the recovery settings of an ASR replication protected item. /// - /// - /// The operation to update the recovery settings of an ASR replication - /// protected item. - /// /// /// Fabric name. /// @@ -562,24 +567,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Update replication protected item properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Add disk(s) for protection. - /// - /// /// Operation to add disks(s) to the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -593,25 +595,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Add disks input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> AddDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> AddDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginAddDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginAddDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Change or apply recovery point. + /// The operation to change the recovery point of a failed over replication protected item. /// - /// - /// The operation to change the recovery point of a failed over replication - /// protected item. - /// /// /// The ARM fabric name. /// @@ -625,24 +623,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// The input properties to apply recovery point. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginApplyRecoveryPointWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginApplyRecoveryPointWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute cancel failover. - /// - /// /// Operation to cancel the failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -653,24 +648,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Replication protected item name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> FailoverCancelWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> FailoverCancelWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginFailoverCancelWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginFailoverCancelWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute commit failover. - /// - /// /// Operation to commit the failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -681,24 +673,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Replication protected item name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> FailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> FailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginFailoverCommitWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginFailoverCommitWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute planned failover. - /// - /// /// Operation to initiate a planned failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -712,25 +701,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Planned failover input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> PlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> PlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginPlannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPlannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Disables protection. + /// The operation to disable replication on a replication protected item. This will also remove the item. /// - /// - /// The operation to disable replication on a replication protected item. This - /// will also remove the item. - /// /// /// Fabric name. /// @@ -744,24 +729,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Disable protection input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Removes disk(s). - /// - /// /// Operation to remove disk(s) from the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -775,25 +757,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Remove disk input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> RemoveDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RemoveDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginRemoveDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRemoveDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Resynchronize or repair replication. + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. /// - /// - /// The operation to start resynchronize/repair replication for a replication - /// protected item requiring resynchronization. - /// /// /// The name of the fabric. /// @@ -804,25 +782,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// The name of the replication protected item. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> RepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginRepairReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRepairReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute Reverse Replication\Reprotect. + /// Operation to reprotect or reverse replicate a failed over replication protected item. /// - /// - /// Operation to reprotect or reverse replicate a failed over replication - /// protected item. - /// /// /// Unique fabric name. /// @@ -836,24 +810,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Reverse replication properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginReprotectWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginReprotectWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Resolve health errors. - /// - /// /// Operation to resolve health issues of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -867,24 +838,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Disable resolve health input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ResolveHealthErrorsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ResolveHealthErrorsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginResolveHealthErrorsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginResolveHealthErrorsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute switch provider. - /// - /// /// Operation to initiate a switch provider of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -898,24 +866,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Switch provider input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> SwitchProviderWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> SwitchProviderWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginSwitchProviderWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginSwitchProviderWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute test failover. - /// - /// /// Operation to perform a test failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -929,24 +894,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Test failover input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> TestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> TestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginTestFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginTestFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute test failover cleanup. - /// - /// /// Operation to clean up the test failover of a replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -960,24 +922,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Test failover cleanup input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> TestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> TestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginTestFailoverCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginTestFailoverCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute unplanned failover. - /// - /// /// Operation to initiate a failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -991,24 +950,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Unplanned failover input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginUnplannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUnplannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Updates appliance for replication protected Item. - /// - /// /// The operation to update appliance of an ASR replication protected item. - /// + /// /// /// Fabric name. /// @@ -1022,25 +978,21 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// Update appliance replication protected item properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateApplianceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateApplianceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginUpdateApplianceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateApplianceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Update the mobility service on a protected item. + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. /// - /// - /// The operation to update(push update) the installed mobility service - /// software on a replication protected item to the latest available version. - /// /// /// The name of the fabric containing the protected item. /// @@ -1054,30 +1006,26 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// The properties of the update mobility service request. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginUpdateMobilityServiceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateMobilityServiceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Gets the list of replication protected items. - /// - /// /// Gets the list of ASR replication protected items in the vault. - /// + /// /// - /// OData parameters to apply to the operation. + /// /// /// - /// The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or - /// null. + /// The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. /// /// /// Headers that will be added to request. @@ -1085,13 +1033,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -1100,54 +1048,68 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("odataQuery", odataQuery); tracingParameters.Add("skipToken", skipToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectedItems").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (odataQuery != null) { - var _odataFilter = odataQuery.ToString(); - if (!string.IsNullOrEmpty(_odataFilter)) + var _protectedItemsQueryParameter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_protectedItemsQueryParameter)) { - _queryParameters.Add(_odataFilter); + _queryParameters.Add(_protectedItemsQueryParameter); } } - if (Client.ApiVersion != null) + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -1158,25 +1120,24 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1188,55 +1149,56 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1246,9 +1208,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1259,32 +1222,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Enables protection. + /// The operation to create an ASR replication protected item (Enable replication). /// - /// - /// The operation to create an ASR replication protected item (Enable - /// replication). - /// /// /// Name of the fabric. /// @@ -1303,13 +1266,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -1318,93 +1281,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + EnableProtectionInput input = new EnableProtectionInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1416,61 +1393,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1480,9 +1458,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1493,34 +1472,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Purges protection. + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. /// - /// - /// The operation to delete or purge a replication protected item. This - /// operation will force delete the replication protected item. Use the remove - /// operation on replication protected item to perform a clean disable - /// replication for the item. - /// /// /// Fabric name. /// @@ -1536,10 +1513,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1548,87 +1525,101 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1640,55 +1631,56 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1698,27 +1690,28 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Updates the replication protected item settings. + /// The operation to update the recovery settings of an ASR replication protected item. /// - /// - /// The operation to update the recovery settings of an ASR replication - /// protected item. - /// /// /// Fabric name. /// @@ -1737,13 +1730,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -1752,93 +1745,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + UpdateReplicationProtectedItemInput updateProtectionInput = new UpdateReplicationProtectedItemInput(); - if (properties != null) + if(properties != null) { updateProtectionInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("updateProtectionInput", updateProtectionInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1850,61 +1857,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(updateProtectionInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateProtectionInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(updateProtectionInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1914,9 +1922,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1927,31 +1936,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Add disk(s) for protection. - /// - /// /// Operation to add disks(s) to the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -1970,13 +1980,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -1985,97 +1995,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginAddDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginAddDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + AddDisksInput addDisksInput = new AddDisksInput(); - if (properties != null) + if(properties != null) { addDisksInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("addDisksInput", addDisksInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginAddDisks", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginAddDisks", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/addDisks").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2087,61 +2107,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(addDisksInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(addDisksInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(addDisksInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2151,9 +2172,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2164,32 +2186,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Change or apply recovery point. + /// The operation to change the recovery point of a failed over replication protected item. /// - /// - /// The operation to change the recovery point of a failed over replication - /// protected item. - /// /// /// The ARM fabric name. /// @@ -2208,13 +2230,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -2223,101 +2245,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + ApplyRecoveryPointInput applyRecoveryPointInput = new ApplyRecoveryPointInput(); - if (properties != null) + if(properties != null) { applyRecoveryPointInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("applyRecoveryPointInput", applyRecoveryPointInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginApplyRecoveryPoint", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginApplyRecoveryPoint", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2329,61 +2357,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(applyRecoveryPointInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(applyRecoveryPointInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(applyRecoveryPointInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2393,9 +2422,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2406,31 +2436,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute cancel failover. - /// - /// /// Operation to cancel the failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -2446,13 +2477,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -2461,87 +2492,101 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginFailoverCancelWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginFailoverCancelWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCancel", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCancel", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCancel").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2553,55 +2598,56 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2611,9 +2657,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2624,31 +2671,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute commit failover. - /// - /// /// Operation to commit the failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -2664,13 +2712,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -2679,87 +2727,101 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginFailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginFailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCommit", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCommit", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2771,55 +2833,56 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2829,9 +2892,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2842,31 +2906,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute planned failover. - /// - /// /// Operation to initiate a planned failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -2885,13 +2950,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -2900,93 +2965,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginPlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginPlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + PlannedFailoverInput failoverInput = new PlannedFailoverInput(); - if (properties != null) + if(properties != null) { failoverInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("failoverInput", failoverInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPlannedFailover", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPlannedFailover", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2998,61 +3077,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(failoverInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(failoverInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(failoverInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3062,9 +3142,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3075,32 +3156,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Disables protection. + /// The operation to disable replication on a replication protected item. This will also remove the item. /// - /// - /// The operation to disable replication on a replication protected item. This - /// will also remove the item. - /// /// /// Fabric name. /// @@ -3119,10 +3200,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3131,97 +3212,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + DisableProtectionInput disableProtectionInput = new DisableProtectionInput(); - if (properties != null) + if(properties != null) { disableProtectionInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("disableProtectionInput", disableProtectionInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3233,61 +3324,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(disableProtectionInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(disableProtectionInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(disableProtectionInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3297,26 +3389,28 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Removes disk(s). - /// - /// /// Operation to remove disk(s) from the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -3335,13 +3429,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -3350,93 +3444,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginRemoveDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginRemoveDisksWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + RemoveDisksInput removeDisksInput = new RemoveDisksInput(); - if (properties != null) + if(properties != null) { removeDisksInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("removeDisksInput", removeDisksInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRemoveDisks", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRemoveDisks", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/removeDisks").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3448,61 +3556,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(removeDisksInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(removeDisksInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(removeDisksInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3512,9 +3621,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3525,32 +3635,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Resynchronize or repair replication. + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. /// - /// - /// The operation to start resynchronize/repair replication for a replication - /// protected item requiring resynchronization. - /// /// /// The name of the fabric. /// @@ -3566,13 +3676,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -3581,87 +3691,101 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginRepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginRepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRepairReplication", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRepairReplication", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3673,55 +3797,56 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3731,9 +3856,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3744,32 +3870,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute Reverse Replication\Reprotect. + /// Operation to reprotect or reverse replicate a failed over replication protected item. /// - /// - /// Operation to reprotect or reverse replicate a failed over replication - /// protected item. - /// /// /// Unique fabric name. /// @@ -3788,13 +3914,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -3803,93 +3929,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + ReverseReplicationInput reprotectInput = new ReverseReplicationInput(); - if (properties != null) + if(properties != null) { reprotectInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("reprotectInput", reprotectInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginReprotect", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginReprotect", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3901,61 +4041,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(reprotectInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(reprotectInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(reprotectInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3965,9 +4106,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3978,31 +4120,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Resolve health errors. - /// - /// /// Operation to resolve health issues of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -4021,13 +4164,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -4036,93 +4179,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginResolveHealthErrorsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginResolveHealthErrorsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + ResolveHealthInput resolveHealthInput = new ResolveHealthInput(); - if (properties != null) + if(properties != null) { resolveHealthInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("resolveHealthInput", resolveHealthInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResolveHealthErrors", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginResolveHealthErrors", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/resolveHealthErrors").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4134,61 +4291,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(resolveHealthInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resolveHealthInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resolveHealthInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4198,9 +4356,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -4211,31 +4370,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute switch provider. - /// - /// /// Operation to initiate a switch provider of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -4254,13 +4414,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -4269,93 +4429,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginSwitchProviderWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginSwitchProviderWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + SwitchProviderInput switchProviderInput = new SwitchProviderInput(); - if (properties != null) + if(properties != null) { switchProviderInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("switchProviderInput", switchProviderInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginSwitchProvider", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginSwitchProvider", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/switchProvider").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4367,61 +4541,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(switchProviderInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(switchProviderInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(switchProviderInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4431,9 +4606,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -4444,31 +4620,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute test failover. - /// - /// /// Operation to perform a test failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -4487,13 +4664,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -4502,97 +4679,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginTestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginTestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + TestFailoverInput testfailoverInput = new TestFailoverInput(); - if (properties != null) + if(properties != null) { testfailoverInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("testfailoverInput", testfailoverInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailover", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailover", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4604,61 +4791,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(testfailoverInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(testfailoverInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(testfailoverInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4668,9 +4856,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -4681,31 +4870,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute test failover cleanup. - /// - /// /// Operation to clean up the test failover of a replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -4724,13 +4914,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -4739,101 +4929,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + TestFailoverCleanupInput cleanupInput = new TestFailoverCleanupInput(); - if (properties != null) + if(properties != null) { cleanupInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("cleanupInput", cleanupInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailoverCleanup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailoverCleanup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4845,61 +5041,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(cleanupInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(cleanupInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(cleanupInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4909,9 +5106,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -4922,31 +5120,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute unplanned failover. - /// - /// /// Operation to initiate a failover of the replication protected item. - /// + /// /// /// Unique fabric name. /// @@ -4965,13 +5164,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -4980,97 +5179,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginUnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + UnplannedFailoverInput failoverInput = new UnplannedFailoverInput(); - if (properties != null) + if(properties != null) { failoverInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("failoverInput", failoverInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUnplannedFailover", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUnplannedFailover", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5082,61 +5291,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(failoverInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(failoverInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(failoverInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5146,9 +5356,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -5159,31 +5370,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Updates appliance for replication protected Item. - /// - /// /// The operation to update appliance of an ASR replication protected item. - /// + /// /// /// Fabric name. /// @@ -5202,13 +5414,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -5217,101 +5429,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateApplianceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateApplianceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + UpdateApplianceForReplicationProtectedItemInput applianceUpdateInput = new UpdateApplianceForReplicationProtectedItemInput(); - if (properties != null) + if(properties != null) { applianceUpdateInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("applianceUpdateInput", applianceUpdateInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateAppliance", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateAppliance", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/updateAppliance").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5323,61 +5541,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(applianceUpdateInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(applianceUpdateInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(applianceUpdateInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5387,9 +5606,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -5400,32 +5620,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Update the mobility service on a protected item. + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. /// - /// - /// The operation to update(push update) the installed mobility service - /// software on a replication protected item to the latest available version. - /// /// /// The name of the fabric containing the protected item. /// @@ -5444,13 +5664,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -5459,93 +5679,107 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + UpdateMobilityServiceRequest updateMobilityServiceRequest = new UpdateMobilityServiceRequest(); - if (properties != null) + if(properties != null) { updateMobilityServiceRequest.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("updateMobilityServiceRequest", updateMobilityServiceRequest); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateMobilityService", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateMobilityService", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/updateMobilityService").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5557,61 +5791,62 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(updateMobilityServiceRequest != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateMobilityServiceRequest, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(updateMobilityServiceRequest, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5621,9 +5856,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -5634,45 +5870,45 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of Replication protected items. + /// Gets the list of ASR replication protected items in the protection container. /// - /// - /// Gets the list of ASR replication protected items in the protection - /// container. - /// /// /// The NextLink from the previous successful call to List operation. /// @@ -5682,13 +5918,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -5697,51 +5933,54 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5753,55 +5992,56 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5811,9 +6051,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -5824,31 +6065,32 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of replication protected items. - /// - /// /// Gets the list of ASR replication protected items in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -5858,13 +6100,13 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -5873,51 +6115,54 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5929,55 +6174,56 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5987,9 +6233,10 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -6000,24 +6247,28 @@ internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectedItemsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectedItemsOperationsExtensions.cs index b5cf2c6215cb..85f0eaa7ba3f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectedItemsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectedItemsOperationsExtensions.cs @@ -1,2440 +1,1903 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Azure.OData; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationProtectedItemsOperations. + /// Extension methods for ReplicationProtectedItemsOperations /// public static partial class ReplicationProtectedItemsOperationsExtensions { - /// - /// Gets the list of Replication protected items. - /// - /// - /// Gets the list of ASR replication protected items in the protection - /// container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - public static IPage ListByReplicationProtectionContainers(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName) - { - return operations.ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of Replication protected items. - /// - /// - /// Gets the list of ASR replication protected items in the protection - /// container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectionContainersAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a Replication protected item. - /// - /// - /// Gets the details of an ASR replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric unique name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - public static ReplicationProtectedItem Get(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - return operations.GetAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a Replication protected item. - /// - /// - /// Gets the details of an ASR replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric unique name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Enables protection. - /// - /// - /// The operation to create an ASR replication protected item (Enable - /// replication). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the fabric. - /// - /// - /// Protection container name. - /// - /// - /// A name for the replication protected item. - /// - /// - /// Enable protection input properties. - /// - public static ReplicationProtectedItem Create(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties)) - { - return operations.CreateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Enables protection. - /// - /// - /// The operation to create an ASR replication protected item (Enable - /// replication). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the fabric. - /// - /// - /// Protection container name. - /// - /// - /// A name for the replication protected item. - /// - /// - /// Enable protection input properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Purges protection. - /// - /// - /// The operation to delete or purge a replication protected item. This - /// operation will force delete the replication protected item. Use the remove - /// operation on replication protected item to perform a clean disable - /// replication for the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - public static void Purge(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - operations.PurgeAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Purges protection. - /// - /// - /// The operation to delete or purge a replication protected item. This - /// operation will force delete the replication protected item. Use the remove - /// operation on replication protected item to perform a clean disable - /// replication for the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// The cancellation token. - /// - public static async Task PurgeAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.PurgeWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates the replication protected item settings. - /// - /// - /// The operation to update the recovery settings of an ASR replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Update replication protected item properties. - /// - public static ReplicationProtectedItem Update(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties)) - { - return operations.UpdateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Updates the replication protected item settings. - /// - /// - /// The operation to update the recovery settings of an ASR replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Update replication protected item properties. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Add disk(s) for protection. - /// - /// - /// Operation to add disks(s) to the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Add disks input properties. - /// - public static ReplicationProtectedItem AddDisks(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties)) - { - return operations.AddDisksAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Add disk(s) for protection. - /// - /// - /// Operation to add disks(s) to the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Add disks input properties. - /// - /// - /// The cancellation token. - /// - public static async Task AddDisksAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.AddDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Change or apply recovery point. - /// - /// - /// The operation to change the recovery point of a failed over replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ARM fabric name. - /// - /// - /// The protection container name. - /// - /// - /// The replicated protected item name. - /// - /// - /// The input properties to apply recovery point. - /// - public static ReplicationProtectedItem ApplyRecoveryPoint(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) - { - return operations.ApplyRecoveryPointAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Change or apply recovery point. - /// - /// - /// The operation to change the recovery point of a failed over replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ARM fabric name. - /// - /// - /// The protection container name. - /// - /// - /// The replicated protected item name. - /// - /// - /// The input properties to apply recovery point. - /// - /// - /// The cancellation token. - /// - public static async Task ApplyRecoveryPointAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ApplyRecoveryPointWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute cancel failover. - /// - /// - /// Operation to cancel the failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - public static ReplicationProtectedItem FailoverCancel(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - return operations.FailoverCancelAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Execute cancel failover. - /// - /// - /// Operation to cancel the failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// The cancellation token. - /// - public static async Task FailoverCancelAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.FailoverCancelWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute commit failover. - /// - /// - /// Operation to commit the failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - public static ReplicationProtectedItem FailoverCommit(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - return operations.FailoverCommitAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Execute commit failover. - /// - /// - /// Operation to commit the failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// The cancellation token. - /// - public static async Task FailoverCommitAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.FailoverCommitWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute planned failover. - /// - /// - /// Operation to initiate a planned failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Planned failover input properties. - /// - public static ReplicationProtectedItem PlannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties)) - { - return operations.PlannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute planned failover. - /// - /// - /// Operation to initiate a planned failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Planned failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task PlannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PlannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Disables protection. - /// - /// - /// The operation to disable replication on a replication protected item. This - /// will also remove the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Disable protection input properties. - /// - public static void Delete(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties) - { - operations.DeleteAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Disables protection. - /// - /// - /// The operation to disable replication on a replication protected item. This - /// will also remove the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Disable protection input properties. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Removes disk(s). - /// - /// - /// Operation to remove disk(s) from the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Remove disk input properties. - /// - public static ReplicationProtectedItem RemoveDisks(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties)) - { - return operations.RemoveDisksAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Removes disk(s). - /// - /// - /// Operation to remove disk(s) from the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Remove disk input properties. - /// - /// - /// The cancellation token. - /// - public static async Task RemoveDisksAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RemoveDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Resynchronize or repair replication. - /// - /// - /// The operation to start resynchronize/repair replication for a replication - /// protected item requiring resynchronization. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric. - /// - /// - /// The name of the container. - /// - /// - /// The name of the replication protected item. - /// - public static ReplicationProtectedItem RepairReplication(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - return operations.RepairReplicationAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Resynchronize or repair replication. - /// - /// - /// The operation to start resynchronize/repair replication for a replication - /// protected item requiring resynchronization. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric. - /// - /// - /// The name of the container. - /// - /// - /// The name of the replication protected item. - /// - /// - /// The cancellation token. - /// - public static async Task RepairReplicationAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RepairReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute Reverse Replication\Reprotect. - /// - /// - /// Operation to reprotect or reverse replicate a failed over replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Reverse replication properties. - /// - public static ReplicationProtectedItem Reprotect(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties)) - { - return operations.ReprotectAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute Reverse Replication\Reprotect. - /// - /// - /// Operation to reprotect or reverse replicate a failed over replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Reverse replication properties. - /// - /// - /// The cancellation token. - /// - public static async Task ReprotectAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ReprotectWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Resolve health errors. - /// - /// - /// Operation to resolve health issues of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Disable resolve health input properties. - /// - public static ReplicationProtectedItem ResolveHealthErrors(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties)) - { - return operations.ResolveHealthErrorsAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Resolve health errors. - /// - /// - /// Operation to resolve health issues of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Disable resolve health input properties. - /// - /// - /// The cancellation token. - /// - public static async Task ResolveHealthErrorsAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ResolveHealthErrorsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute switch provider. - /// - /// - /// Operation to initiate a switch provider of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Switch provider input properties. - /// - public static ReplicationProtectedItem SwitchProvider(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties)) - { - return operations.SwitchProviderAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute switch provider. - /// - /// - /// Operation to initiate a switch provider of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Switch provider input properties. - /// - /// - /// The cancellation token. - /// - public static async Task SwitchProviderAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.SwitchProviderWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute test failover. - /// - /// - /// Operation to perform a test failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Test failover input properties. - /// - public static ReplicationProtectedItem TestFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties) - { - return operations.TestFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute test failover. - /// - /// - /// Operation to perform a test failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Test failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task TestFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.TestFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute test failover cleanup. - /// - /// - /// Operation to clean up the test failover of a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Test failover cleanup input properties. - /// - public static ReplicationProtectedItem TestFailoverCleanup(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) - { - return operations.TestFailoverCleanupAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute test failover cleanup. - /// - /// - /// Operation to clean up the test failover of a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Test failover cleanup input properties. - /// - /// - /// The cancellation token. - /// - public static async Task TestFailoverCleanupAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.TestFailoverCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute unplanned failover. - /// - /// - /// Operation to initiate a failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Unplanned failover input properties. - /// - public static ReplicationProtectedItem UnplannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties) - { - return operations.UnplannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute unplanned failover. - /// - /// - /// Operation to initiate a failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Unplanned failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task UnplannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UnplannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates appliance for replication protected Item. - /// - /// - /// The operation to update appliance of an ASR replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Update appliance replication protected item properties. - /// - public static ReplicationProtectedItem UpdateAppliance(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties) - { - return operations.UpdateApplianceAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Updates appliance for replication protected Item. - /// - /// - /// The operation to update appliance of an ASR replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Update appliance replication protected item properties. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateApplianceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateApplianceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Update the mobility service on a protected item. - /// - /// - /// The operation to update(push update) the installed mobility service - /// software on a replication protected item to the latest available version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric containing the protected item. - /// - /// - /// The name of the container containing the protected item. - /// - /// - /// The name of the protected item on which the agent is to be updated. - /// - /// - /// The properties of the update mobility service request. - /// - public static ReplicationProtectedItem UpdateMobilityService(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties)) - { - return operations.UpdateMobilityServiceAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Update the mobility service on a protected item. - /// - /// - /// The operation to update(push update) the installed mobility service - /// software on a replication protected item to the latest available version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric containing the protected item. - /// - /// - /// The name of the container containing the protected item. - /// - /// - /// The name of the protected item on which the agent is to be updated. - /// - /// - /// The properties of the update mobility service request. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateMobilityServiceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateMobilityServiceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of replication protected items. - /// - /// - /// Gets the list of ASR replication protected items in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or - /// null. - /// - public static IPage List(this IReplicationProtectedItemsOperations operations, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) - { - return operations.ListAsync(odataQuery, skipToken).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of replication protected items. - /// - /// - /// Gets the list of ASR replication protected items in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// OData parameters to apply to the operation. - /// - /// - /// The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or - /// null. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationProtectedItemsOperations operations, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Enables protection. - /// - /// - /// The operation to create an ASR replication protected item (Enable - /// replication). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the fabric. - /// - /// - /// Protection container name. - /// - /// - /// A name for the replication protected item. - /// - /// - /// Enable protection input properties. - /// - public static ReplicationProtectedItem BeginCreate(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties)) - { - return operations.BeginCreateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Enables protection. - /// - /// - /// The operation to create an ASR replication protected item (Enable - /// replication). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the fabric. - /// - /// - /// Protection container name. - /// - /// - /// A name for the replication protected item. - /// - /// - /// Enable protection input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Purges protection. - /// - /// - /// The operation to delete or purge a replication protected item. This - /// operation will force delete the replication protected item. Use the remove - /// operation on replication protected item to perform a clean disable - /// replication for the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - public static void BeginPurge(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - operations.BeginPurgeAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Purges protection. - /// - /// - /// The operation to delete or purge a replication protected item. This - /// operation will force delete the replication protected item. Use the remove - /// operation on replication protected item to perform a clean disable - /// replication for the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginPurgeAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates the replication protected item settings. - /// - /// - /// The operation to update the recovery settings of an ASR replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Update replication protected item properties. - /// - public static ReplicationProtectedItem BeginUpdate(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties)) - { - return operations.BeginUpdateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Updates the replication protected item settings. - /// - /// - /// The operation to update the recovery settings of an ASR replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Update replication protected item properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Add disk(s) for protection. - /// - /// - /// Operation to add disks(s) to the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Add disks input properties. - /// - public static ReplicationProtectedItem BeginAddDisks(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties)) - { - return operations.BeginAddDisksAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Add disk(s) for protection. - /// - /// - /// Operation to add disks(s) to the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Add disks input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginAddDisksAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginAddDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Change or apply recovery point. - /// - /// - /// The operation to change the recovery point of a failed over replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ARM fabric name. - /// - /// - /// The protection container name. - /// - /// - /// The replicated protected item name. - /// - /// - /// The input properties to apply recovery point. - /// - public static ReplicationProtectedItem BeginApplyRecoveryPoint(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) - { - return operations.BeginApplyRecoveryPointAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Change or apply recovery point. - /// - /// - /// The operation to change the recovery point of a failed over replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The ARM fabric name. - /// - /// - /// The protection container name. - /// - /// - /// The replicated protected item name. - /// - /// - /// The input properties to apply recovery point. - /// - /// - /// The cancellation token. - /// - public static async Task BeginApplyRecoveryPointAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginApplyRecoveryPointWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute cancel failover. - /// - /// - /// Operation to cancel the failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - public static ReplicationProtectedItem BeginFailoverCancel(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - return operations.BeginFailoverCancelAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Execute cancel failover. - /// - /// - /// Operation to cancel the failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginFailoverCancelAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginFailoverCancelWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute commit failover. - /// - /// - /// Operation to commit the failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - public static ReplicationProtectedItem BeginFailoverCommit(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - return operations.BeginFailoverCommitAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Execute commit failover. - /// - /// - /// Operation to commit the failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginFailoverCommitAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginFailoverCommitWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute planned failover. - /// - /// - /// Operation to initiate a planned failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Planned failover input properties. - /// - public static ReplicationProtectedItem BeginPlannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties)) - { - return operations.BeginPlannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute planned failover. - /// - /// - /// Operation to initiate a planned failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Planned failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginPlannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginPlannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Disables protection. - /// - /// - /// The operation to disable replication on a replication protected item. This - /// will also remove the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Disable protection input properties. - /// - public static void BeginDelete(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties) - { - operations.BeginDeleteAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Disables protection. - /// - /// - /// The operation to disable replication on a replication protected item. This - /// will also remove the item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Disable protection input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Removes disk(s). - /// - /// - /// Operation to remove disk(s) from the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Remove disk input properties. - /// - public static ReplicationProtectedItem BeginRemoveDisks(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties)) - { - return operations.BeginRemoveDisksAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Removes disk(s). - /// - /// - /// Operation to remove disk(s) from the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Remove disk input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRemoveDisksAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginRemoveDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Resynchronize or repair replication. - /// - /// - /// The operation to start resynchronize/repair replication for a replication - /// protected item requiring resynchronization. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric. - /// - /// - /// The name of the container. - /// - /// - /// The name of the replication protected item. - /// - public static ReplicationProtectedItem BeginRepairReplication(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - return operations.BeginRepairReplicationAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } - - /// - /// Resynchronize or repair replication. - /// - /// - /// The operation to start resynchronize/repair replication for a replication - /// protected item requiring resynchronization. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric. - /// - /// - /// The name of the container. - /// - /// - /// The name of the replication protected item. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRepairReplicationAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginRepairReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute Reverse Replication\Reprotect. - /// - /// - /// Operation to reprotect or reverse replicate a failed over replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Reverse replication properties. - /// - public static ReplicationProtectedItem BeginReprotect(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties)) - { - return operations.BeginReprotectAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute Reverse Replication\Reprotect. - /// - /// - /// Operation to reprotect or reverse replicate a failed over replication - /// protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Reverse replication properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginReprotectAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginReprotectWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Resolve health errors. - /// - /// - /// Operation to resolve health issues of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Disable resolve health input properties. - /// - public static ReplicationProtectedItem BeginResolveHealthErrors(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties)) - { - return operations.BeginResolveHealthErrorsAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Resolve health errors. - /// - /// - /// Operation to resolve health issues of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Disable resolve health input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginResolveHealthErrorsAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginResolveHealthErrorsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute switch provider. - /// - /// - /// Operation to initiate a switch provider of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Switch provider input properties. - /// - public static ReplicationProtectedItem BeginSwitchProvider(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties)) - { - return operations.BeginSwitchProviderAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute switch provider. - /// - /// - /// Operation to initiate a switch provider of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Switch provider input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginSwitchProviderAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginSwitchProviderWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute test failover. - /// - /// - /// Operation to perform a test failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Test failover input properties. - /// - public static ReplicationProtectedItem BeginTestFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties) - { - return operations.BeginTestFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute test failover. - /// - /// - /// Operation to perform a test failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Test failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginTestFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginTestFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute test failover cleanup. - /// - /// - /// Operation to clean up the test failover of a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Test failover cleanup input properties. - /// - public static ReplicationProtectedItem BeginTestFailoverCleanup(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) - { - return operations.BeginTestFailoverCleanupAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute test failover cleanup. - /// - /// - /// Operation to clean up the test failover of a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Test failover cleanup input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginTestFailoverCleanupAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginTestFailoverCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute unplanned failover. - /// - /// - /// Operation to initiate a failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Unplanned failover input properties. - /// - public static ReplicationProtectedItem BeginUnplannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties) - { - return operations.BeginUnplannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute unplanned failover. - /// - /// - /// Operation to initiate a failover of the replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Unplanned failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUnplannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUnplannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates appliance for replication protected Item. - /// - /// - /// The operation to update appliance of an ASR replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Update appliance replication protected item properties. - /// - public static ReplicationProtectedItem BeginUpdateAppliance(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties) - { - return operations.BeginUpdateApplianceAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Updates appliance for replication protected Item. - /// - /// - /// The operation to update appliance of an ASR replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// Update appliance replication protected item properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateApplianceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateApplianceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Update the mobility service on a protected item. - /// - /// - /// The operation to update(push update) the installed mobility service - /// software on a replication protected item to the latest available version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric containing the protected item. - /// - /// - /// The name of the container containing the protected item. - /// - /// - /// The name of the protected item on which the agent is to be updated. - /// - /// - /// The properties of the update mobility service request. - /// - public static ReplicationProtectedItem BeginUpdateMobilityService(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties)) - { - return operations.BeginUpdateMobilityServiceAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); - } - - /// - /// Update the mobility service on a protected item. - /// - /// - /// The operation to update(push update) the installed mobility service - /// software on a replication protected item to the latest available version. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric containing the protected item. - /// - /// - /// The name of the container containing the protected item. - /// - /// - /// The name of the protected item on which the agent is to be updated. - /// - /// - /// The properties of the update mobility service request. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateMobilityServiceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateMobilityServiceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of Replication protected items. - /// - /// - /// Gets the list of ASR replication protected items in the protection - /// container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationProtectionContainersNext(this IReplicationProtectedItemsOperations operations, string nextPageLink) - { - return operations.ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of Replication protected items. - /// - /// - /// Gets the list of ASR replication protected items in the protection - /// container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectionContainersNextAsync(this IReplicationProtectedItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of replication protected items. - /// - /// - /// Gets the list of ASR replication protected items in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationProtectedItemsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of replication protected items. - /// - /// - /// Gets the list of ASR replication protected items in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationProtectedItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + /// + /// Gets the list of ASR replication protected items in the protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectionContainers(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName) + { + return ((IReplicationProtectedItemsOperations)operations).ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of ASR replication protected items in the protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectionContainersAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the details of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem Get(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return ((IReplicationProtectedItemsOperations)operations).GetAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to create an ASR replication protected item (Enable replication). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + public static ReplicationProtectedItem Create(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).CreateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to create an ASR replication protected item (Enable replication). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static void Purge(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + ((IReplicationProtectedItemsOperations)operations).PurgeAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PurgeAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.PurgeWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update the recovery settings of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem Update(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).UpdateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to update the recovery settings of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to add disks(s) to the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem AddDisks(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).AddDisksAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to add disks(s) to the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task AddDisksAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.AddDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to change the recovery point of a failed over replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item name. + /// + public static ReplicationProtectedItem ApplyRecoveryPoint(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).ApplyRecoveryPointAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to change the recovery point of a failed over replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ApplyRecoveryPointAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ApplyRecoveryPointWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to cancel the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem FailoverCancel(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return ((IReplicationProtectedItemsOperations)operations).FailoverCancelAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Operation to cancel the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task FailoverCancelAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.FailoverCancelWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem FailoverCommit(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return ((IReplicationProtectedItemsOperations)operations).FailoverCommitAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task FailoverCommitAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.FailoverCommitWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem PlannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).PlannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PlannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PlannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to disable replication on a replication protected item. This will also remove the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static void Delete(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties) + { + ((IReplicationProtectedItemsOperations)operations).DeleteAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to disable replication on a replication protected item. This will also remove the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Operation to remove disk(s) from the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem RemoveDisks(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).RemoveDisksAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to remove disk(s) from the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RemoveDisksAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RemoveDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + public static ReplicationProtectedItem RepairReplication(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return ((IReplicationProtectedItemsOperations)operations).RepairReplicationAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RepairReplicationAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RepairReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to reprotect or reverse replicate a failed over replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem Reprotect(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).ReprotectAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to reprotect or reverse replicate a failed over replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ReprotectAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ReprotectWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to resolve health issues of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem ResolveHealthErrors(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).ResolveHealthErrorsAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to resolve health issues of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ResolveHealthErrorsAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ResolveHealthErrorsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to initiate a switch provider of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem SwitchProvider(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).SwitchProviderAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to initiate a switch provider of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task SwitchProviderAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.SwitchProviderWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem TestFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).TestFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TestFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.TestFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem TestFailoverCleanup(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).TestFailoverCleanupAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TestFailoverCleanupAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.TestFailoverCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem UnplannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).UnplannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UnplannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UnplannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to update appliance of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem UpdateAppliance(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).UpdateApplianceAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to update appliance of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateApplianceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateApplianceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the protected item. + /// + /// + /// The name of the protected item on which the agent is to be updated. + /// + public static ReplicationProtectedItem UpdateMobilityService(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).UpdateMobilityServiceAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the protected item. + /// + /// + /// The name of the protected item on which the agent is to be updated. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateMobilityServiceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateMobilityServiceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationProtectedItemsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string)) + { + return ((IReplicationProtectedItemsOperations)operations).ListAsync(odataQuery, skipToken).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationProtectedItemsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), string skipToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to create an ASR replication protected item (Enable replication). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + public static ReplicationProtectedItem BeginCreate(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).BeginCreateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to create an ASR replication protected item (Enable replication). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInputProperties properties = default(EnableProtectionInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static void BeginPurge(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + ((IReplicationProtectedItemsOperations)operations).BeginPurgeAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// The operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPurgeAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update the recovery settings of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginUpdate(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).BeginUpdateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to update the recovery settings of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to add disks(s) to the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginAddDisks(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).BeginAddDisksAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to add disks(s) to the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginAddDisksAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, AddDisksInputProperties properties = default(AddDisksInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginAddDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to change the recovery point of a failed over replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item name. + /// + public static ReplicationProtectedItem BeginApplyRecoveryPoint(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).BeginApplyRecoveryPointAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to change the recovery point of a failed over replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginApplyRecoveryPointAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginApplyRecoveryPointWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to cancel the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginFailoverCancel(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return ((IReplicationProtectedItemsOperations)operations).BeginFailoverCancelAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Operation to cancel the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginFailoverCancelAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginFailoverCancelWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginFailoverCommit(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return ((IReplicationProtectedItemsOperations)operations).BeginFailoverCommitAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginFailoverCommitAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginFailoverCommitWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginPlannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).BeginPlannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPlannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginPlannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to disable replication on a replication protected item. This will also remove the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static void BeginDelete(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties) + { + ((IReplicationProtectedItemsOperations)operations).BeginDeleteAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to disable replication on a replication protected item. This will also remove the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Operation to remove disk(s) from the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginRemoveDisks(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).BeginRemoveDisksAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to remove disk(s) from the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRemoveDisksAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, RemoveDisksInputProperties properties = default(RemoveDisksInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRemoveDisksWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + public static ReplicationProtectedItem BeginRepairReplication(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return ((IReplicationProtectedItemsOperations)operations).BeginRepairReplicationAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRepairReplicationAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRepairReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to reprotect or reverse replicate a failed over replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginReprotect(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).BeginReprotectAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to reprotect or reverse replicate a failed over replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginReprotectAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginReprotectWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to resolve health issues of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginResolveHealthErrors(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).BeginResolveHealthErrorsAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to resolve health issues of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginResolveHealthErrorsAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ResolveHealthInputProperties properties = default(ResolveHealthInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginResolveHealthErrorsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to initiate a switch provider of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginSwitchProvider(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).BeginSwitchProviderAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to initiate a switch provider of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginSwitchProviderAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, SwitchProviderInputProperties properties = default(SwitchProviderInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginSwitchProviderWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginTestFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).BeginTestFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginTestFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginTestFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginTestFailoverCleanup(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).BeginTestFailoverCleanupAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginTestFailoverCleanupAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginTestFailoverCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginUnplannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).BeginUnplannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUnplannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUnplannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to update appliance of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginUpdateAppliance(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties) + { + return ((IReplicationProtectedItemsOperations)operations).BeginUpdateApplianceAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to update appliance of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateApplianceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateApplianceForReplicationProtectedItemInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateApplianceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the protected item. + /// + /// + /// The name of the protected item on which the agent is to be updated. + /// + public static ReplicationProtectedItem BeginUpdateMobilityService(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties)) + { + return ((IReplicationProtectedItemsOperations)operations).BeginUpdateMobilityServiceAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the protected item. + /// + /// + /// The name of the protected item on which the agent is to be updated. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateMobilityServiceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateMobilityServiceWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the list of ASR replication protected items in the protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectionContainersNext(this IReplicationProtectedItemsOperations operations, string nextPageLink) + { + return ((IReplicationProtectedItemsOperations)operations).ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of ASR replication protected items in the protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectionContainersNextAsync(this IReplicationProtectedItemsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationProtectedItemsOperations operations, string nextPageLink) + { + return ((IReplicationProtectedItemsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationProtectedItemsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainerMappingsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainerMappingsOperations.cs index 060602f357ad..f8ca2813c8fc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainerMappingsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainerMappingsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationProtectionContainerMappingsOperations operations. /// - internal partial class ReplicationProtectionContainerMappingsOperations : IServiceOperations, IReplicationProtectionContainerMappingsOperations + internal partial class ReplicationProtectionContainerMappingsOperations : Microsoft.Rest.IServiceOperations, IReplicationProtectionContainerMappingsOperations { /// /// Initializes a new instance of the ReplicationProtectionContainerMappingsOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationProtectionContainerMappingsOperations : IServi /// /// Thrown when a required parameter is null /// - internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagementClient client) + internal ReplicationProtectionContainerMappingsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of protection container mappings for a protection container. - /// - /// /// Lists the protection container mappings for a protection container. - /// + /// /// /// Fabric name. /// @@ -68,13 +53,13 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// 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 /// /// @@ -83,81 +68,94 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -169,55 +167,56 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -227,9 +226,10 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -240,31 +240,32 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a protection container mapping. - /// - /// /// Gets the details of a protection container mapping. - /// + /// /// /// Fabric name. /// @@ -280,13 +281,13 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// 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 /// /// @@ -295,87 +296,101 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (mappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "mappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "mappingName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("mappingName", mappingName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{mappingName}", System.Uri.EscapeDataString(mappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -387,55 +402,56 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -445,9 +461,10 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -458,31 +475,32 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Create protection container mapping. - /// - /// /// The operation to create a protection container mapping. - /// + /// /// /// Fabric name. /// @@ -496,24 +514,21 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// Configure protection input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Purge protection container mapping. - /// - /// /// The operation to purge(force delete) a protection container mapping. - /// + /// /// /// Fabric name. /// @@ -524,24 +539,21 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// Protection container mapping name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Update protection container mapping. - /// - /// /// The operation to update protection container mapping. - /// + /// /// /// Fabric name. /// @@ -555,24 +567,21 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// Update protection container mapping input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Remove protection container mapping. - /// - /// /// The operation to delete or remove a protection container mapping. - /// + /// /// /// Fabric name. /// @@ -586,37 +595,34 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// Configure protection input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Gets the list of all protection container mappings in a vault. - /// - /// /// Lists the protection container mappings in the 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 /// /// @@ -625,69 +631,80 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainerMappings").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -699,55 +716,56 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -757,9 +775,10 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -770,31 +789,32 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Create protection container mapping. - /// - /// /// The operation to create a protection container mapping. - /// + /// /// /// Fabric name. /// @@ -813,13 +833,13 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// 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 /// /// @@ -828,93 +848,107 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (mappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "mappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "mappingName"); } + CreateProtectionContainerMappingInput creationInput = new CreateProtectionContainerMappingInput(); - if (properties != null) + if(properties != null) { creationInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("mappingName", mappingName); + tracingParameters.Add("creationInput", creationInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{mappingName}", System.Uri.EscapeDataString(mappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -926,61 +960,62 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(creationInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(creationInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(creationInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -990,9 +1025,10 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1003,31 +1039,32 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Purge protection container mapping. - /// - /// /// The operation to purge(force delete) a protection container mapping. - /// + /// /// /// Fabric name. /// @@ -1043,10 +1080,10 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1055,87 +1092,101 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// A response object containing the response body and response headers. /// - public async Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (mappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "mappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "mappingName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("mappingName", mappingName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{mappingName}", System.Uri.EscapeDataString(mappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1147,55 +1198,56 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1205,26 +1257,28 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Update protection container mapping. - /// - /// /// The operation to update protection container mapping. - /// + /// /// /// Fabric name. /// @@ -1243,13 +1297,13 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// 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 /// /// @@ -1258,93 +1312,107 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (mappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "mappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "mappingName"); } + UpdateProtectionContainerMappingInput updateInput = new UpdateProtectionContainerMappingInput(); - if (properties != null) + if(properties != null) { updateInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("mappingName", mappingName); + tracingParameters.Add("updateInput", updateInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{mappingName}", System.Uri.EscapeDataString(mappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1356,61 +1424,62 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(updateInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(updateInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1420,9 +1489,10 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1433,31 +1503,32 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Remove protection container mapping. - /// - /// /// The operation to delete or remove a protection container mapping. - /// + /// /// /// Fabric name. /// @@ -1476,10 +1547,10 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1488,93 +1559,107 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (mappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "mappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "mappingName"); } + RemoveProtectionContainerMappingInput removalInput = new RemoveProtectionContainerMappingInput(); - if (properties != null) + if(properties != null) { removalInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("mappingName", mappingName); + tracingParameters.Add("removalInput", removalInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{mappingName}", System.Uri.EscapeDataString(mappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1586,61 +1671,62 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(removalInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(removalInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(removalInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1650,26 +1736,28 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of protection container mappings for a protection container. - /// - /// /// Lists the protection container mappings for a protection container. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1679,13 +1767,13 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// 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 /// /// @@ -1694,51 +1782,54 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1750,55 +1841,56 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1808,9 +1900,10 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1821,31 +1914,32 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of all protection container mappings in a vault. - /// - /// /// Lists the protection container mappings in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1855,13 +1949,13 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// 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 /// /// @@ -1870,51 +1964,54 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1926,55 +2023,56 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1984,9 +2082,10 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1997,24 +2096,28 @@ internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagement _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainerMappingsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainerMappingsOperationsExtensions.cs index 062c5f180089..4f4751874f49 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainerMappingsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainerMappingsOperationsExtensions.cs @@ -1,677 +1,541 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationProtectionContainerMappingsOperations. + /// Extension methods for ReplicationProtectionContainerMappingsOperations /// public static partial class ReplicationProtectionContainerMappingsOperationsExtensions { - /// - /// Gets the list of protection container mappings for a protection container. - /// - /// - /// Lists the protection container mappings for a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - public static IPage ListByReplicationProtectionContainers(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName) - { - return operations.ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of protection container mappings for a protection container. - /// - /// - /// Lists the protection container mappings for a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectionContainersAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a protection container mapping. - /// - /// - /// Gets the details of a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection Container mapping name. - /// - public static ProtectionContainerMapping Get(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName) - { - return operations.GetAsync(fabricName, protectionContainerName, mappingName).GetAwaiter().GetResult(); - } - - /// - /// Gets a protection container mapping. - /// - /// - /// Gets the details of a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection Container mapping name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create protection container mapping. - /// - /// - /// The operation to create a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Configure protection input properties. - /// - public static ProtectionContainerMapping Create(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties)) - { - return operations.CreateAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); - } - - /// - /// Create protection container mapping. - /// - /// - /// The operation to create a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Configure protection input properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Purge protection container mapping. - /// - /// - /// The operation to purge(force delete) a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - public static void Purge(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName) - { - operations.PurgeAsync(fabricName, protectionContainerName, mappingName).GetAwaiter().GetResult(); - } - - /// - /// Purge protection container mapping. - /// - /// - /// The operation to purge(force delete) a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// The cancellation token. - /// - public static async Task PurgeAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.PurgeWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectionContainers(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName) + { + return ((IReplicationProtectionContainerMappingsOperations)operations).ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } - /// - /// Update protection container mapping. - /// - /// - /// The operation to update protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Update protection container mapping input properties. - /// - public static ProtectionContainerMapping Update(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties)) + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectionContainersAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) { - return operations.UpdateAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection Container mapping name. + /// + public static ProtectionContainerMapping Get(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName) + { + return ((IReplicationProtectionContainerMappingsOperations)operations).GetAsync(fabricName, protectionContainerName, mappingName).GetAwaiter().GetResult(); + } - /// - /// Update protection container mapping. - /// - /// - /// The operation to update protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Update protection container mapping input properties. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection Container mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static ProtectionContainerMapping Create(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties)) + { + return ((IReplicationProtectionContainerMappingsOperations)operations).CreateAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Remove protection container mapping. - /// - /// - /// The operation to delete or remove a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Configure protection input properties. - /// - public static void Delete(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties)) + /// + /// The operation to create a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - operations.DeleteAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to purge(force delete) a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static void Purge(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName) + { + ((IReplicationProtectionContainerMappingsOperations)operations).PurgeAsync(fabricName, protectionContainerName, mappingName).GetAwaiter().GetResult(); + } - /// - /// Remove protection container mapping. - /// - /// - /// The operation to delete or remove a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Configure protection input properties. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the list of all protection container mappings in a vault. - /// - /// - /// Lists the protection container mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationProtectionContainerMappingsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets the list of all protection container mappings in a vault. - /// - /// - /// Lists the protection container mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationProtectionContainerMappingsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create protection container mapping. - /// - /// - /// The operation to create a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Configure protection input properties. - /// - public static ProtectionContainerMapping BeginCreate(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties)) - { - return operations.BeginCreateAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); - } - - /// - /// Create protection container mapping. - /// - /// - /// The operation to create a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Configure protection input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Purge protection container mapping. - /// - /// - /// The operation to purge(force delete) a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - public static void BeginPurge(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName) - { - operations.BeginPurgeAsync(fabricName, protectionContainerName, mappingName).GetAwaiter().GetResult(); - } + /// + /// The operation to purge(force delete) a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PurgeAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.PurgeWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static ProtectionContainerMapping Update(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties)) + { + return ((IReplicationProtectionContainerMappingsOperations)operations).UpdateAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Purge protection container mapping. - /// - /// - /// The operation to purge(force delete) a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginPurgeAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to update protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static void Delete(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties)) + { + ((IReplicationProtectionContainerMappingsOperations)operations).DeleteAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Update protection container mapping. - /// - /// - /// The operation to update protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Update protection container mapping input properties. - /// - public static ProtectionContainerMapping BeginUpdate(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties)) - { - return operations.BeginUpdateAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); - } + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationProtectionContainerMappingsOperations operations) + { + return ((IReplicationProtectionContainerMappingsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Update protection container mapping. - /// - /// - /// The operation to update protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Update protection container mapping input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationProtectionContainerMappingsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static ProtectionContainerMapping BeginCreate(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties)) + { + return ((IReplicationProtectionContainerMappingsOperations)operations).BeginCreateAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Remove protection container mapping. - /// - /// - /// The operation to delete or remove a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Configure protection input properties. - /// - public static void BeginDelete(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties)) + /// + /// The operation to create a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - operations.BeginDeleteAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to purge(force delete) a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static void BeginPurge(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName) + { + ((IReplicationProtectionContainerMappingsOperations)operations).BeginPurgeAsync(fabricName, protectionContainerName, mappingName).GetAwaiter().GetResult(); + } - /// - /// Remove protection container mapping. - /// - /// - /// The operation to delete or remove a protection container mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Protection container mapping name. - /// - /// - /// Configure protection input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// The operation to purge(force delete) a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPurgeAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static ProtectionContainerMapping BeginUpdate(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties)) + { + return ((IReplicationProtectionContainerMappingsOperations)operations).BeginUpdateAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets the list of protection container mappings for a protection container. - /// - /// - /// Lists the protection container mappings for a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationProtectionContainersNext(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink) + /// + /// The operation to update protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, UpdateProtectionContainerMappingInputProperties properties = default(UpdateProtectionContainerMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static void BeginDelete(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties)) + { + ((IReplicationProtectionContainerMappingsOperations)operations).BeginDeleteAsync(fabricName, protectionContainerName, mappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets the list of protection container mappings for a protection container. - /// - /// - /// Lists the protection container mappings for a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectionContainersNextAsync(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, properties, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectionContainersNext(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink) + { + return ((IReplicationProtectionContainerMappingsOperations)operations).ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of all protection container mappings in a vault. - /// - /// - /// Lists the protection container mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink) + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectionContainersNextAsync(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink) + { + return ((IReplicationProtectionContainerMappingsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of all protection container mappings in a vault. - /// - /// - /// Lists the protection container mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainersOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainersOperations.cs index c2e0f0ea1342..af20b04b7b67 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainersOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationProtectionContainersOperations operations. /// - internal partial class ReplicationProtectionContainersOperations : IServiceOperations, IReplicationProtectionContainersOperations + internal partial class ReplicationProtectionContainersOperations : Microsoft.Rest.IServiceOperations, IReplicationProtectionContainersOperations { /// /// Initializes a new instance of the ReplicationProtectionContainersOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationProtectionContainersOperations : IServiceOpera /// /// Thrown when a required parameter is null /// - internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient client) + internal ReplicationProtectionContainersOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of protection container for a fabric. - /// - /// /// Lists the protection containers in the specified fabric. - /// + /// /// /// Fabric name. /// @@ -65,13 +50,13 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// 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 /// /// @@ -80,75 +65,87 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,55 +157,56 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -218,9 +216,10 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -231,31 +230,32 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the protection container details. - /// - /// /// Gets the details of a protection container. - /// + /// /// /// Fabric name. /// @@ -268,13 +268,13 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// 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 /// /// @@ -283,81 +283,94 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -369,55 +382,56 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -427,9 +441,10 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -440,31 +455,32 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Create a protection container. - /// - /// /// Operation to create a protection container. - /// + /// /// /// Unique fabric ARM name. /// @@ -475,25 +491,21 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// Create protection container input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Adds a protectable item to the replication protection container. + /// The operation to a add a protectable item to a protection container(Add physical server). /// - /// - /// The operation to a add a protectable item to a protection container(Add - /// physical server). - /// /// /// The name of the fabric. /// @@ -504,24 +516,21 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// The properties of a discover protectable item request. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> DiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> DiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Removes a protection container. - /// - /// /// Operation to remove a protection container. - /// + /// /// /// Unique fabric ARM name. /// @@ -529,26 +538,21 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// Unique protection container ARM name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Switches protection from one container to another or one replication - /// provider to another. + /// Operation to switch protection from one container to another or one replication provider to another. /// - /// - /// Operation to switch protection from one container to another or one - /// replication provider to another. - /// /// /// Unique fabric name. /// @@ -559,37 +563,34 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// Switch protection properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> SwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> SwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginSwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginSwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Gets the list of all protection containers in a vault. - /// - /// /// Lists the protection containers in a 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 /// /// @@ -598,69 +599,80 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainers").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -672,55 +684,56 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -730,9 +743,10 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -743,31 +757,32 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Create a protection container. - /// - /// /// Operation to create a protection container. - /// + /// /// /// Unique fabric ARM name. /// @@ -783,13 +798,13 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// 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 /// /// @@ -798,87 +813,100 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + CreateProtectionContainerInput creationInput = new CreateProtectionContainerInput(); - if (properties != null) + if(properties != null) { creationInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("creationInput", creationInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -890,61 +918,62 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(creationInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(creationInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(creationInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -954,9 +983,10 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -967,32 +997,32 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Adds a protectable item to the replication protection container. + /// The operation to a add a protectable item to a protection container(Add physical server). /// - /// - /// The operation to a add a protectable item to a protection container(Add - /// physical server). - /// /// /// The name of the fabric. /// @@ -1008,13 +1038,13 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// 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 /// /// @@ -1023,87 +1053,100 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// A response object containing the response body and response headers. /// - public async Task> BeginDiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginDiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + DiscoverProtectableItemRequest discoverProtectableItemRequest = new DiscoverProtectableItemRequest(); - if (properties != null) + if(properties != null) { discoverProtectableItemRequest.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("discoverProtectableItemRequest", discoverProtectableItemRequest); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDiscoverProtectableItem", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDiscoverProtectableItem", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1115,61 +1158,62 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(discoverProtectableItemRequest != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(discoverProtectableItemRequest, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(discoverProtectableItemRequest, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1179,9 +1223,10 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1192,31 +1237,32 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Removes a protection container. - /// - /// /// Operation to remove a protection container. - /// + /// /// /// Unique fabric ARM name. /// @@ -1229,10 +1275,10 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1241,81 +1287,94 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1327,55 +1386,56 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1385,28 +1445,28 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Switches protection from one container to another or one replication - /// provider to another. + /// Operation to switch protection from one container to another or one replication provider to another. /// - /// - /// Operation to switch protection from one container to another or one - /// replication provider to another. - /// /// /// Unique fabric name. /// @@ -1422,13 +1482,13 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// 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 /// /// @@ -1437,87 +1497,100 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// A response object containing the response body and response headers. /// - public async Task> BeginSwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginSwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + SwitchProtectionInput switchInput = new SwitchProtectionInput(); - if (properties != null) + if(properties != null) { switchInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("switchInput", switchInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginSwitchProtection", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginSwitchProtection", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1529,61 +1602,62 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(switchInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(switchInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(switchInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1593,9 +1667,10 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1606,31 +1681,32 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of protection container for a fabric. - /// - /// /// Lists the protection containers in the specified fabric. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1640,13 +1716,13 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// 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 /// /// @@ -1655,51 +1731,54 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1711,55 +1790,56 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1769,9 +1849,10 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1782,31 +1863,32 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of all protection containers in a vault. - /// - /// /// Lists the protection containers in a vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1816,13 +1898,13 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// 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 /// /// @@ -1831,51 +1913,54 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1887,55 +1972,56 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1945,9 +2031,10 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1958,24 +2045,28 @@ internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainersOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainersOperationsExtensions.cs index b552ce2dc496..38a6377b9791 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainersOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionContainersOperationsExtensions.cs @@ -1,635 +1,487 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationProtectionContainersOperations. + /// Extension methods for ReplicationProtectionContainersOperations /// public static partial class ReplicationProtectionContainersOperationsExtensions { - /// - /// Gets the list of protection container for a fabric. - /// - /// - /// Lists the protection containers in the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - public static IPage ListByReplicationFabrics(this IReplicationProtectionContainersOperations operations, string fabricName) - { - return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of protection container for a fabric. - /// - /// - /// Lists the protection containers in the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsAsync(this IReplicationProtectionContainersOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the protection container details. - /// - /// - /// Gets the details of a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - public static ProtectionContainer Get(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName) - { - return operations.GetAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); - } - - /// - /// Gets the protection container details. - /// - /// - /// Gets the details of a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Protection container name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create a protection container. - /// - /// - /// Operation to create a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric ARM name. - /// - /// - /// Unique protection container ARM name. - /// - /// - /// Create protection container input properties. - /// - public static ProtectionContainer Create(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties)) - { - return operations.CreateAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); - } - - /// - /// Create a protection container. - /// - /// - /// Operation to create a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric ARM name. - /// - /// - /// Unique protection container ARM name. - /// - /// - /// Create protection container input properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Adds a protectable item to the replication protection container. - /// - /// - /// The operation to a add a protectable item to a protection container(Add - /// physical server). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric. - /// - /// - /// The name of the protection container. - /// - /// - /// The properties of a discover protectable item request. - /// - public static ProtectionContainer DiscoverProtectableItem(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties)) - { - return operations.DiscoverProtectableItemAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); - } - - /// - /// Adds a protectable item to the replication protection container. - /// - /// - /// The operation to a add a protectable item to a protection container(Add - /// physical server). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric. - /// - /// - /// The name of the protection container. - /// - /// - /// The properties of a discover protectable item request. - /// - /// - /// The cancellation token. - /// - public static async Task DiscoverProtectableItemAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Removes a protection container. - /// - /// - /// Operation to remove a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric ARM name. - /// - /// - /// Unique protection container ARM name. - /// - public static void Delete(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName) - { - operations.DeleteAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); - } - - /// - /// Removes a protection container. - /// - /// - /// Operation to remove a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric ARM name. - /// - /// - /// Unique protection container ARM name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Switches protection from one container to another or one replication - /// provider to another. - /// - /// - /// Operation to switch protection from one container to another or one - /// replication provider to another. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Switch protection properties. - /// - public static ProtectionContainer SwitchProtection(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties)) - { - return operations.SwitchProtectionAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); - } + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabrics(this IReplicationProtectionContainersOperations operations, string fabricName) + { + return ((IReplicationProtectionContainersOperations)operations).ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } - /// - /// Switches protection from one container to another or one replication - /// provider to another. - /// - /// - /// Operation to switch protection from one container to another or one - /// replication provider to another. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Switch protection properties. - /// - /// - /// The cancellation token. - /// - public static async Task SwitchProtectionAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsAsync(this IReplicationProtectionContainersOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.SwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the details of a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + public static ProtectionContainer Get(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName) + { + return ((IReplicationProtectionContainersOperations)operations).GetAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of all protection containers in a vault. - /// - /// - /// Lists the protection containers in a vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationProtectionContainersOperations operations) + /// + /// Gets the details of a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListAsync().GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Operation to create a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + public static ProtectionContainer Create(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties)) + { + return ((IReplicationProtectionContainersOperations)operations).CreateAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets the list of all protection containers in a vault. - /// - /// - /// Lists the protection containers in a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationProtectionContainersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Operation to create a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to a add a protectable item to a protection container(Add physical server). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + public static ProtectionContainer DiscoverProtectableItem(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties)) + { + return ((IReplicationProtectionContainersOperations)operations).DiscoverProtectableItemAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); + } - /// - /// Create a protection container. - /// - /// - /// Operation to create a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric ARM name. - /// - /// - /// Unique protection container ARM name. - /// - /// - /// Create protection container input properties. - /// - public static ProtectionContainer BeginCreate(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties)) + /// + /// The operation to a add a protectable item to a protection container(Add physical server). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DiscoverProtectableItemAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCreateAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Operation to remove a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + public static void Delete(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName) + { + ((IReplicationProtectionContainersOperations)operations).DeleteAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } - /// - /// Create a protection container. - /// - /// - /// Operation to create a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric ARM name. - /// - /// - /// Unique protection container ARM name. - /// - /// - /// Create protection container input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Operation to remove a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Operation to switch protection from one container to another or one replication provider to another. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + public static ProtectionContainer SwitchProtection(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties)) + { + return ((IReplicationProtectionContainersOperations)operations).SwitchProtectionAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); + } - /// - /// Adds a protectable item to the replication protection container. - /// - /// - /// The operation to a add a protectable item to a protection container(Add - /// physical server). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric. - /// - /// - /// The name of the protection container. - /// - /// - /// The properties of a discover protectable item request. - /// - public static ProtectionContainer BeginDiscoverProtectableItem(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties)) + /// + /// Operation to switch protection from one container to another or one replication provider to another. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task SwitchProtectionAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.SwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginDiscoverProtectableItemAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the protection containers in a vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationProtectionContainersOperations operations) + { + return ((IReplicationProtectionContainersOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Adds a protectable item to the replication protection container. - /// - /// - /// The operation to a add a protectable item to a protection container(Add - /// physical server). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the fabric. - /// - /// - /// The name of the protection container. - /// - /// - /// The properties of a discover protectable item request. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDiscoverProtectableItemAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the protection containers in a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationProtectionContainersOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginDiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Operation to create a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + public static ProtectionContainer BeginCreate(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties)) + { + return ((IReplicationProtectionContainersOperations)operations).BeginCreateAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); + } - /// - /// Removes a protection container. - /// - /// - /// Operation to remove a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric ARM name. - /// - /// - /// Unique protection container ARM name. - /// - public static void BeginDelete(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName) + /// + /// Operation to create a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) { - operations.BeginDeleteAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to a add a protectable item to a protection container(Add physical server). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + public static ProtectionContainer BeginDiscoverProtectableItem(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties)) + { + return ((IReplicationProtectionContainersOperations)operations).BeginDiscoverProtectableItemAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); + } - /// - /// Removes a protection container. - /// - /// - /// Operation to remove a protection container. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric ARM name. - /// - /// - /// Unique protection container ARM name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to a add a protectable item to a protection container(Add physical server). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDiscoverProtectableItemAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginDiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) { - (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Operation to remove a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + public static void BeginDelete(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName) + { + ((IReplicationProtectionContainersOperations)operations).BeginDeleteAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } - /// - /// Switches protection from one container to another or one replication - /// provider to another. - /// - /// - /// Operation to switch protection from one container to another or one - /// replication provider to another. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Switch protection properties. - /// - public static ProtectionContainer BeginSwitchProtection(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties)) - { - return operations.BeginSwitchProtectionAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); - } + /// + /// Operation to remove a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Operation to switch protection from one container to another or one replication provider to another. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + public static ProtectionContainer BeginSwitchProtection(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties)) + { + return ((IReplicationProtectionContainersOperations)operations).BeginSwitchProtectionAsync(fabricName, protectionContainerName, properties).GetAwaiter().GetResult(); + } - /// - /// Switches protection from one container to another or one replication - /// provider to another. - /// - /// - /// Operation to switch protection from one container to another or one - /// replication provider to another. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Unique fabric name. - /// - /// - /// Protection container name. - /// - /// - /// Switch protection properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginSwitchProtectionAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Operation to switch protection from one container to another or one replication provider to another. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginSwitchProtectionAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginSwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginSwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabricsNext(this IReplicationProtectionContainersOperations operations, string nextPageLink) + { + return ((IReplicationProtectionContainersOperations)operations).ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of protection container for a fabric. - /// - /// - /// Lists the protection containers in the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationFabricsNext(this IReplicationProtectionContainersOperations operations, string nextPageLink) + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsNextAsync(this IReplicationProtectionContainersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the protection containers in a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationProtectionContainersOperations operations, string nextPageLink) + { + return ((IReplicationProtectionContainersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of protection container for a fabric. - /// - /// - /// Lists the protection containers in the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsNextAsync(this IReplicationProtectionContainersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the protection containers in a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationProtectionContainersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - - /// - /// Gets the list of all protection containers in a vault. - /// - /// - /// Lists the protection containers in a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationProtectionContainersOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of all protection containers in a vault. - /// - /// - /// Lists the protection containers in a vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationProtectionContainersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionIntentsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionIntentsOperations.cs index 347d6c69048f..d79183f3c21f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionIntentsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionIntentsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationProtectionIntentsOperations operations. /// - internal partial class ReplicationProtectionIntentsOperations : IServiceOperations, IReplicationProtectionIntentsOperations + internal partial class ReplicationProtectionIntentsOperations : Microsoft.Rest.IServiceOperations, IReplicationProtectionIntentsOperations { /// /// Initializes a new instance of the ReplicationProtectionIntentsOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationProtectionIntentsOperations : IServiceOperatio /// /// Thrown when a required parameter is null /// - internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient client) + internal ReplicationProtectionIntentsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of replication protection intent objects. - /// - /// /// Gets the list of ASR replication protection intent objects in the vault. - /// + /// /// /// The pagination token. /// @@ -68,13 +53,13 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli /// /// 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 /// /// @@ -83,46 +68,60 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string skipToken = default(string), string takeToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string skipToken = default(string), string takeToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("takeToken", takeToken); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (skipToken != null) { @@ -137,25 +136,24 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -167,55 +165,56 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -225,9 +224,10 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -238,31 +238,32 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the details of a Replication protection intent item. - /// - /// /// Gets the details of an ASR replication protection intent. - /// + /// /// /// Replication protection intent name. /// @@ -272,13 +273,13 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli /// /// 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 /// /// @@ -287,75 +288,87 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string intentObjectName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string intentObjectName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (intentObjectName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "intentObjectName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "intentObjectName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("intentObjectName", intentObjectName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents/{intentObjectName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{intentObjectName}", System.Uri.EscapeDataString(intentObjectName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -367,55 +380,56 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -425,9 +439,10 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -438,31 +453,32 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Create protection intent Resource. - /// - /// /// The operation to create an ASR replication protection intent item. - /// + /// /// /// A name for the replication protection item. /// @@ -475,13 +491,13 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli /// /// 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 /// /// @@ -490,81 +506,93 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli /// /// A response object containing the response body and response headers. /// - public async Task> CreateWithHttpMessagesAsync(string intentObjectName, CreateProtectionIntentProperties properties = default(CreateProtectionIntentProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string intentObjectName, CreateProtectionIntentProperties properties = default(CreateProtectionIntentProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (intentObjectName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "intentObjectName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "intentObjectName"); } + CreateProtectionIntentInput input = new CreateProtectionIntentInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("intentObjectName", intentObjectName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents/{intentObjectName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{intentObjectName}", System.Uri.EscapeDataString(intentObjectName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -576,61 +604,62 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -640,9 +669,10 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -653,31 +683,32 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of replication protection intent objects. - /// - /// /// Gets the list of ASR replication protection intent objects in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -687,13 +718,13 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli /// /// 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 /// /// @@ -702,51 +733,54 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -758,55 +792,56 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -816,9 +851,10 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -829,24 +865,28 @@ internal ReplicationProtectionIntentsOperations(SiteRecoveryManagementClient cli _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionIntentsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionIntentsOperationsExtensions.cs index 999338f38d07..e55cdb82c7e8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionIntentsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationProtectionIntentsOperationsExtensions.cs @@ -1,197 +1,154 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationProtectionIntentsOperations. + /// Extension methods for ReplicationProtectionIntentsOperations /// public static partial class ReplicationProtectionIntentsOperationsExtensions { - /// - /// Gets the list of replication protection intent objects. - /// - /// - /// Gets the list of ASR replication protection intent objects in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The pagination token. - /// - /// - /// The page size. - /// - public static IPage List(this IReplicationProtectionIntentsOperations operations, string skipToken = default(string), string takeToken = default(string)) - { - return operations.ListAsync(skipToken, takeToken).GetAwaiter().GetResult(); - } + /// + /// Gets the list of ASR replication protection intent objects in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The pagination token. + /// + /// + /// The page size. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationProtectionIntentsOperations operations, string skipToken = default(string), string takeToken = default(string)) + { + return ((IReplicationProtectionIntentsOperations)operations).ListAsync(skipToken, takeToken).GetAwaiter().GetResult(); + } - /// - /// Gets the list of replication protection intent objects. - /// - /// - /// Gets the list of ASR replication protection intent objects in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The pagination token. - /// - /// - /// The page size. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationProtectionIntentsOperations operations, string skipToken = default(string), string takeToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the list of ASR replication protection intent objects in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The pagination token. + /// + /// + /// The page size. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationProtectionIntentsOperations operations, string skipToken = default(string), string takeToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(skipToken, takeToken, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(skipToken, takeToken, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the details of an ASR replication protection intent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication protection intent name. + /// + public static ReplicationProtectionIntent Get(this IReplicationProtectionIntentsOperations operations, string intentObjectName) + { + return ((IReplicationProtectionIntentsOperations)operations).GetAsync(intentObjectName).GetAwaiter().GetResult(); + } - /// - /// Gets the details of a Replication protection intent item. - /// - /// - /// Gets the details of an ASR replication protection intent. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication protection intent name. - /// - public static ReplicationProtectionIntent Get(this IReplicationProtectionIntentsOperations operations, string intentObjectName) + /// + /// Gets the details of an ASR replication protection intent. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication protection intent name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationProtectionIntentsOperations operations, string intentObjectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(intentObjectName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(intentObjectName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to create an ASR replication protection intent item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// A name for the replication protection item. + /// + public static ReplicationProtectionIntent Create(this IReplicationProtectionIntentsOperations operations, string intentObjectName, CreateProtectionIntentProperties properties = default(CreateProtectionIntentProperties)) + { + return ((IReplicationProtectionIntentsOperations)operations).CreateAsync(intentObjectName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets the details of a Replication protection intent item. - /// - /// - /// Gets the details of an ASR replication protection intent. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Replication protection intent name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationProtectionIntentsOperations operations, string intentObjectName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to create an ASR replication protection intent item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// A name for the replication protection item. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationProtectionIntentsOperations operations, string intentObjectName, CreateProtectionIntentProperties properties = default(CreateProtectionIntentProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(intentObjectName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(intentObjectName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the list of ASR replication protection intent objects in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationProtectionIntentsOperations operations, string nextPageLink) + { + return ((IReplicationProtectionIntentsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Create protection intent Resource. - /// - /// - /// The operation to create an ASR replication protection intent item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// A name for the replication protection item. - /// - /// - /// Create protection intent input properties. - /// - public static ReplicationProtectionIntent Create(this IReplicationProtectionIntentsOperations operations, string intentObjectName, CreateProtectionIntentProperties properties = default(CreateProtectionIntentProperties)) + /// + /// Gets the list of ASR replication protection intent objects in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationProtectionIntentsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.CreateAsync(intentObjectName, properties).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Create protection intent Resource. - /// - /// - /// The operation to create an ASR replication protection intent item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// A name for the replication protection item. - /// - /// - /// Create protection intent input properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationProtectionIntentsOperations operations, string intentObjectName, CreateProtectionIntentProperties properties = default(CreateProtectionIntentProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(intentObjectName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of replication protection intent objects. - /// - /// - /// Gets the list of ASR replication protection intent objects in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationProtectionIntentsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of replication protection intent objects. - /// - /// - /// Gets the list of ASR replication protection intent objects in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationProtectionIntentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryPlansOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryPlansOperations.cs index 431994ed4766..956bd87d24df 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryPlansOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryPlansOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationRecoveryPlansOperations operations. /// - internal partial class ReplicationRecoveryPlansOperations : IServiceOperations, IReplicationRecoveryPlansOperations + internal partial class ReplicationRecoveryPlansOperations : Microsoft.Rest.IServiceOperations, IReplicationRecoveryPlansOperations { /// /// Initializes a new instance of the ReplicationRecoveryPlansOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationRecoveryPlansOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) + internal ReplicationRecoveryPlansOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,24 +39,21 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of recovery plans. - /// - /// /// Lists the recovery plans in the 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 /// /// @@ -77,69 +62,80 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -151,55 +147,56 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -209,9 +206,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -222,31 +220,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the requested recovery plan. - /// - /// /// Gets the details of the recovery plan. - /// + /// /// /// Name of the recovery plan. /// @@ -256,13 +255,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -271,75 +270,87 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -351,55 +362,56 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -409,9 +421,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -422,31 +435,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates a recovery plan with the given details. - /// - /// /// The operation to create a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -454,46 +468,40 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// Recovery plan creation properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Deletes the specified recovery plan. - /// - /// /// Delete a recovery plan. - /// + /// /// /// Recovery plan name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Updates the given recovery plan. - /// - /// /// The operation to update a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -501,68 +509,59 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// Recovery plan update properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute cancel failover of the recovery plan. - /// - /// /// The operation to cancel the failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> FailoverCancelWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> FailoverCancelWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginFailoverCancelWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginFailoverCancelWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute commit failover of the recovery plan. - /// - /// /// The operation to commit the failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> FailoverCommitWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> FailoverCommitWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginFailoverCommitWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginFailoverCommitWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute planned failover of the recovery plan. - /// - /// /// The operation to start the planned failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -570,46 +569,40 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// The recovery plan planned failover input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> PlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> PlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginPlannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPlannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute reprotect of the recovery plan. - /// - /// /// The operation to reprotect(reverse replicate) a recovery plan. - /// + /// /// /// Recovery plan name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ReprotectWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ReprotectWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginReprotectWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginReprotectWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute test failover of the recovery plan. - /// - /// /// The operation to start the test failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -617,24 +610,21 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// The recovery plan test failover input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> TestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> TestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginTestFailoverWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginTestFailoverWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute test failover cleanup of the recovery plan. - /// - /// /// The operation to cleanup test failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -642,24 +632,21 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// The recovery plan test failover cleanup input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> TestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> TestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginTestFailoverCleanupWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginTestFailoverCleanupWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Execute unplanned failover of the recovery plan. - /// - /// /// The operation to start the unplanned failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -667,24 +654,21 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// The recovery plan unplanned failover input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginUnplannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUnplannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Creates a recovery plan with the given details. - /// - /// /// The operation to create a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -697,13 +681,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -712,89 +696,93 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + CreateRecoveryPlanInput input = new CreateRecoveryPlanInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -806,61 +794,62 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -870,9 +859,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -883,31 +873,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes the specified recovery plan. - /// - /// /// Delete a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -917,10 +908,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -929,75 +920,87 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1009,55 +1012,56 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1067,26 +1071,28 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Updates the given recovery plan. - /// - /// /// The operation to update a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -1099,13 +1105,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1114,81 +1120,93 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + UpdateRecoveryPlanInput input = new UpdateRecoveryPlanInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1200,61 +1218,62 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1264,9 +1283,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1277,31 +1297,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute cancel failover of the recovery plan. - /// - /// /// The operation to cancel the failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -1311,13 +1332,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1326,75 +1347,87 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginFailoverCancelWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginFailoverCancelWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCancel", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCancel", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCancel").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1406,55 +1439,56 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1464,9 +1498,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1477,31 +1512,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute commit failover of the recovery plan. - /// - /// /// The operation to commit the failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -1511,13 +1547,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1526,75 +1562,87 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginFailoverCommitWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginFailoverCommitWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCommit", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCommit", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1606,55 +1654,56 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1664,9 +1713,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1677,31 +1727,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute planned failover of the recovery plan. - /// - /// /// The operation to start the planned failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -1714,13 +1765,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1729,89 +1780,93 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginPlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginPlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + RecoveryPlanPlannedFailoverInput input = new RecoveryPlanPlannedFailoverInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPlannedFailover", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPlannedFailover", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1823,61 +1878,62 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1887,9 +1943,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1900,31 +1957,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute reprotect of the recovery plan. - /// - /// /// The operation to reprotect(reverse replicate) a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -1934,13 +1992,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1949,75 +2007,87 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginReprotectWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginReprotectWithHttpMessagesAsync(string recoveryPlanName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginReprotect", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginReprotect", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2029,55 +2099,56 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2087,9 +2158,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2100,31 +2172,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute test failover of the recovery plan. - /// - /// /// The operation to start the test failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -2137,13 +2210,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -2152,89 +2225,93 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginTestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginTestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + RecoveryPlanTestFailoverInput input = new RecoveryPlanTestFailoverInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailover", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailover", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2246,61 +2323,62 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2310,9 +2388,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2323,31 +2402,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute test failover cleanup of the recovery plan. - /// - /// /// The operation to cleanup test failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -2360,13 +2440,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -2375,89 +2455,93 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + RecoveryPlanTestFailoverCleanupInput input = new RecoveryPlanTestFailoverCleanupInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailoverCleanup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailoverCleanup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2469,61 +2553,62 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2533,9 +2618,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2546,31 +2632,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Execute unplanned failover of the recovery plan. - /// - /// /// The operation to start the unplanned failover of a recovery plan. - /// + /// /// /// Recovery plan name. /// @@ -2583,13 +2670,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -2598,89 +2685,93 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (recoveryPlanName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "recoveryPlanName"); } + RecoveryPlanUnplannedFailoverInput input = new RecoveryPlanUnplannedFailoverInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUnplannedFailover", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUnplannedFailover", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2692,61 +2783,62 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2756,9 +2848,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2769,31 +2862,32 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of recovery plans. - /// - /// /// Lists the recovery plans in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -2803,13 +2897,13 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -2818,51 +2912,54 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2874,55 +2971,56 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2932,9 +3030,10 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2945,24 +3044,28 @@ internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryPlansOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryPlansOperationsExtensions.cs index 82c2e83e933b..c8d05ea882ac 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryPlansOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryPlansOperationsExtensions.cs @@ -1,1005 +1,763 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationRecoveryPlansOperations. + /// Extension methods for ReplicationRecoveryPlansOperations /// public static partial class ReplicationRecoveryPlansOperationsExtensions { - /// - /// Gets the list of recovery plans. - /// - /// - /// Lists the recovery plans in the vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationRecoveryPlansOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets the list of recovery plans. - /// - /// - /// Lists the recovery plans in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationRecoveryPlansOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the requested recovery plan. - /// - /// - /// Gets the details of the recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the recovery plan. - /// - public static RecoveryPlan Get(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) - { - return operations.GetAsync(recoveryPlanName).GetAwaiter().GetResult(); - } - - /// - /// Gets the requested recovery plan. - /// - /// - /// Gets the details of the recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the recovery plan. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a recovery plan with the given details. - /// - /// - /// The operation to create a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// Recovery plan creation properties. - /// - public static RecoveryPlan Create(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInputProperties properties) - { - return operations.CreateAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Creates a recovery plan with the given details. - /// - /// - /// The operation to create a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// Recovery plan creation properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the specified recovery plan. - /// - /// - /// Delete a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - public static void Delete(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) - { - operations.DeleteAsync(recoveryPlanName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the specified recovery plan. - /// - /// - /// Delete a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates the given recovery plan. - /// - /// - /// The operation to update a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// Recovery plan update properties. - /// - public static RecoveryPlan Update(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties)) - { - return operations.UpdateAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Updates the given recovery plan. - /// - /// - /// The operation to update a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// Recovery plan update properties. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute cancel failover of the recovery plan. - /// - /// - /// The operation to cancel the failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - public static RecoveryPlan FailoverCancel(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) - { - return operations.FailoverCancelAsync(recoveryPlanName).GetAwaiter().GetResult(); - } - - /// - /// Execute cancel failover of the recovery plan. - /// - /// - /// The operation to cancel the failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The cancellation token. - /// - public static async Task FailoverCancelAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.FailoverCancelWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute commit failover of the recovery plan. - /// - /// - /// The operation to commit the failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - public static RecoveryPlan FailoverCommit(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) - { - return operations.FailoverCommitAsync(recoveryPlanName).GetAwaiter().GetResult(); - } - - /// - /// Execute commit failover of the recovery plan. - /// - /// - /// The operation to commit the failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The cancellation token. - /// - public static async Task FailoverCommitAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.FailoverCommitWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute planned failover of the recovery plan. - /// - /// - /// The operation to start the planned failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan planned failover input properties. - /// - public static RecoveryPlan PlannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) - { - return operations.PlannedFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute planned failover of the recovery plan. - /// - /// - /// The operation to start the planned failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan planned failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task PlannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PlannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute reprotect of the recovery plan. - /// - /// - /// The operation to reprotect(reverse replicate) a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - public static RecoveryPlan Reprotect(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) - { - return operations.ReprotectAsync(recoveryPlanName).GetAwaiter().GetResult(); - } - - /// - /// Execute reprotect of the recovery plan. - /// - /// - /// The operation to reprotect(reverse replicate) a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The cancellation token. - /// - public static async Task ReprotectAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ReprotectWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute test failover of the recovery plan. - /// - /// - /// The operation to start the test failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan test failover input properties. - /// - public static RecoveryPlan TestFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) - { - return operations.TestFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute test failover of the recovery plan. - /// - /// - /// The operation to start the test failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan test failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task TestFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.TestFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute test failover cleanup of the recovery plan. - /// - /// - /// The operation to cleanup test failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan test failover cleanup input properties. - /// - public static RecoveryPlan TestFailoverCleanup(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) - { - return operations.TestFailoverCleanupAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute test failover cleanup of the recovery plan. - /// - /// - /// The operation to cleanup test failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan test failover cleanup input properties. - /// - /// - /// The cancellation token. - /// - public static async Task TestFailoverCleanupAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.TestFailoverCleanupWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute unplanned failover of the recovery plan. - /// - /// - /// The operation to start the unplanned failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan unplanned failover input properties. - /// - public static RecoveryPlan UnplannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) - { - return operations.UnplannedFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute unplanned failover of the recovery plan. - /// - /// - /// The operation to start the unplanned failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan unplanned failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task UnplannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UnplannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a recovery plan with the given details. - /// - /// - /// The operation to create a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// Recovery plan creation properties. - /// - public static RecoveryPlan BeginCreate(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInputProperties properties) - { - return operations.BeginCreateAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Creates a recovery plan with the given details. - /// - /// - /// The operation to create a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// Recovery plan creation properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the specified recovery plan. - /// - /// - /// Delete a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - public static void BeginDelete(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) - { - operations.BeginDeleteAsync(recoveryPlanName).GetAwaiter().GetResult(); - } - - /// - /// Deletes the specified recovery plan. - /// - /// - /// Delete a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates the given recovery plan. - /// - /// - /// The operation to update a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// Recovery plan update properties. - /// - public static RecoveryPlan BeginUpdate(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties)) - { - return operations.BeginUpdateAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Updates the given recovery plan. - /// - /// - /// The operation to update a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// Recovery plan update properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute cancel failover of the recovery plan. - /// - /// - /// The operation to cancel the failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - public static RecoveryPlan BeginFailoverCancel(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) - { - return operations.BeginFailoverCancelAsync(recoveryPlanName).GetAwaiter().GetResult(); - } - - /// - /// Execute cancel failover of the recovery plan. - /// - /// - /// The operation to cancel the failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginFailoverCancelAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginFailoverCancelWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute commit failover of the recovery plan. - /// - /// - /// The operation to commit the failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - public static RecoveryPlan BeginFailoverCommit(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) - { - return operations.BeginFailoverCommitAsync(recoveryPlanName).GetAwaiter().GetResult(); - } - - /// - /// Execute commit failover of the recovery plan. - /// - /// - /// The operation to commit the failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginFailoverCommitAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginFailoverCommitWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute planned failover of the recovery plan. - /// - /// - /// The operation to start the planned failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan planned failover input properties. - /// - public static RecoveryPlan BeginPlannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) - { - return operations.BeginPlannedFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute planned failover of the recovery plan. - /// - /// - /// The operation to start the planned failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan planned failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginPlannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginPlannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute reprotect of the recovery plan. - /// - /// - /// The operation to reprotect(reverse replicate) a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - public static RecoveryPlan BeginReprotect(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) - { - return operations.BeginReprotectAsync(recoveryPlanName).GetAwaiter().GetResult(); - } - - /// - /// Execute reprotect of the recovery plan. - /// - /// - /// The operation to reprotect(reverse replicate) a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginReprotectAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginReprotectWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute test failover of the recovery plan. - /// - /// - /// The operation to start the test failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan test failover input properties. - /// - public static RecoveryPlan BeginTestFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) - { - return operations.BeginTestFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute test failover of the recovery plan. - /// - /// - /// The operation to start the test failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan test failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginTestFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginTestFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute test failover cleanup of the recovery plan. - /// - /// - /// The operation to cleanup test failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan test failover cleanup input properties. - /// - public static RecoveryPlan BeginTestFailoverCleanup(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) - { - return operations.BeginTestFailoverCleanupAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute test failover cleanup of the recovery plan. - /// - /// - /// The operation to cleanup test failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan test failover cleanup input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginTestFailoverCleanupAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginTestFailoverCleanupWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute unplanned failover of the recovery plan. - /// - /// - /// The operation to start the unplanned failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan unplanned failover input properties. - /// - public static RecoveryPlan BeginUnplannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) - { - return operations.BeginUnplannedFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); - } - - /// - /// Execute unplanned failover of the recovery plan. - /// - /// - /// The operation to start the unplanned failover of a recovery plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Recovery plan name. - /// - /// - /// The recovery plan unplanned failover input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUnplannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUnplannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of recovery plans. - /// - /// - /// Lists the recovery plans in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationRecoveryPlansOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of recovery plans. - /// - /// - /// Lists the recovery plans in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationRecoveryPlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationRecoveryPlansOperations operations) + { + return ((IReplicationRecoveryPlansOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationRecoveryPlansOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the details of the recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the recovery plan. + /// + public static RecoveryPlan Get(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return ((IReplicationRecoveryPlansOperations)operations).GetAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of the recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the recovery plan. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to create a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan Create(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).CreateAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to create a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Delete a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static void Delete(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + ((IReplicationRecoveryPlansOperations)operations).DeleteAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Delete a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan Update(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties)) + { + return ((IReplicationRecoveryPlansOperations)operations).UpdateAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to update a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to cancel the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan FailoverCancel(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return ((IReplicationRecoveryPlansOperations)operations).FailoverCancelAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// The operation to cancel the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task FailoverCancelAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.FailoverCancelWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to commit the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan FailoverCommit(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return ((IReplicationRecoveryPlansOperations)operations).FailoverCommitAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// The operation to commit the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task FailoverCommitAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.FailoverCommitWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan PlannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).PlannedFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PlannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PlannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan Reprotect(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return ((IReplicationRecoveryPlansOperations)operations).ReprotectAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ReprotectAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ReprotectWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan TestFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).TestFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TestFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.TestFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan TestFailoverCleanup(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).TestFailoverCleanupAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task TestFailoverCleanupAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.TestFailoverCleanupWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to start the unplanned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan UnplannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).UnplannedFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to start the unplanned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UnplannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UnplannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to create a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginCreate(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).BeginCreateAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to create a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Delete a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static void BeginDelete(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + ((IReplicationRecoveryPlansOperations)operations).BeginDeleteAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Delete a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginUpdate(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties)) + { + return ((IReplicationRecoveryPlansOperations)operations).BeginUpdateAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to update a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to cancel the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginFailoverCancel(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return ((IReplicationRecoveryPlansOperations)operations).BeginFailoverCancelAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// The operation to cancel the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginFailoverCancelAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginFailoverCancelWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to commit the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginFailoverCommit(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return ((IReplicationRecoveryPlansOperations)operations).BeginFailoverCommitAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// The operation to commit the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginFailoverCommitAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginFailoverCommitWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginPlannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).BeginPlannedFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPlannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginPlannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginReprotect(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return ((IReplicationRecoveryPlansOperations)operations).BeginReprotectAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginReprotectAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginReprotectWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginTestFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).BeginTestFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginTestFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginTestFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginTestFailoverCleanup(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).BeginTestFailoverCleanupAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginTestFailoverCleanupAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginTestFailoverCleanupWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to start the unplanned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginUnplannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties) + { + return ((IReplicationRecoveryPlansOperations)operations).BeginUnplannedFailoverAsync(recoveryPlanName, properties).GetAwaiter().GetResult(); + } + + /// + /// The operation to start the unplanned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUnplannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUnplannedFailoverWithHttpMessagesAsync(recoveryPlanName, properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationRecoveryPlansOperations operations, string nextPageLink) + { + return ((IReplicationRecoveryPlansOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationRecoveryPlansOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryServicesProvidersOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryServicesProvidersOperations.cs index 2d368187567c..a6dfc1150cde 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryServicesProvidersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryServicesProvidersOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationRecoveryServicesProvidersOperations operations. /// - internal partial class ReplicationRecoveryServicesProvidersOperations : IServiceOperations, IReplicationRecoveryServicesProvidersOperations + internal partial class ReplicationRecoveryServicesProvidersOperations : Microsoft.Rest.IServiceOperations, IReplicationRecoveryServicesProvidersOperations { /// /// Initializes a new instance of the ReplicationRecoveryServicesProvidersOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationRecoveryServicesProvidersOperations : IService /// /// Thrown when a required parameter is null /// - internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementClient client) + internal ReplicationRecoveryServicesProvidersOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of registered recovery services providers for the fabric. - /// - /// /// Lists the registered recovery services providers for the specified fabric. - /// + /// /// /// Fabric name. /// @@ -65,13 +50,13 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// 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 /// /// @@ -80,75 +65,87 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,55 +157,56 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -218,9 +216,10 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -231,31 +230,32 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the details of a recovery services provider. - /// - /// /// Gets the details of registered recovery services provider. - /// + /// /// /// Fabric name. /// @@ -268,13 +268,13 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// 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 /// /// @@ -283,81 +283,94 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (providerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "providerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "providerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("providerName", providerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -369,55 +382,56 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -427,9 +441,10 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -440,31 +455,32 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Adds a recovery services provider. - /// - /// /// The operation to add a recovery services provider. - /// + /// /// /// Fabric name. /// @@ -475,25 +491,21 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// The properties of an add provider request. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, providerName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, providerName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Purges recovery service provider from fabric. + /// The operation to purge(force delete) a recovery services provider from the vault. /// - /// - /// The operation to purge(force delete) a recovery services provider from the - /// vault. - /// /// /// Fabric name. /// @@ -501,25 +513,21 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// Recovery services provider name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task PurgeWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task PurgeWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, providerName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, providerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Refresh details from the recovery services provider. + /// The operation to refresh the information from the recovery services provider. /// - /// - /// The operation to refresh the information from the recovery services - /// provider. - /// /// /// Fabric name. /// @@ -527,28 +535,21 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// Recovery services provider name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> RefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginRefreshProviderWithHttpMessagesAsync(fabricName, providerName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRefreshProviderWithHttpMessagesAsync(fabricName, providerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Deletes provider from fabric. Note: Deleting provider for any fabric other - /// than SingleHost is unsupported. To maintain backward compatibility for - /// released clients the object "deleteRspInput" is used (if the object is - /// empty we assume that it is old client and continue the old behavior). + /// The operation to removes/delete(unregister) a recovery services provider from the vault. /// - /// - /// The operation to removes/delete(unregister) a recovery services provider - /// from the vault. - /// /// /// Fabric name. /// @@ -556,38 +557,34 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// Recovery services provider name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, providerName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, providerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Gets the list of registered recovery services providers in the vault. This - /// is a view only api. - /// - /// /// Lists the registered recovery services providers in the 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 /// /// @@ -596,69 +593,80 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -670,55 +678,56 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -728,9 +737,10 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -741,31 +751,32 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Adds a recovery services provider. - /// - /// /// The operation to add a recovery services provider. - /// + /// /// /// Fabric name. /// @@ -781,13 +792,13 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// 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 /// /// @@ -796,95 +807,100 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (providerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "providerName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); - } - if (properties != null) - { - properties.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "providerName"); } + AddRecoveryServicesProviderInput addProviderInput = new AddRecoveryServicesProviderInput(); - if (properties != null) + if(properties != null) { addProviderInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("providerName", providerName); + tracingParameters.Add("addProviderInput", addProviderInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -896,61 +912,62 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(addProviderInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(addProviderInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(addProviderInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -960,9 +977,10 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -973,32 +991,32 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Purges recovery service provider from fabric. + /// The operation to purge(force delete) a recovery services provider from the vault. /// - /// - /// The operation to purge(force delete) a recovery services provider from the - /// vault. - /// /// /// Fabric name. /// @@ -1011,10 +1029,10 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1023,81 +1041,94 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// A response object containing the response body and response headers. /// - public async Task BeginPurgeWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginPurgeWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (providerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "providerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "providerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("providerName", providerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1109,55 +1140,56 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1167,27 +1199,28 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Refresh details from the recovery services provider. + /// The operation to refresh the information from the recovery services provider. /// - /// - /// The operation to refresh the information from the recovery services - /// provider. - /// /// /// Fabric name. /// @@ -1200,13 +1233,13 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// 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 /// /// @@ -1215,81 +1248,94 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// A response object containing the response body and response headers. /// - public async Task> BeginRefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginRefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (providerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "providerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "providerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("providerName", providerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRefreshProvider", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRefreshProvider", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1301,55 +1347,56 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1359,9 +1406,10 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1372,35 +1420,32 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Deletes provider from fabric. Note: Deleting provider for any fabric other - /// than SingleHost is unsupported. To maintain backward compatibility for - /// released clients the object "deleteRspInput" is used (if the object is - /// empty we assume that it is old client and continue the old behavior). + /// The operation to removes/delete(unregister) a recovery services provider from the vault. /// - /// - /// The operation to removes/delete(unregister) a recovery services provider - /// from the vault. - /// /// /// Fabric name. /// @@ -1413,10 +1458,10 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1425,81 +1470,94 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string providerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (providerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "providerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "providerName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("providerName", providerName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1511,55 +1569,56 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1569,26 +1628,28 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of registered recovery services providers for the fabric. - /// - /// /// Lists the registered recovery services providers for the specified fabric. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1598,13 +1659,13 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// 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 /// /// @@ -1613,51 +1674,54 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1669,55 +1733,56 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1727,9 +1792,10 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1740,32 +1806,32 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of registered recovery services providers in the vault. This - /// is a view only api. - /// - /// /// Lists the registered recovery services providers in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1775,13 +1841,13 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// 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 /// /// @@ -1790,51 +1856,54 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1846,55 +1915,56 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1904,9 +1974,10 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1917,24 +1988,28 @@ internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementCl _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryServicesProvidersOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryServicesProvidersOperationsExtensions.cs index 3a3cd54a7385..cb47e259b009 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryServicesProvidersOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationRecoveryServicesProvidersOperationsExtensions.cs @@ -1,621 +1,481 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationRecoveryServicesProvidersOperations. + /// Extension methods for ReplicationRecoveryServicesProvidersOperations /// public static partial class ReplicationRecoveryServicesProvidersOperationsExtensions { - /// - /// Gets the list of registered recovery services providers for the fabric. - /// - /// - /// Lists the registered recovery services providers for the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - public static IPage ListByReplicationFabrics(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName) - { - return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of registered recovery services providers for the fabric. - /// - /// - /// Lists the registered recovery services providers for the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a recovery services provider. - /// - /// - /// Gets the details of registered recovery services provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - public static RecoveryServicesProvider Get(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) - { - return operations.GetAsync(fabricName, providerName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a recovery services provider. - /// - /// - /// Gets the details of registered recovery services provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Adds a recovery services provider. - /// - /// - /// The operation to add a recovery services provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The properties of an add provider request. - /// - public static RecoveryServicesProvider Create(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties) - { - return operations.CreateAsync(fabricName, providerName, properties).GetAwaiter().GetResult(); - } - - /// - /// Adds a recovery services provider. - /// - /// - /// The operation to add a recovery services provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The properties of an add provider request. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, providerName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Purges recovery service provider from fabric. - /// - /// - /// The operation to purge(force delete) a recovery services provider from the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - public static void Purge(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) - { - operations.PurgeAsync(fabricName, providerName).GetAwaiter().GetResult(); - } - - /// - /// Purges recovery service provider from fabric. - /// - /// - /// The operation to purge(force delete) a recovery services provider from the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The cancellation token. - /// - public static async Task PurgeAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.PurgeWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabrics(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName) + { + return ((IReplicationRecoveryServicesProvidersOperations)operations).ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } - /// - /// Refresh details from the recovery services provider. - /// - /// - /// The operation to refresh the information from the recovery services - /// provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - public static RecoveryServicesProvider RefreshProvider(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) { - return operations.RefreshProviderAsync(fabricName, providerName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of registered recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static RecoveryServicesProvider Get(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + return ((IReplicationRecoveryServicesProvidersOperations)operations).GetAsync(fabricName, providerName).GetAwaiter().GetResult(); + } - /// - /// Refresh details from the recovery services provider. - /// - /// - /// The operation to refresh the information from the recovery services - /// provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The cancellation token. - /// - public static async Task RefreshProviderAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of registered recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.RefreshProviderWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to add a recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static RecoveryServicesProvider Create(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties) + { + return ((IReplicationRecoveryServicesProvidersOperations)operations).CreateAsync(fabricName, providerName, properties).GetAwaiter().GetResult(); + } - /// - /// Deletes provider from fabric. Note: Deleting provider for any fabric other - /// than SingleHost is unsupported. To maintain backward compatibility for - /// released clients the object "deleteRspInput" is used (if the object is - /// empty we assume that it is old client and continue the old behavior). - /// - /// - /// The operation to removes/delete(unregister) a recovery services provider - /// from the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - public static void Delete(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + /// + /// The operation to add a recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, providerName, properties, null, cancellationToken).ConfigureAwait(false)) { - operations.DeleteAsync(fabricName, providerName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to purge(force delete) a recovery services provider from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static void Purge(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + ((IReplicationRecoveryServicesProvidersOperations)operations).PurgeAsync(fabricName, providerName).GetAwaiter().GetResult(); + } - /// - /// Deletes provider from fabric. Note: Deleting provider for any fabric other - /// than SingleHost is unsupported. To maintain backward compatibility for - /// released clients the object "deleteRspInput" is used (if the object is - /// empty we assume that it is old client and continue the old behavior). - /// - /// - /// The operation to removes/delete(unregister) a recovery services provider - /// from the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the list of registered recovery services providers in the vault. This - /// is a view only api. - /// - /// - /// Lists the registered recovery services providers in the vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationRecoveryServicesProvidersOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets the list of registered recovery services providers in the vault. This - /// is a view only api. - /// - /// - /// Lists the registered recovery services providers in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationRecoveryServicesProvidersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Adds a recovery services provider. - /// - /// - /// The operation to add a recovery services provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The properties of an add provider request. - /// - public static RecoveryServicesProvider BeginCreate(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties) - { - return operations.BeginCreateAsync(fabricName, providerName, properties).GetAwaiter().GetResult(); - } - - /// - /// Adds a recovery services provider. - /// - /// - /// The operation to add a recovery services provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The properties of an add provider request. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, providerName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Purges recovery service provider from fabric. - /// - /// - /// The operation to purge(force delete) a recovery services provider from the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - public static void BeginPurge(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) - { - operations.BeginPurgeAsync(fabricName, providerName).GetAwaiter().GetResult(); - } + /// + /// The operation to purge(force delete) a recovery services provider from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PurgeAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.PurgeWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to refresh the information from the recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static RecoveryServicesProvider RefreshProvider(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + return ((IReplicationRecoveryServicesProvidersOperations)operations).RefreshProviderAsync(fabricName, providerName).GetAwaiter().GetResult(); + } - /// - /// Purges recovery service provider from fabric. - /// - /// - /// The operation to purge(force delete) a recovery services provider from the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginPurgeAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to refresh the information from the recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RefreshProviderAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RefreshProviderWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)) { - (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// The operation to removes/delete(unregister) a recovery services provider from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static void Delete(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + ((IReplicationRecoveryServicesProvidersOperations)operations).DeleteAsync(fabricName, providerName).GetAwaiter().GetResult(); + } - /// - /// Refresh details from the recovery services provider. - /// - /// - /// The operation to refresh the information from the recovery services - /// provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - public static RecoveryServicesProvider BeginRefreshProvider(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) - { - return operations.BeginRefreshProviderAsync(fabricName, providerName).GetAwaiter().GetResult(); - } + /// + /// The operation to removes/delete(unregister) a recovery services provider from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Lists the registered recovery services providers in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationRecoveryServicesProvidersOperations operations) + { + return ((IReplicationRecoveryServicesProvidersOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Refresh details from the recovery services provider. - /// - /// - /// The operation to refresh the information from the recovery services - /// provider. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRefreshProviderAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the registered recovery services providers in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationRecoveryServicesProvidersOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginRefreshProviderWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to add a recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static RecoveryServicesProvider BeginCreate(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties) + { + return ((IReplicationRecoveryServicesProvidersOperations)operations).BeginCreateAsync(fabricName, providerName, properties).GetAwaiter().GetResult(); + } - /// - /// Deletes provider from fabric. Note: Deleting provider for any fabric other - /// than SingleHost is unsupported. To maintain backward compatibility for - /// released clients the object "deleteRspInput" is used (if the object is - /// empty we assume that it is old client and continue the old behavior). - /// - /// - /// The operation to removes/delete(unregister) a recovery services provider - /// from the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - public static void BeginDelete(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + /// + /// The operation to add a recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, AddRecoveryServicesProviderInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, providerName, properties, null, cancellationToken).ConfigureAwait(false)) { - operations.BeginDeleteAsync(fabricName, providerName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to purge(force delete) a recovery services provider from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static void BeginPurge(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + ((IReplicationRecoveryServicesProvidersOperations)operations).BeginPurgeAsync(fabricName, providerName).GetAwaiter().GetResult(); + } - /// - /// Deletes provider from fabric. Note: Deleting provider for any fabric other - /// than SingleHost is unsupported. To maintain backward compatibility for - /// released clients the object "deleteRspInput" is used (if the object is - /// empty we assume that it is old client and continue the old behavior). - /// - /// - /// The operation to removes/delete(unregister) a recovery services provider - /// from the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Recovery services provider name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// The operation to purge(force delete) a recovery services provider from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginPurgeAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to refresh the information from the recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static RecoveryServicesProvider BeginRefreshProvider(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + return ((IReplicationRecoveryServicesProvidersOperations)operations).BeginRefreshProviderAsync(fabricName, providerName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of registered recovery services providers for the fabric. - /// - /// - /// Lists the registered recovery services providers for the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationFabricsNext(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink) + /// + /// The operation to refresh the information from the recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRefreshProviderAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRefreshProviderWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to removes/delete(unregister) a recovery services provider from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static void BeginDelete(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + ((IReplicationRecoveryServicesProvidersOperations)operations).BeginDeleteAsync(fabricName, providerName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of registered recovery services providers for the fabric. - /// - /// - /// Lists the registered recovery services providers for the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsNextAsync(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// The operation to removes/delete(unregister) a recovery services provider from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabricsNext(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink) + { + return ((IReplicationRecoveryServicesProvidersOperations)operations).ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of registered recovery services providers in the vault. This - /// is a view only api. - /// - /// - /// Lists the registered recovery services providers in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink) + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsNextAsync(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the registered recovery services providers in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink) + { + return ((IReplicationRecoveryServicesProvidersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of registered recovery services providers in the vault. This - /// is a view only api. - /// - /// - /// Lists the registered recovery services providers in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the registered recovery services providers in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationMappingsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationMappingsOperations.cs index 209a40ccae80..53b0a5d9860a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationMappingsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationMappingsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationStorageClassificationMappingsOperations operations. /// - internal partial class ReplicationStorageClassificationMappingsOperations : IServiceOperations, IReplicationStorageClassificationMappingsOperations + internal partial class ReplicationStorageClassificationMappingsOperations : Microsoft.Rest.IServiceOperations, IReplicationStorageClassificationMappingsOperations { /// /// Initializes a new instance of the ReplicationStorageClassificationMappingsOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationStorageClassificationMappingsOperations : ISer /// /// Thrown when a required parameter is null /// - internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManagementClient client) + internal ReplicationStorageClassificationMappingsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of storage classification mappings objects under a storage. - /// - /// /// Lists the storage classification mappings for the fabric. - /// + /// /// /// Fabric name. /// @@ -68,13 +53,13 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// 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 /// /// @@ -83,81 +68,94 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationStorageClassificationsWithHttpMessagesAsync(string fabricName, string storageClassificationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationStorageClassificationsWithHttpMessagesAsync(string fabricName, string storageClassificationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (storageClassificationName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageClassificationName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("storageClassificationName", storageClassificationName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationStorageClassifications", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationStorageClassifications", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -169,55 +167,56 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -227,9 +226,10 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -240,31 +240,32 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the details of a storage classification mapping. - /// - /// /// Gets the details of the specified storage classification mapping. - /// + /// /// /// Fabric name. /// @@ -280,13 +281,13 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// 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 /// /// @@ -295,87 +296,101 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (storageClassificationName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageClassificationName"); } + if (storageClassificationMappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationMappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageClassificationMappingName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("storageClassificationName", storageClassificationName); tracingParameters.Add("storageClassificationMappingName", storageClassificationMappingName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); _url = _url.Replace("{storageClassificationMappingName}", System.Uri.EscapeDataString(storageClassificationMappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -387,55 +402,56 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -445,9 +461,10 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -458,31 +475,32 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Create storage classification mapping. - /// - /// /// The operation to create a storage classification mapping. - /// + /// /// /// Fabric name. /// @@ -496,24 +514,21 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// Storage mapping input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Delete a storage classification mapping. - /// - /// /// The operation to delete a storage classification mapping. - /// + /// /// /// Fabric name. /// @@ -524,37 +539,34 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// Storage classification mapping name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Gets the list of storage classification mappings objects under a vault. - /// - /// /// Lists the storage classification mappings in the 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 /// /// @@ -563,69 +575,80 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassificationMappings").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -637,55 +660,56 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -695,9 +719,10 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -708,31 +733,32 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Create storage classification mapping. - /// - /// /// The operation to create a storage classification mapping. - /// + /// /// /// Fabric name. /// @@ -751,13 +777,13 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// 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 /// /// @@ -766,93 +792,107 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (storageClassificationName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageClassificationName"); } + if (storageClassificationMappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationMappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageClassificationMappingName"); } + StorageClassificationMappingInput pairingInput = new StorageClassificationMappingInput(); - if (properties != null) + if(properties != null) { pairingInput.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("storageClassificationName", storageClassificationName); tracingParameters.Add("storageClassificationMappingName", storageClassificationMappingName); + tracingParameters.Add("pairingInput", pairingInput); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); _url = _url.Replace("{storageClassificationMappingName}", System.Uri.EscapeDataString(storageClassificationMappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -864,61 +904,62 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(pairingInput != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(pairingInput, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(pairingInput, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -928,9 +969,10 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -941,31 +983,32 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Delete a storage classification mapping. - /// - /// /// The operation to delete a storage classification mapping. - /// + /// /// /// Fabric name. /// @@ -981,10 +1024,10 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -993,87 +1036,101 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (storageClassificationName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageClassificationName"); } + if (storageClassificationMappingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationMappingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageClassificationMappingName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("storageClassificationName", storageClassificationName); tracingParameters.Add("storageClassificationMappingName", storageClassificationMappingName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); _url = _url.Replace("{storageClassificationMappingName}", System.Uri.EscapeDataString(storageClassificationMappingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1085,55 +1142,56 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1143,26 +1201,28 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of storage classification mappings objects under a storage. - /// - /// /// Lists the storage classification mappings for the fabric. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1172,13 +1232,13 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// 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 /// /// @@ -1187,51 +1247,54 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationStorageClassificationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationStorageClassificationsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationStorageClassificationsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationStorageClassificationsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1243,55 +1306,56 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1301,9 +1365,10 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1314,31 +1379,32 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of storage classification mappings objects under a vault. - /// - /// /// Lists the storage classification mappings in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1348,13 +1414,13 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// 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 /// /// @@ -1363,51 +1429,54 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1419,55 +1488,56 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1477,9 +1547,10 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1490,24 +1561,28 @@ internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManageme _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationMappingsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationMappingsOperationsExtensions.cs index 6b240e18f32f..6d4b808f0cce 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationMappingsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationMappingsOperationsExtensions.cs @@ -1,451 +1,367 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationStorageClassificationMappingsOperations. + /// Extension methods for ReplicationStorageClassificationMappingsOperations /// public static partial class ReplicationStorageClassificationMappingsOperationsExtensions { - /// - /// Gets the list of storage classification mappings objects under a storage. - /// - /// - /// Lists the storage classification mappings for the fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - public static IPage ListByReplicationStorageClassifications(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName) - { - return operations.ListByReplicationStorageClassificationsAsync(fabricName, storageClassificationName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of storage classification mappings objects under a storage. - /// - /// - /// Lists the storage classification mappings for the fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationStorageClassificationsAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationStorageClassificationsWithHttpMessagesAsync(fabricName, storageClassificationName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a storage classification mapping. - /// - /// - /// Gets the details of the specified storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - public static StorageClassificationMapping Get(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName) - { - return operations.GetAsync(fabricName, storageClassificationName, storageClassificationMappingName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a storage classification mapping. - /// - /// - /// Gets the details of the specified storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create storage classification mapping. - /// - /// - /// The operation to create a storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - /// - /// Storage mapping input properties. - /// - public static StorageClassificationMapping Create(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties)) - { - return operations.CreateAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties).GetAwaiter().GetResult(); - } - - /// - /// Create storage classification mapping. - /// - /// - /// The operation to create a storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - /// - /// Storage mapping input properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a storage classification mapping. - /// - /// - /// The operation to delete a storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - public static void Delete(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName) - { - operations.DeleteAsync(fabricName, storageClassificationName, storageClassificationMappingName).GetAwaiter().GetResult(); - } - - /// - /// Delete a storage classification mapping. - /// - /// - /// The operation to delete a storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationStorageClassifications(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName) + { + return ((IReplicationStorageClassificationMappingsOperations)operations).ListByReplicationStorageClassificationsAsync(fabricName, storageClassificationName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification mappings objects under a vault. - /// - /// - /// Lists the storage classification mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationStorageClassificationMappingsOperations operations) + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationStorageClassificationsAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationStorageClassificationsWithHttpMessagesAsync(fabricName, storageClassificationName, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListAsync().GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of the specified storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + public static StorageClassificationMapping Get(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName) + { + return ((IReplicationStorageClassificationMappingsOperations)operations).GetAsync(fabricName, storageClassificationName, storageClassificationMappingName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification mappings objects under a vault. - /// - /// - /// Lists the storage classification mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationStorageClassificationMappingsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of the specified storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + public static StorageClassificationMapping Create(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties)) + { + return ((IReplicationStorageClassificationMappingsOperations)operations).CreateAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Create storage classification mapping. - /// - /// - /// The operation to create a storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - /// - /// Storage mapping input properties. - /// - public static StorageClassificationMapping BeginCreate(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties)) + /// + /// The operation to create a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCreateAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + public static void Delete(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName) + { + ((IReplicationStorageClassificationMappingsOperations)operations).DeleteAsync(fabricName, storageClassificationName, storageClassificationMappingName).GetAwaiter().GetResult(); + } - /// - /// Create storage classification mapping. - /// - /// - /// The operation to create a storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - /// - /// Storage mapping input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a storage classification mapping. - /// - /// - /// The operation to delete a storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - public static void BeginDelete(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName) - { - operations.BeginDeleteAsync(fabricName, storageClassificationName, storageClassificationMappingName).GetAwaiter().GetResult(); - } + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationStorageClassificationMappingsOperations operations) + { + return ((IReplicationStorageClassificationMappingsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Delete a storage classification mapping. - /// - /// - /// The operation to delete a storage classification mapping. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// Storage classification mapping name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationStorageClassificationMappingsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// The operation to create a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + public static StorageClassificationMapping BeginCreate(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties)) + { + return ((IReplicationStorageClassificationMappingsOperations)operations).BeginCreateAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification mappings objects under a storage. - /// - /// - /// Lists the storage classification mappings for the fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationStorageClassificationsNext(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink) + /// + /// The operation to create a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageMappingInputProperties properties = default(StorageMappingInputProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationStorageClassificationsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + public static void BeginDelete(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName) + { + ((IReplicationStorageClassificationMappingsOperations)operations).BeginDeleteAsync(fabricName, storageClassificationName, storageClassificationMappingName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification mappings objects under a storage. - /// - /// - /// Lists the storage classification mappings for the fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationStorageClassificationsNextAsync(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationStorageClassificationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationStorageClassificationsNext(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink) + { + return ((IReplicationStorageClassificationMappingsOperations)operations).ListByReplicationStorageClassificationsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification mappings objects under a vault. - /// - /// - /// Lists the storage classification mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink) + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationStorageClassificationsNextAsync(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationStorageClassificationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink) + { + return ((IReplicationStorageClassificationMappingsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification mappings objects under a vault. - /// - /// - /// Lists the storage classification mappings in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationsOperations.cs index 5ee06c98c5e3..5d53acae102a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationStorageClassificationsOperations operations. /// - internal partial class ReplicationStorageClassificationsOperations : IServiceOperations, IReplicationStorageClassificationsOperations + internal partial class ReplicationStorageClassificationsOperations : Microsoft.Rest.IServiceOperations, IReplicationStorageClassificationsOperations { /// /// Initializes a new instance of the ReplicationStorageClassificationsOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationStorageClassificationsOperations : IServiceOpe /// /// Thrown when a required parameter is null /// - internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClient client) + internal ReplicationStorageClassificationsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of storage classification objects under a fabric. - /// - /// /// Lists the storage classifications available in the specified fabric. - /// + /// /// /// Site name of interest. /// @@ -65,13 +50,13 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien /// /// 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 /// /// @@ -80,75 +65,87 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,55 +157,56 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -218,9 +216,10 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -231,31 +230,32 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the details of a storage classification. - /// - /// /// Gets the details of the specified storage classification. - /// + /// /// /// Fabric name. /// @@ -268,13 +268,13 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien /// /// 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 /// /// @@ -283,81 +283,94 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (storageClassificationName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageClassificationName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("storageClassificationName", storageClassificationName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -369,55 +382,56 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -427,9 +441,10 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -440,44 +455,45 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of storage classification objects under a vault. - /// - /// /// Lists the storage classifications in the 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 /// /// @@ -486,69 +502,80 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassifications").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -560,55 +587,56 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -618,9 +646,10 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -631,31 +660,32 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of storage classification objects under a fabric. - /// - /// /// Lists the storage classifications available in the specified fabric. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -665,13 +695,13 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien /// /// 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 /// /// @@ -680,51 +710,54 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -736,55 +769,56 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -794,9 +828,10 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -807,31 +842,32 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of storage classification objects under a vault. - /// - /// /// Lists the storage classifications in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -841,13 +877,13 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien /// /// 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 /// /// @@ -856,51 +892,54 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -912,55 +951,56 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -970,9 +1010,10 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -983,24 +1024,28 @@ internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationsOperationsExtensions.cs index acd79f97cf18..44707f170e49 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationStorageClassificationsOperationsExtensions.cs @@ -1,225 +1,181 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationStorageClassificationsOperations. + /// Extension methods for ReplicationStorageClassificationsOperations /// public static partial class ReplicationStorageClassificationsOperationsExtensions { - /// - /// Gets the list of storage classification objects under a fabric. - /// - /// - /// Lists the storage classifications available in the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Site name of interest. - /// - public static IPage ListByReplicationFabrics(this IReplicationStorageClassificationsOperations operations, string fabricName) - { - return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of storage classification objects under a fabric. - /// - /// - /// Lists the storage classifications available in the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Site name of interest. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsAsync(this IReplicationStorageClassificationsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a storage classification. - /// - /// - /// Gets the details of the specified storage classification. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - public static StorageClassification Get(this IReplicationStorageClassificationsOperations operations, string fabricName, string storageClassificationName) - { - return operations.GetAsync(fabricName, storageClassificationName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a storage classification. - /// - /// - /// Gets the details of the specified storage classification. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// Storage classification name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationStorageClassificationsOperations operations, string fabricName, string storageClassificationName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, storageClassificationName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Site name of interest. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabrics(this IReplicationStorageClassificationsOperations operations, string fabricName) + { + return ((IReplicationStorageClassificationsOperations)operations).ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification objects under a vault. - /// - /// - /// Lists the storage classifications in the vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationStorageClassificationsOperations operations) + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Site name of interest. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsAsync(this IReplicationStorageClassificationsOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListAsync().GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of the specified storage classification. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + public static StorageClassification Get(this IReplicationStorageClassificationsOperations operations, string fabricName, string storageClassificationName) + { + return ((IReplicationStorageClassificationsOperations)operations).GetAsync(fabricName, storageClassificationName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification objects under a vault. - /// - /// - /// Lists the storage classifications in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationStorageClassificationsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of the specified storage classification. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationStorageClassificationsOperations operations, string fabricName, string storageClassificationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, storageClassificationName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationStorageClassificationsOperations operations) + { + return ((IReplicationStorageClassificationsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification objects under a fabric. - /// - /// - /// Lists the storage classifications available in the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationFabricsNext(this IReplicationStorageClassificationsOperations operations, string nextPageLink) + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationStorageClassificationsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabricsNext(this IReplicationStorageClassificationsOperations operations, string nextPageLink) + { + return ((IReplicationStorageClassificationsOperations)operations).ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification objects under a fabric. - /// - /// - /// Lists the storage classifications available in the specified fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsNextAsync(this IReplicationStorageClassificationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsNextAsync(this IReplicationStorageClassificationsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationStorageClassificationsOperations operations, string nextPageLink) + { + return ((IReplicationStorageClassificationsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of storage classification objects under a vault. - /// - /// - /// Lists the storage classifications in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationStorageClassificationsOperations operations, string nextPageLink) + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationStorageClassificationsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of storage classification objects under a vault. - /// - /// - /// Lists the storage classifications in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationStorageClassificationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultHealthOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultHealthOperations.cs index 82fa84fecade..74aa500c1c23 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultHealthOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultHealthOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationVaultHealthOperations operations. /// - internal partial class ReplicationVaultHealthOperations : IServiceOperations, IReplicationVaultHealthOperations + internal partial class ReplicationVaultHealthOperations : Microsoft.Rest.IServiceOperations, IReplicationVaultHealthOperations { /// /// Initializes a new instance of the ReplicationVaultHealthOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationVaultHealthOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) + internal ReplicationVaultHealthOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,24 +39,21 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the health summary for the vault. - /// - /// /// Gets the health details of the 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 /// /// @@ -77,69 +62,80 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -151,55 +147,56 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -209,9 +206,10 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -222,39 +220,43 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Refreshes health summary of the vault. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> RefreshWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RefreshWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginRefreshWithHttpMessagesAsync(customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRefreshWithHttpMessagesAsync(customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -266,13 +268,13 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -281,69 +283,80 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginRefreshWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginRefreshWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRefresh", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRefresh", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth/default/refresh").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -355,55 +368,56 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -413,9 +427,10 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -426,24 +441,28 @@ internal ReplicationVaultHealthOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultHealthOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultHealthOperationsExtensions.cs index e027a80cd3ff..ac6b6e3111f0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultHealthOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultHealthOperationsExtensions.cs @@ -1,115 +1,97 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationVaultHealthOperations. + /// Extension methods for ReplicationVaultHealthOperations /// public static partial class ReplicationVaultHealthOperationsExtensions { - /// - /// Gets the health summary for the vault. - /// - /// - /// Gets the health details of the vault. - /// - /// - /// The operations group for this extension method. - /// - public static VaultHealthDetails Get(this IReplicationVaultHealthOperations operations) - { - return operations.GetAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets the health summary for the vault. - /// - /// - /// Gets the health details of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationVaultHealthOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Gets the health details of the vault. + /// + /// + /// The operations group for this extension method. + /// + public static VaultHealthDetails Get(this IReplicationVaultHealthOperations operations) + { + return ((IReplicationVaultHealthOperations)operations).GetAsync().GetAwaiter().GetResult(); + } - /// - /// Refreshes health summary of the vault. - /// - /// - /// The operations group for this extension method. - /// - public static VaultHealthDetails Refresh(this IReplicationVaultHealthOperations operations) + /// + /// Gets the health details of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationVaultHealthOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - return operations.RefreshAsync().GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Refreshes health summary of the vault. + /// + /// + /// The operations group for this extension method. + /// + public static VaultHealthDetails Refresh(this IReplicationVaultHealthOperations operations) + { + return ((IReplicationVaultHealthOperations)operations).RefreshAsync().GetAwaiter().GetResult(); + } - /// - /// Refreshes health summary of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task RefreshAsync(this IReplicationVaultHealthOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Refreshes health summary of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RefreshAsync(this IReplicationVaultHealthOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RefreshWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.RefreshWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Refreshes health summary of the vault. + /// + /// + /// The operations group for this extension method. + /// + public static VaultHealthDetails BeginRefresh(this IReplicationVaultHealthOperations operations) + { + return ((IReplicationVaultHealthOperations)operations).BeginRefreshAsync().GetAwaiter().GetResult(); + } - /// - /// Refreshes health summary of the vault. - /// - /// - /// The operations group for this extension method. - /// - public static VaultHealthDetails BeginRefresh(this IReplicationVaultHealthOperations operations) + /// + /// Refreshes health summary of the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRefreshAsync(this IReplicationVaultHealthOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRefreshWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginRefreshAsync().GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Refreshes health summary of the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRefreshAsync(this IReplicationVaultHealthOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginRefreshWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultSettingOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultSettingOperations.cs index 600cb40283db..aea5fd1880f4 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultSettingOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultSettingOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationVaultSettingOperations operations. /// - internal partial class ReplicationVaultSettingOperations : IServiceOperations, IReplicationVaultSettingOperations + internal partial class ReplicationVaultSettingOperations : Microsoft.Rest.IServiceOperations, IReplicationVaultSettingOperations { /// /// Initializes a new instance of the ReplicationVaultSettingOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationVaultSettingOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) + internal ReplicationVaultSettingOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,25 +39,21 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of vault setting. + /// Gets the list of vault setting. This includes the Migration Hub connection settings. /// - /// - /// Gets the list of vault setting. This includes the Migration Hub connection - /// settings. - /// /// /// 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 /// /// @@ -78,69 +62,80 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -152,55 +147,56 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -210,9 +206,10 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -223,32 +220,32 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the vault setting. + /// Gets the vault setting. This includes the Migration Hub connection settings. /// - /// - /// Gets the vault setting. This includes the Migration Hub connection - /// settings. - /// /// /// Vault setting name. /// @@ -258,13 +255,13 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -273,75 +270,87 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultSettingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string vaultSettingName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (vaultSettingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultSettingName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultSettingName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultSettingName", vaultSettingName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{vaultSettingName}", System.Uri.EscapeDataString(vaultSettingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -353,55 +362,56 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -411,9 +421,10 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -424,32 +435,32 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Updates vault setting. A vault setting object is a singleton per vault and - /// it is always present by default. - /// - /// /// The operation to configure vault setting. - /// + /// /// /// Vault setting name. /// @@ -457,25 +468,21 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) /// Vault setting creation input properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string vaultSettingName, VaultSettingCreationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string vaultSettingName, VaultSettingCreationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(vaultSettingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(vaultSettingName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Updates vault setting. A vault setting object is a singleton per vault and - /// it is always present by default. - /// - /// /// The operation to configure vault setting. - /// + /// /// /// Vault setting name. /// @@ -488,13 +495,13 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -503,85 +510,93 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string vaultSettingName, VaultSettingCreationInputProperties properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string vaultSettingName, VaultSettingCreationInputProperties properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (vaultSettingName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vaultSettingName"); - } - if (properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "properties"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultSettingName"); } + VaultSettingCreationInput input = new VaultSettingCreationInput(); - if (properties != null) + if(properties != null) { input.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("vaultSettingName", vaultSettingName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{vaultSettingName}", System.Uri.EscapeDataString(vaultSettingName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -593,61 +608,62 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) _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); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(input, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -657,9 +673,10 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -670,32 +687,32 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of vault setting. + /// Gets the list of vault setting. This includes the Migration Hub connection settings. /// - /// - /// Gets the list of vault setting. This includes the Migration Hub connection - /// settings. - /// /// /// The NextLink from the previous successful call to List operation. /// @@ -705,13 +722,13 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -720,51 +737,54 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -776,55 +796,56 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -834,9 +855,10 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -847,24 +869,28 @@ internal ReplicationVaultSettingOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultSettingOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultSettingOperationsExtensions.cs index a2bd9f35c8e9..0b987243d2a5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultSettingOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationVaultSettingOperationsExtensions.cs @@ -1,241 +1,175 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationVaultSettingOperations. + /// Extension methods for ReplicationVaultSettingOperations /// public static partial class ReplicationVaultSettingOperationsExtensions { - /// - /// Gets the list of vault setting. - /// - /// - /// Gets the list of vault setting. This includes the Migration Hub connection - /// settings. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationVaultSettingOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets the list of vault setting. - /// - /// - /// Gets the list of vault setting. This includes the Migration Hub connection - /// settings. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationVaultSettingOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the vault setting. - /// - /// - /// Gets the vault setting. This includes the Migration Hub connection - /// settings. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Vault setting name. - /// - public static VaultSetting Get(this IReplicationVaultSettingOperations operations, string vaultSettingName) - { - return operations.GetAsync(vaultSettingName).GetAwaiter().GetResult(); - } - - /// - /// Gets the vault setting. - /// - /// - /// Gets the vault setting. This includes the Migration Hub connection - /// settings. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Vault setting name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationVaultSettingOperations operations, string vaultSettingName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultSettingName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Gets the list of vault setting. This includes the Migration Hub connection settings. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationVaultSettingOperations operations) + { + return ((IReplicationVaultSettingOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Updates vault setting. A vault setting object is a singleton per vault and - /// it is always present by default. - /// - /// - /// The operation to configure vault setting. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Vault setting name. - /// - /// - /// Vault setting creation input properties. - /// - public static VaultSetting Create(this IReplicationVaultSettingOperations operations, string vaultSettingName, VaultSettingCreationInputProperties properties) + /// + /// Gets the list of vault setting. This includes the Migration Hub connection settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationVaultSettingOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - return operations.CreateAsync(vaultSettingName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the vault setting. This includes the Migration Hub connection settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Vault setting name. + /// + public static VaultSetting Get(this IReplicationVaultSettingOperations operations, string vaultSettingName) + { + return ((IReplicationVaultSettingOperations)operations).GetAsync(vaultSettingName).GetAwaiter().GetResult(); + } - /// - /// Updates vault setting. A vault setting object is a singleton per vault and - /// it is always present by default. - /// - /// - /// The operation to configure vault setting. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Vault setting name. - /// - /// - /// Vault setting creation input properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationVaultSettingOperations operations, string vaultSettingName, VaultSettingCreationInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the vault setting. This includes the Migration Hub connection settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Vault setting name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationVaultSettingOperations operations, string vaultSettingName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultSettingName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(vaultSettingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to configure vault setting. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Vault setting name. + /// + public static VaultSetting Create(this IReplicationVaultSettingOperations operations, string vaultSettingName, VaultSettingCreationInputProperties properties) + { + return ((IReplicationVaultSettingOperations)operations).CreateAsync(vaultSettingName, properties).GetAwaiter().GetResult(); + } - /// - /// Updates vault setting. A vault setting object is a singleton per vault and - /// it is always present by default. - /// - /// - /// The operation to configure vault setting. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Vault setting name. - /// - /// - /// Vault setting creation input properties. - /// - public static VaultSetting BeginCreate(this IReplicationVaultSettingOperations operations, string vaultSettingName, VaultSettingCreationInputProperties properties) + /// + /// The operation to configure vault setting. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Vault setting name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationVaultSettingOperations operations, string vaultSettingName, VaultSettingCreationInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(vaultSettingName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCreateAsync(vaultSettingName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to configure vault setting. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Vault setting name. + /// + public static VaultSetting BeginCreate(this IReplicationVaultSettingOperations operations, string vaultSettingName, VaultSettingCreationInputProperties properties) + { + return ((IReplicationVaultSettingOperations)operations).BeginCreateAsync(vaultSettingName, properties).GetAwaiter().GetResult(); + } - /// - /// Updates vault setting. A vault setting object is a singleton per vault and - /// it is always present by default. - /// - /// - /// The operation to configure vault setting. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Vault setting name. - /// - /// - /// Vault setting creation input properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationVaultSettingOperations operations, string vaultSettingName, VaultSettingCreationInputProperties properties, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// The operation to configure vault setting. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Vault setting name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationVaultSettingOperations operations, string vaultSettingName, VaultSettingCreationInputProperties properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(vaultSettingName, properties, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(vaultSettingName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the list of vault setting. This includes the Migration Hub connection settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationVaultSettingOperations operations, string nextPageLink) + { + return ((IReplicationVaultSettingOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of vault setting. - /// - /// - /// Gets the list of vault setting. This includes the Migration Hub connection - /// settings. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationVaultSettingOperations operations, string nextPageLink) + /// + /// Gets the list of vault setting. This includes the Migration Hub connection settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationVaultSettingOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of vault setting. - /// - /// - /// Gets the list of vault setting. This includes the Migration Hub connection - /// settings. - /// - /// - /// 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 IReplicationVaultSettingOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationvCentersOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationvCentersOperations.cs index 7a552aad613c..ee83261dd44c 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationvCentersOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationvCentersOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// ReplicationvCentersOperations operations. /// - internal partial class ReplicationvCentersOperations : IServiceOperations, IReplicationvCentersOperations + internal partial class ReplicationvCentersOperations : Microsoft.Rest.IServiceOperations, IReplicationvCentersOperations { /// /// Initializes a new instance of the ReplicationvCentersOperations class. @@ -36,13 +24,13 @@ internal partial class ReplicationvCentersOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) + internal ReplicationvCentersOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of vCenter registered under a fabric. - /// - /// /// Lists the vCenter servers registered in a fabric. - /// + /// /// /// Fabric name. /// @@ -65,13 +50,13 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -80,75 +65,87 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -160,55 +157,56 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -218,9 +216,10 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -231,31 +230,32 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the details of a vCenter. - /// - /// /// Gets the details of a registered vCenter server(Add vCenter server). - /// + /// /// /// Fabric name. /// @@ -268,13 +268,13 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -283,81 +283,94 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string fabricName, string vcenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string fabricName, string vcenterName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (vcenterName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vcenterName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vcenterName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("vcenterName", vcenterName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{vcenterName}", System.Uri.EscapeDataString(vcenterName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -369,55 +382,56 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -427,9 +441,10 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -440,31 +455,32 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Add vCenter. - /// - /// /// The operation to create a vCenter object.. - /// + /// /// /// Fabric name. /// @@ -475,25 +491,21 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// The properties of an add vCenter request. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateWithHttpMessagesAsync(string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, vcenterName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, vcenterName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Remove vcenter operation. + /// The operation to remove(unregister) a registered vCenter server from the vault. /// - /// - /// The operation to remove(unregister) a registered vCenter server from the - /// vault. - /// /// /// Fabric name. /// @@ -501,24 +513,21 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// vcenter name. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string fabricName, string vcenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string fabricName, string vcenterName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, vcenterName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, vcenterName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Update vCenter operation. - /// - /// /// The operation to update a registered vCenter. - /// + /// /// /// Fabric name. /// @@ -529,37 +538,34 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// The update VCenter Request Properties. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateWithHttpMessagesAsync(string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, vcenterName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, vcenterName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Gets the list of vCenter registered under the vault. - /// - /// /// Lists the vCenter servers registered in the 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 /// /// @@ -568,69 +574,80 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationvCenters").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -642,55 +659,56 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -700,9 +718,10 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -713,31 +732,32 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Add vCenter. - /// - /// /// The operation to create a vCenter object.. - /// + /// /// /// Fabric name. /// @@ -753,13 +773,13 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -768,87 +788,100 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateWithHttpMessagesAsync(string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (vcenterName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vcenterName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vcenterName"); } + AddVCenterRequest addVCenterRequest = new AddVCenterRequest(); - if (properties != null) + if(properties != null) { addVCenterRequest.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("vcenterName", vcenterName); + tracingParameters.Add("addVCenterRequest", addVCenterRequest); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{vcenterName}", System.Uri.EscapeDataString(vcenterName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -860,61 +893,62 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(addVCenterRequest != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(addVCenterRequest, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(addVCenterRequest, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -924,9 +958,10 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -937,32 +972,32 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Remove vcenter operation. + /// The operation to remove(unregister) a registered vCenter server from the vault. /// - /// - /// The operation to remove(unregister) a registered vCenter server from the - /// vault. - /// /// /// Fabric name. /// @@ -975,10 +1010,10 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -987,81 +1022,94 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string fabricName, string vcenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string fabricName, string vcenterName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (vcenterName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vcenterName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vcenterName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("vcenterName", vcenterName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{vcenterName}", System.Uri.EscapeDataString(vcenterName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1073,55 +1121,56 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1131,26 +1180,28 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Update vCenter operation. - /// - /// /// The operation to update a registered vCenter. - /// + /// /// /// Fabric name. /// @@ -1166,13 +1217,13 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1181,87 +1232,100 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (vcenterName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "vcenterName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vcenterName"); } + UpdateVCenterRequest updateVCenterRequest = new UpdateVCenterRequest(); - if (properties != null) + if(properties != null) { updateVCenterRequest.Properties = properties; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("vcenterName", vcenterName); + tracingParameters.Add("updateVCenterRequest", updateVCenterRequest); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{vcenterName}", System.Uri.EscapeDataString(vcenterName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.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("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1273,61 +1337,62 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(updateVCenterRequest != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateVCenterRequest, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(updateVCenterRequest, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.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) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1337,9 +1402,10 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1350,31 +1416,32 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of vCenter registered under a fabric. - /// - /// /// Lists the vCenter servers registered in a fabric. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1384,13 +1451,13 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1399,51 +1466,54 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1455,55 +1525,56 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1513,9 +1584,10 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1526,31 +1598,32 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of vCenter registered under the vault. - /// - /// /// Lists the vCenter servers registered in the vault. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1560,13 +1633,13 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -1575,51 +1648,54 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1631,55 +1707,56 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1689,9 +1766,10 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1702,24 +1780,28 @@ internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationvCentersOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationvCentersOperationsExtensions.cs index f919c526c041..b0a22dbb44dc 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationvCentersOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/ReplicationvCentersOperationsExtensions.cs @@ -1,523 +1,409 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ReplicationvCentersOperations. + /// Extension methods for ReplicationvCentersOperations /// public static partial class ReplicationvCentersOperationsExtensions { - /// - /// Gets the list of vCenter registered under a fabric. - /// - /// - /// Lists the vCenter servers registered in a fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - public static IPage ListByReplicationFabrics(this IReplicationvCentersOperations operations, string fabricName) - { - return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of vCenter registered under a fabric. - /// - /// - /// Lists the vCenter servers registered in a fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsAsync(this IReplicationvCentersOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a vCenter. - /// - /// - /// Gets the details of a registered vCenter server(Add vCenter server). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - public static VCenter Get(this IReplicationvCentersOperations operations, string fabricName, string vcenterName) - { - return operations.GetAsync(fabricName, vcenterName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a vCenter. - /// - /// - /// Gets the details of a registered vCenter server(Add vCenter server). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, vcenterName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Add vCenter. - /// - /// - /// The operation to create a vCenter object.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The properties of an add vCenter request. - /// - public static VCenter Create(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties)) - { - return operations.CreateAsync(fabricName, vcenterName, properties).GetAwaiter().GetResult(); - } - - /// - /// Add vCenter. - /// - /// - /// The operation to create a vCenter object.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The properties of an add vCenter request. - /// - /// - /// The cancellation token. - /// - public static async Task CreateAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, vcenterName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Remove vcenter operation. - /// - /// - /// The operation to remove(unregister) a registered vCenter server from the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - public static void Delete(this IReplicationvCentersOperations operations, string fabricName, string vcenterName) - { - operations.DeleteAsync(fabricName, vcenterName).GetAwaiter().GetResult(); - } - - /// - /// Remove vcenter operation. - /// - /// - /// The operation to remove(unregister) a registered vCenter server from the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(fabricName, vcenterName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabrics(this IReplicationvCentersOperations operations, string fabricName) + { + return ((IReplicationvCentersOperations)operations).ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } - /// - /// Update vCenter operation. - /// - /// - /// The operation to update a registered vCenter. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The update VCenter Request Properties. - /// - public static VCenter Update(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties)) + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsAsync(this IReplicationvCentersOperations operations, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) { - return operations.UpdateAsync(fabricName, vcenterName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets the details of a registered vCenter server(Add vCenter server). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + public static VCenter Get(this IReplicationvCentersOperations operations, string fabricName, string vcenterName) + { + return ((IReplicationvCentersOperations)operations).GetAsync(fabricName, vcenterName).GetAwaiter().GetResult(); + } - /// - /// Update vCenter operation. - /// - /// - /// The operation to update a registered vCenter. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The update VCenter Request Properties. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the details of a registered vCenter server(Add vCenter server). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, vcenterName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, vcenterName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create a vCenter object.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + public static VCenter Create(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties)) + { + return ((IReplicationvCentersOperations)operations).CreateAsync(fabricName, vcenterName, properties).GetAwaiter().GetResult(); + } - /// - /// Gets the list of vCenter registered under the vault. - /// - /// - /// Lists the vCenter servers registered in the vault. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IReplicationvCentersOperations operations) + /// + /// The operation to create a vCenter object.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, vcenterName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListAsync().GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to remove(unregister) a registered vCenter server from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + public static void Delete(this IReplicationvCentersOperations operations, string fabricName, string vcenterName) + { + ((IReplicationvCentersOperations)operations).DeleteAsync(fabricName, vcenterName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of vCenter registered under the vault. - /// - /// - /// Lists the vCenter servers registered in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IReplicationvCentersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// The operation to remove(unregister) a registered vCenter server from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, vcenterName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update a registered vCenter. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + public static VCenter Update(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties)) + { + return ((IReplicationvCentersOperations)operations).UpdateAsync(fabricName, vcenterName, properties).GetAwaiter().GetResult(); + } - /// - /// Add vCenter. - /// - /// - /// The operation to create a vCenter object.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The properties of an add vCenter request. - /// - public static VCenter BeginCreate(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties)) + /// + /// The operation to update a registered vCenter. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, vcenterName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCreateAsync(fabricName, vcenterName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IReplicationvCentersOperations operations) + { + return ((IReplicationvCentersOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Add vCenter. - /// - /// - /// The operation to create a vCenter object.. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The properties of an add vCenter request. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IReplicationvCentersOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, vcenterName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// The operation to create a vCenter object.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + public static VCenter BeginCreate(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties)) + { + return ((IReplicationvCentersOperations)operations).BeginCreateAsync(fabricName, vcenterName, properties).GetAwaiter().GetResult(); + } - /// - /// Remove vcenter operation. - /// - /// - /// The operation to remove(unregister) a registered vCenter server from the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - public static void BeginDelete(this IReplicationvCentersOperations operations, string fabricName, string vcenterName) + /// + /// The operation to create a vCenter object.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, AddVCenterRequestProperties properties = default(AddVCenterRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, vcenterName, properties, null, cancellationToken).ConfigureAwait(false)) { - operations.BeginDeleteAsync(fabricName, vcenterName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// The operation to remove(unregister) a registered vCenter server from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + public static void BeginDelete(this IReplicationvCentersOperations operations, string fabricName, string vcenterName) + { + ((IReplicationvCentersOperations)operations).BeginDeleteAsync(fabricName, vcenterName).GetAwaiter().GetResult(); + } - /// - /// Remove vcenter operation. - /// - /// - /// The operation to remove(unregister) a registered vCenter server from the - /// vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, vcenterName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// The operation to remove(unregister) a registered vCenter server from the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, vcenterName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// The operation to update a registered vCenter. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + public static VCenter BeginUpdate(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties)) + { + return ((IReplicationvCentersOperations)operations).BeginUpdateAsync(fabricName, vcenterName, properties).GetAwaiter().GetResult(); + } - /// - /// Update vCenter operation. - /// - /// - /// The operation to update a registered vCenter. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The update VCenter Request Properties. - /// - public static VCenter BeginUpdate(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties)) + /// + /// The operation to update a registered vCenter. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vcenter name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, vcenterName, properties, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginUpdateAsync(fabricName, vcenterName, properties).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationFabricsNext(this IReplicationvCentersOperations operations, string nextPageLink) + { + return ((IReplicationvCentersOperations)operations).ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Update vCenter operation. - /// - /// - /// The operation to update a registered vCenter. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// vcenter name. - /// - /// - /// The update VCenter Request Properties. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IReplicationvCentersOperations operations, string fabricName, string vcenterName, UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationFabricsNextAsync(this IReplicationvCentersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, vcenterName, properties, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IReplicationvCentersOperations operations, string nextPageLink) + { + return ((IReplicationvCentersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of vCenter registered under a fabric. - /// - /// - /// Lists the vCenter servers registered in a fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationFabricsNext(this IReplicationvCentersOperations operations, string nextPageLink) + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IReplicationvCentersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of vCenter registered under a fabric. - /// - /// - /// Lists the vCenter servers registered in a fabric. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationFabricsNextAsync(this IReplicationvCentersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of vCenter registered under the vault. - /// - /// - /// Lists the vCenter servers registered in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IReplicationvCentersOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of vCenter registered under the vault. - /// - /// - /// Lists the vCenter servers registered in the vault. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IReplicationvCentersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SdkInfo_SiteRecoveryManagementClient.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SdkInfo_SiteRecoveryManagementClient.cs deleted file mode 100644 index ee31663c7307..000000000000 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SdkInfo_SiteRecoveryManagementClient.cs +++ /dev/null @@ -1,54 +0,0 @@ - -// -// 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.SiteRecovery -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_SiteRecoveryManagementClient - { - get - { - return new Tuple[] - { - new Tuple("Compute", "ReplicationEligibilityResults", "2023-02-01"), - new Tuple("RecoveryServices", "MigrationRecoveryPoints", "2023-02-01"), - new Tuple("RecoveryServices", "Operations", "2023-02-01"), - new Tuple("RecoveryServices", "RecoveryPoints", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationAlertSettings", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationAppliances", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationEvents", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationFabrics", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationJobs", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationLogicalNetworks", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationMigrationItems", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationNetworkMappings", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationNetworks", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationPolicies", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationProtectableItems", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationProtectedItems", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationProtectionContainerMappings", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationProtectionContainers", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationProtectionIntents", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationRecoveryPlans", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationRecoveryServicesProviders", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationStorageClassificationMappings", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationStorageClassifications", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationVaultHealth", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationVaultSetting", "2023-02-01"), - new Tuple("RecoveryServices", "ReplicationvCenters", "2023-02-01"), - new Tuple("RecoveryServices", "SupportedOperatingSystems", "2023-02-01"), - new Tuple("RecoveryServices", "TargetComputeSizes", "2023-02-01"), - }.AsEnumerable(); - } - } - } -} diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SiteRecoveryManagementClient.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SiteRecoveryManagementClient.cs index 319c33ac3c41..83dfed523734 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SiteRecoveryManagementClient.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SiteRecoveryManagementClient.cs @@ -1,227 +1,184 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - public partial class SiteRecoveryManagementClient : ServiceClient, ISiteRecoveryManagementClient, IAzureClient + public partial class SiteRecoveryManagementClient : Microsoft.Rest.ServiceClient, ISiteRecoveryManagementClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// - /// The subscription Id. + /// The API version to use for this operation. /// - public string SubscriptionId { get; set; } + public string ApiVersion { get; private set; } /// - /// The name of the resource group where the recovery services vault is - /// present. + /// The subscription Id. /// - public string ResourceGroupName { get; set; } + public string SubscriptionId { get; set;} /// - /// The name of the recovery services vault. + /// The name of the resource group where the recovery services vault is present. /// - public string ResourceName { get; set; } + public string ResourceGroupName { get; set;} /// - /// Client Api Version. + /// The name of the recovery services vault. /// - public string ApiVersion { get; private set; } + public string ResourceName { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// 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; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// 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. + /// 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; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IOperations. + /// Gets the IOperations /// public virtual IOperations Operations { get; private set; } - /// - /// Gets the IReplicationAlertSettingsOperations. + /// Gets the IReplicationAlertSettingsOperations /// public virtual IReplicationAlertSettingsOperations ReplicationAlertSettings { get; private set; } - /// - /// Gets the IReplicationAppliancesOperations. + /// Gets the IReplicationAppliancesOperations /// public virtual IReplicationAppliancesOperations ReplicationAppliances { get; private set; } - /// - /// Gets the IReplicationEligibilityResultsOperations. + /// Gets the IReplicationEligibilityResultsOperations /// public virtual IReplicationEligibilityResultsOperations ReplicationEligibilityResults { get; private set; } - /// - /// Gets the IReplicationEventsOperations. + /// Gets the IReplicationEventsOperations /// public virtual IReplicationEventsOperations ReplicationEvents { get; private set; } - /// - /// Gets the IReplicationFabricsOperations. + /// Gets the IReplicationFabricsOperations /// public virtual IReplicationFabricsOperations ReplicationFabrics { get; private set; } - /// - /// Gets the IReplicationLogicalNetworksOperations. + /// Gets the IReplicationLogicalNetworksOperations /// public virtual IReplicationLogicalNetworksOperations ReplicationLogicalNetworks { get; private set; } - /// - /// Gets the IReplicationNetworksOperations. + /// Gets the IReplicationNetworksOperations /// public virtual IReplicationNetworksOperations ReplicationNetworks { get; private set; } - /// - /// Gets the IReplicationNetworkMappingsOperations. + /// Gets the IReplicationNetworkMappingsOperations /// public virtual IReplicationNetworkMappingsOperations ReplicationNetworkMappings { get; private set; } - /// - /// Gets the IReplicationProtectionContainersOperations. + /// Gets the IReplicationProtectionContainersOperations /// public virtual IReplicationProtectionContainersOperations ReplicationProtectionContainers { get; private set; } - /// - /// Gets the IReplicationMigrationItemsOperations. + /// Gets the IReplicationMigrationItemsOperations /// public virtual IReplicationMigrationItemsOperations ReplicationMigrationItems { get; private set; } - /// - /// Gets the IMigrationRecoveryPointsOperations. + /// Gets the IMigrationRecoveryPointsOperations /// public virtual IMigrationRecoveryPointsOperations MigrationRecoveryPoints { get; private set; } - /// - /// Gets the IReplicationProtectableItemsOperations. + /// Gets the IReplicationProtectableItemsOperations /// public virtual IReplicationProtectableItemsOperations ReplicationProtectableItems { get; private set; } - /// - /// Gets the IReplicationProtectedItemsOperations. + /// Gets the IReplicationProtectedItemsOperations /// public virtual IReplicationProtectedItemsOperations ReplicationProtectedItems { get; private set; } - /// - /// Gets the IRecoveryPointsOperations. + /// Gets the IRecoveryPointsOperations /// public virtual IRecoveryPointsOperations RecoveryPoints { get; private set; } - /// - /// Gets the ITargetComputeSizesOperations. + /// Gets the ITargetComputeSizesOperations /// public virtual ITargetComputeSizesOperations TargetComputeSizes { get; private set; } - /// - /// Gets the IReplicationProtectionContainerMappingsOperations. + /// Gets the IReplicationProtectionContainerMappingsOperations /// public virtual IReplicationProtectionContainerMappingsOperations ReplicationProtectionContainerMappings { get; private set; } - /// - /// Gets the IReplicationRecoveryServicesProvidersOperations. + /// Gets the IReplicationRecoveryServicesProvidersOperations /// public virtual IReplicationRecoveryServicesProvidersOperations ReplicationRecoveryServicesProviders { get; private set; } - /// - /// Gets the IReplicationStorageClassificationsOperations. + /// Gets the IReplicationStorageClassificationsOperations /// public virtual IReplicationStorageClassificationsOperations ReplicationStorageClassifications { get; private set; } - /// - /// Gets the IReplicationStorageClassificationMappingsOperations. + /// Gets the IReplicationStorageClassificationMappingsOperations /// public virtual IReplicationStorageClassificationMappingsOperations ReplicationStorageClassificationMappings { get; private set; } - /// - /// Gets the IReplicationvCentersOperations. + /// Gets the IReplicationvCentersOperations /// public virtual IReplicationvCentersOperations ReplicationvCenters { get; private set; } - /// - /// Gets the IReplicationJobsOperations. + /// Gets the IReplicationJobsOperations /// public virtual IReplicationJobsOperations ReplicationJobs { get; private set; } - /// - /// Gets the IReplicationPoliciesOperations. + /// Gets the IReplicationPoliciesOperations /// public virtual IReplicationPoliciesOperations ReplicationPolicies { get; private set; } - /// - /// Gets the IReplicationProtectionIntentsOperations. + /// Gets the IReplicationProtectionIntentsOperations /// public virtual IReplicationProtectionIntentsOperations ReplicationProtectionIntents { get; private set; } - /// - /// Gets the IReplicationRecoveryPlansOperations. + /// Gets the IReplicationRecoveryPlansOperations /// public virtual IReplicationRecoveryPlansOperations ReplicationRecoveryPlans { get; private set; } - /// - /// Gets the ISupportedOperatingSystemsOperations. + /// Gets the ISupportedOperatingSystemsOperations /// public virtual ISupportedOperatingSystemsOperations SupportedOperatingSystems { get; private set; } - /// - /// Gets the IReplicationVaultHealthOperations. + /// Gets the IReplicationVaultHealthOperations /// public virtual IReplicationVaultHealthOperations ReplicationVaultHealth { get; private set; } - /// - /// Gets the IReplicationVaultSettingOperations. + /// Gets the IReplicationVaultSettingOperations /// public virtual IReplicationVaultSettingOperations ReplicationVaultSetting { get; private set; } - /// /// Initializes a new instance of the SiteRecoveryManagementClient class. /// @@ -230,24 +187,22 @@ public partial class SiteRecoveryManagementClient : ServiceClient /// /// True: will dispose the provided httpClient on calling SiteRecoveryManagementClient.Dispose(). False: will not dispose provided httpClient - protected SiteRecoveryManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected SiteRecoveryManagementClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the SiteRecoveryManagementClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected SiteRecoveryManagementClient(params DelegatingHandler[] handlers) : base(handlers) + protected SiteRecoveryManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the SiteRecoveryManagementClient class. + /// Initializes a new instance of the SiteRecoveryManagementClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -255,11 +210,10 @@ protected SiteRecoveryManagementClient(params DelegatingHandler[] handlers) : ba /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected SiteRecoveryManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected SiteRecoveryManagementClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the SiteRecoveryManagementClient class. /// @@ -272,15 +226,14 @@ protected SiteRecoveryManagementClient(HttpClientHandler rootHandler, params Del /// /// Thrown when a required parameter is null /// - protected SiteRecoveryManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected SiteRecoveryManagementClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the SiteRecoveryManagementClient class. /// @@ -296,15 +249,15 @@ protected SiteRecoveryManagementClient(System.Uri baseUri, params DelegatingHand /// /// Thrown when a required parameter is null /// - protected SiteRecoveryManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected SiteRecoveryManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the SiteRecoveryManagementClient class. /// @@ -317,23 +270,23 @@ protected SiteRecoveryManagementClient(System.Uri baseUri, HttpClientHandler roo /// /// Thrown when a required parameter is null /// - public SiteRecoveryManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public SiteRecoveryManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the SiteRecoveryManagementClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -344,23 +297,23 @@ public SiteRecoveryManagementClient(ServiceClientCredentials credentials, params /// /// Thrown when a required parameter is null /// - public SiteRecoveryManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public SiteRecoveryManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the SiteRecoveryManagementClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -372,26 +325,26 @@ public SiteRecoveryManagementClient(ServiceClientCredentials credentials, HttpCl /// /// Thrown when a required parameter is null /// - public SiteRecoveryManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public SiteRecoveryManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the SiteRecoveryManagementClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -400,7 +353,7 @@ public SiteRecoveryManagementClient(ServiceClientCredentials credentials, HttpCl /// /// Thrown when a required parameter is null /// - public SiteRecoveryManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public SiteRecoveryManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -410,33 +363,30 @@ public SiteRecoveryManagementClient(System.Uri baseUri, ServiceClientCredentials { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the SiteRecoveryManagementClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public SiteRecoveryManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public SiteRecoveryManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -446,187 +396,196 @@ public SiteRecoveryManagementClient(System.Uri baseUri, ServiceClientCredentials { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - Operations = new Operations(this); - ReplicationAlertSettings = new ReplicationAlertSettingsOperations(this); - ReplicationAppliances = new ReplicationAppliancesOperations(this); - ReplicationEligibilityResults = new ReplicationEligibilityResultsOperations(this); - ReplicationEvents = new ReplicationEventsOperations(this); - ReplicationFabrics = new ReplicationFabricsOperations(this); - ReplicationLogicalNetworks = new ReplicationLogicalNetworksOperations(this); - ReplicationNetworks = new ReplicationNetworksOperations(this); - ReplicationNetworkMappings = new ReplicationNetworkMappingsOperations(this); - ReplicationProtectionContainers = new ReplicationProtectionContainersOperations(this); - ReplicationMigrationItems = new ReplicationMigrationItemsOperations(this); - MigrationRecoveryPoints = new MigrationRecoveryPointsOperations(this); - ReplicationProtectableItems = new ReplicationProtectableItemsOperations(this); - ReplicationProtectedItems = new ReplicationProtectedItemsOperations(this); - RecoveryPoints = new RecoveryPointsOperations(this); - TargetComputeSizes = new TargetComputeSizesOperations(this); - ReplicationProtectionContainerMappings = new ReplicationProtectionContainerMappingsOperations(this); - ReplicationRecoveryServicesProviders = new ReplicationRecoveryServicesProvidersOperations(this); - ReplicationStorageClassifications = new ReplicationStorageClassificationsOperations(this); - ReplicationStorageClassificationMappings = new ReplicationStorageClassificationMappingsOperations(this); - ReplicationvCenters = new ReplicationvCentersOperations(this); - ReplicationJobs = new ReplicationJobsOperations(this); - ReplicationPolicies = new ReplicationPoliciesOperations(this); - ReplicationProtectionIntents = new ReplicationProtectionIntentsOperations(this); - ReplicationRecoveryPlans = new ReplicationRecoveryPlansOperations(this); - SupportedOperatingSystems = new SupportedOperatingSystemsOperations(this); - ReplicationVaultHealth = new ReplicationVaultHealthOperations(this); - ReplicationVaultSetting = new ReplicationVaultSettingOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2023-02-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.Operations = new Operations(this); + this.ReplicationAlertSettings = new ReplicationAlertSettingsOperations(this); + this.ReplicationAppliances = new ReplicationAppliancesOperations(this); + this.ReplicationEligibilityResults = new ReplicationEligibilityResultsOperations(this); + this.ReplicationEvents = new ReplicationEventsOperations(this); + this.ReplicationFabrics = new ReplicationFabricsOperations(this); + this.ReplicationLogicalNetworks = new ReplicationLogicalNetworksOperations(this); + this.ReplicationNetworks = new ReplicationNetworksOperations(this); + this.ReplicationNetworkMappings = new ReplicationNetworkMappingsOperations(this); + this.ReplicationProtectionContainers = new ReplicationProtectionContainersOperations(this); + this.ReplicationMigrationItems = new ReplicationMigrationItemsOperations(this); + this.MigrationRecoveryPoints = new MigrationRecoveryPointsOperations(this); + this.ReplicationProtectableItems = new ReplicationProtectableItemsOperations(this); + this.ReplicationProtectedItems = new ReplicationProtectedItemsOperations(this); + this.RecoveryPoints = new RecoveryPointsOperations(this); + this.TargetComputeSizes = new TargetComputeSizesOperations(this); + this.ReplicationProtectionContainerMappings = new ReplicationProtectionContainerMappingsOperations(this); + this.ReplicationRecoveryServicesProviders = new ReplicationRecoveryServicesProvidersOperations(this); + this.ReplicationStorageClassifications = new ReplicationStorageClassificationsOperations(this); + this.ReplicationStorageClassificationMappings = new ReplicationStorageClassificationMappingsOperations(this); + this.ReplicationvCenters = new ReplicationvCentersOperations(this); + this.ReplicationJobs = new ReplicationJobsOperations(this); + this.ReplicationPolicies = new ReplicationPoliciesOperations(this); + this.ReplicationProtectionIntents = new ReplicationProtectionIntentsOperations(this); + this.ReplicationRecoveryPlans = new ReplicationRecoveryPlansOperations(this); + this.SupportedOperatingSystems = new SupportedOperatingSystemsOperations(this); + this.ReplicationVaultHealth = new ReplicationVaultHealthOperations(this); + this.ReplicationVaultSetting = new ReplicationVaultSettingOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2023-02-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - DeserializationSettings = new JsonSerializerSettings + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("resourceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("resourceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("resourceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("resourceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("resourceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("resourceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("resourceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("resourceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("resourceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("resourceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("resourceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("resourceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); - SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); - DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resourceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resourceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resourceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resourceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resourceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resourceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resourceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resourceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resourceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resourceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("resourceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("resourceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.PolymorphicDeserializeJsonConverter("instanceType")); CustomInitialize(); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SupportedOperatingSystemsOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SupportedOperatingSystemsOperations.cs index 394b9b00c28d..ab00ca16216d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SupportedOperatingSystemsOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SupportedOperatingSystemsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// SupportedOperatingSystemsOperations operations. /// - internal partial class SupportedOperatingSystemsOperations : IServiceOperations, ISupportedOperatingSystemsOperations + internal partial class SupportedOperatingSystemsOperations : Microsoft.Rest.IServiceOperations, ISupportedOperatingSystemsOperations { /// /// Initializes a new instance of the SupportedOperatingSystemsOperations class. @@ -36,13 +24,13 @@ internal partial class SupportedOperatingSystemsOperations : IServiceOperations< /// /// Thrown when a required parameter is null /// - internal SupportedOperatingSystemsOperations(SiteRecoveryManagementClient client) + internal SupportedOperatingSystemsOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -62,13 +50,13 @@ internal SupportedOperatingSystemsOperations(SiteRecoveryManagementClient client /// /// 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 /// /// @@ -77,45 +65,58 @@ internal SupportedOperatingSystemsOperations(SiteRecoveryManagementClient client /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string instanceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string instanceType = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("instanceType", instanceType); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationSupportedOperatingSystems").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (instanceType != null) { @@ -126,25 +127,24 @@ internal SupportedOperatingSystemsOperations(SiteRecoveryManagementClient client _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -156,55 +156,56 @@ internal SupportedOperatingSystemsOperations(SiteRecoveryManagementClient client _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -214,9 +215,10 @@ internal SupportedOperatingSystemsOperations(SiteRecoveryManagementClient client throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -227,24 +229,28 @@ internal SupportedOperatingSystemsOperations(SiteRecoveryManagementClient client _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SupportedOperatingSystemsOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SupportedOperatingSystemsOperationsExtensions.cs index 5e742c4bcf3e..a7a5f241e24a 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SupportedOperatingSystemsOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/SupportedOperatingSystemsOperationsExtensions.cs @@ -1,59 +1,49 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for SupportedOperatingSystemsOperations. + /// Extension methods for SupportedOperatingSystemsOperations /// public static partial class SupportedOperatingSystemsOperationsExtensions { - /// - /// Gets the data of supported operating systems by SRS. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The instance type. - /// - public static SupportedOperatingSystems Get(this ISupportedOperatingSystemsOperations operations, string instanceType = default(string)) - { - return operations.GetAsync(instanceType).GetAwaiter().GetResult(); - } + /// + /// Gets the data of supported operating systems by SRS. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The instance type. + /// + public static SupportedOperatingSystems Get(this ISupportedOperatingSystemsOperations operations, string instanceType = default(string)) + { + return ((ISupportedOperatingSystemsOperations)operations).GetAsync(instanceType).GetAwaiter().GetResult(); + } - /// - /// Gets the data of supported operating systems by SRS. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The instance type. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ISupportedOperatingSystemsOperations operations, string instanceType = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the data of supported operating systems by SRS. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The instance type. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this ISupportedOperatingSystemsOperations operations, string instanceType = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(instanceType, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(instanceType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/TargetComputeSizesOperations.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/TargetComputeSizesOperations.cs index fb9208657188..1397437fa246 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/TargetComputeSizesOperations.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/TargetComputeSizesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { + using System.Linq; 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; /// /// TargetComputeSizesOperations operations. /// - internal partial class TargetComputeSizesOperations : IServiceOperations, ITargetComputeSizesOperations + internal partial class TargetComputeSizesOperations : Microsoft.Rest.IServiceOperations, ITargetComputeSizesOperations { /// /// Initializes a new instance of the TargetComputeSizesOperations class. @@ -36,13 +24,13 @@ internal partial class TargetComputeSizesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) + internal TargetComputeSizesOperations (SiteRecoveryManagementClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,11 +39,8 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) public SiteRecoveryManagementClient Client { get; private set; } /// - /// Gets the list of target compute sizes for the replication protected item. - /// - /// /// Lists the available target compute sizes for a replication protected item. - /// + /// /// /// Fabric name. /// @@ -71,13 +56,13 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -86,87 +71,101 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ResourceName == null) + + if (this.Client.ResourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceName"); } - if (Client.ResourceGroupName == null) + + if (this.Client.ResourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (fabricName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "fabricName"); } + if (protectionContainerName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "protectionContainerName"); } + if (replicatedProtectedItemName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "replicatedProtectedItemName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("fabricName", fabricName); tracingParameters.Add("protectionContainerName", protectionContainerName); tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItems", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItems", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/targetComputeSizes").ToString(); - _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(this.Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -178,55 +177,56 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -236,9 +236,10 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -249,31 +250,32 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the list of target compute sizes for the replication protected item. - /// - /// /// Lists the available target compute sizes for a replication protected item. - /// + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -283,13 +285,13 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) /// /// 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 /// /// @@ -298,51 +300,54 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItemsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItemsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -354,55 +359,56 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.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); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.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); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -412,9 +418,10 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -425,24 +432,28 @@ internal TargetComputeSizesOperations(SiteRecoveryManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/TargetComputeSizesOperationsExtensions.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/TargetComputeSizesOperationsExtensions.cs index 25d145734141..b5e74a7e1b05 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/TargetComputeSizesOperationsExtensions.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/Generated/TargetComputeSizesOperationsExtensions.cs @@ -1,117 +1,94 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// 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. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for TargetComputeSizesOperations. + /// Extension methods for TargetComputeSizesOperations /// public static partial class TargetComputeSizesOperationsExtensions { - /// - /// Gets the list of target compute sizes for the replication protected item. - /// - /// - /// Lists the available target compute sizes for a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// protection container name. - /// - /// - /// Replication protected item name. - /// - public static IPage ListByReplicationProtectedItems(this ITargetComputeSizesOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) - { - return operations.ListByReplicationProtectedItemsAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); - } + /// + /// Lists the available target compute sizes for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// protection container name. + /// + /// + /// Replication protected item name. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectedItems(this ITargetComputeSizesOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return ((ITargetComputeSizesOperations)operations).ListByReplicationProtectedItemsAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } - /// - /// Gets the list of target compute sizes for the replication protected item. - /// - /// - /// Lists the available target compute sizes for a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Fabric name. - /// - /// - /// protection container name. - /// - /// - /// Replication protected item name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectedItemsAsync(this ITargetComputeSizesOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists the available target compute sizes for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectedItemsAsync(this ITargetComputeSizesOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectedItemsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListByReplicationProtectedItemsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists the available target compute sizes for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByReplicationProtectedItemsNext(this ITargetComputeSizesOperations operations, string nextPageLink) + { + return ((ITargetComputeSizesOperations)operations).ListByReplicationProtectedItemsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets the list of target compute sizes for the replication protected item. - /// - /// - /// Lists the available target compute sizes for a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByReplicationProtectedItemsNext(this ITargetComputeSizesOperations operations, string nextPageLink) + /// + /// Lists the available target compute sizes for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByReplicationProtectedItemsNextAsync(this ITargetComputeSizesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectedItemsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByReplicationProtectedItemsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets the list of target compute sizes for the replication protected item. - /// - /// - /// Lists the available target compute sizes for a replication protected item. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByReplicationProtectedItemsNextAsync(this ITargetComputeSizesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByReplicationProtectedItemsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/README.md b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/README.md index 393421786a87..453c39724bd0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/README.md +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery.Management.Sdk/README.md @@ -5,14 +5,14 @@ This directory contains management plane service clients of Az.RecoveryServices In this directory, run AutoRest: ``` autorest --reset -autorest --use:@microsoft.azure/autorest.csharp@2.3.90 -autorest.cmd README.md --version=v2 +autorest --use:@autorest/powershell@4.x ``` ### AutoRest Configuration > see https://aka.ms/autorest ``` yaml -csharp: true +isSdkGenerator: true +powershell: true clear-output-folder: true reflect-api-versions: true openapi-type: arm @@ -21,7 +21,6 @@ license-header: MICROSOFT_MIT_NO_VERSION payload-flattening-threshold: 2 ``` - ### ``` yaml commit: 7e295a19c5382a4df2f8101e545fed34186d83bf diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSEvent.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSEvent.cs index 4a42f32b5985..752a2cb8ef63 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSEvent.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSEvent.cs @@ -470,7 +470,7 @@ public class ASRInMageRcmEventDetails : ASREventProviderSpecificDetails public ASRInMageRcmEventDetails(InMageRcmEventDetails inMageRcmEventDetails) { this.ProtectedItemName = inMageRcmEventDetails.ProtectedItemName; - this.VmName = inMageRcmEventDetails.VmName; + this.VmName = inMageRcmEventDetails.VMName; this.LatestAgentVersion = inMageRcmEventDetails.LatestAgentVersion; this.JobId = inMageRcmEventDetails.JobId; this.FabricName = inMageRcmEventDetails.FabricName; @@ -539,7 +539,7 @@ public class ASRInMageRcmFailbackEventDetails : ASREventProviderSpecificDetails public ASRInMageRcmFailbackEventDetails(InMageRcmFailbackEventDetails inMageRcmFailbackEventDetails) { this.ProtectedItemName = inMageRcmFailbackEventDetails.ProtectedItemName; - this.VmName = inMageRcmFailbackEventDetails.VmName; + this.VmName = inMageRcmFailbackEventDetails.VMName; this.ApplianceName = inMageRcmFailbackEventDetails.ApplianceName; this.ServerType = inMageRcmFailbackEventDetails.ServerType; this.ComponentDisplayName = inMageRcmFailbackEventDetails.ComponentDisplayName; diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSFabricDetails.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSFabricDetails.cs index b36597a5a896..eb2768640c8b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSFabricDetails.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSFabricDetails.cs @@ -180,9 +180,9 @@ public ASRProcessServer(ProcessServer processServer) this.FriendlyName = processServer.FriendlyName; this.Id = processServer.Id; this.AgentVersion = processServer.AgentVersion; - this.IpAddress = processServer.IpAddress; + this.IpAddress = processServer.IPAddress; this.LastHeartbeat = processServer.LastHeartbeat; - this.OsType = processServer.OsType; + this.OsType = processServer.OSType; this.VersionStatus = processServer.VersionStatus; this.AvailableMemoryInBytes = processServer.AvailableMemoryInBytes; this.AvailableSpaceInBytes = processServer.AvailableSpaceInBytes; @@ -391,7 +391,7 @@ public class ASRMobilityServiceUpdate public ASRMobilityServiceUpdate(MobilityServiceUpdate mobilityServiceUpdateDetails) { this.RebootStatus = mobilityServiceUpdateDetails.RebootStatus; - this.OsType = mobilityServiceUpdateDetails.OsType; + this.OsType = mobilityServiceUpdateDetails.OSType; this.Version = mobilityServiceUpdateDetails.Version; } @@ -499,10 +499,10 @@ public ASRMasterTargetServer(MasterTargetServer masterTargetDetails) { this.AgentVersion = masterTargetDetails.AgentVersion; this.Id = masterTargetDetails.Id; - this.IpAddress = masterTargetDetails.IpAddress; + this.IpAddress = masterTargetDetails.IPAddress; this.LastHeartbeat = masterTargetDetails.LastHeartbeat; this.Name = masterTargetDetails.Name; - this.OsType = masterTargetDetails.OsType; + this.OsType = masterTargetDetails.OSType; this.VersionStatus = masterTargetDetails.VersionStatus; this.RetentionVolumes = this.TranslateRetentionVolume(masterTargetDetails.RetentionVolumes); @@ -624,7 +624,7 @@ public ASRProcessServerDetails(ProcessServerDetails psDetails) this.Health = psDetails.Health; this.HistoricHealth = psDetails.HistoricHealth; this.HealthErrors = psDetails.HealthErrors; - this.IpAddresses = psDetails.IpAddresses; + this.IpAddresses = psDetails.IPAddresses; } /// @@ -1367,7 +1367,7 @@ public class ASRHyperVReplicaDiskDetails { public ASRHyperVReplicaDiskDetails(DiskDetails diskDetails) { - this.MaxSizeMB = diskDetails.MaxSizeMB; + this.MaxSizeMB = diskDetails.MaxSizeMb; this.VhdId = diskDetails.VhdId; this.VhdName = diskDetails.VhdName; this.VhdType = diskDetails.VhdType; @@ -1400,7 +1400,7 @@ public ASRHyperVReplicaAzureVmDiskDetails(AzureVmDiskDetails hyperVReplicaAzureV this.VhdType = hyperVReplicaAzureVmDiskDetails.VhdType; this.VhdId = hyperVReplicaAzureVmDiskDetails.VhdId; this.VhdName = hyperVReplicaAzureVmDiskDetails.VhdName; - this.MaxSizeMB = hyperVReplicaAzureVmDiskDetails.MaxSizeMB; + this.MaxSizeMB = hyperVReplicaAzureVmDiskDetails.MaxSizeMb; this.TargetDiskLocation = hyperVReplicaAzureVmDiskDetails.TargetDiskLocation; this.TargetDiskName = hyperVReplicaAzureVmDiskDetails.TargetDiskName; this.LunId = hyperVReplicaAzureVmDiskDetails.LunId; @@ -1464,9 +1464,9 @@ public class ASRHyperVReplicaAzureOsDetails { public ASRHyperVReplicaAzureOsDetails(OSDetails hyperVOsSetails) { - this.OsType = hyperVOsSetails.OsType; + this.OsType = hyperVOsSetails.OSType; this.ProductType = hyperVOsSetails.ProductType; - this.OsEdition = hyperVOsSetails.OsEdition; + this.OsEdition = hyperVOsSetails.OSEdition; this.OSVersion = hyperVOsSetails.OSVersion; this.OSMinorVersion = hyperVOsSetails.OSMinorVersion; this.OSMajorVersion = hyperVOsSetails.OSMajorVersion; @@ -1516,32 +1516,32 @@ public ASRHyperVReplicaAzureSpecificRPIDetails(HyperVReplicaAzureReplicationDeta this.RecoveryAvailabilityZone = details.TargetAvailabilityZone; this.RecoveryProximityPlacementGroupId = details.TargetProximityPlacementGroupId; this.EnableRDPOnTargetOption = details.EnableRdpOnTargetOption; - this.SourceVmCPUCount = details.SourceVmCpuCount; - this.SourceVmRAMSizeInMB = details.SourceVmRamSizeInMB; + this.SourceVmCPUCount = details.SourceVMCpuCount; + this.SourceVmRAMSizeInMB = details.SourceVMRamSizeInMb; if (details.OSDetails != null) { this.OsDetails = new ASRHyperVReplicaAzureOsDetails(details.OSDetails); } this.Encryption = details.Encryption; this.SelectedRecoveryAzureNetworkId = details.SelectedRecoveryAzureNetworkId; - this.VmProtectionState = details.VmProtectionState; - this.VmProtectionStateDescription = details.VmProtectionStateDescription; - this.VmId = details.VmId; + this.VmProtectionState = details.VMProtectionState; + this.VmProtectionStateDescription = details.VMProtectionStateDescription; + this.VmId = details.VMId; this.LastReplicatedTime = details.LastReplicatedTime; this.RecoveryAzureLogStorageAccountId = details.RecoveryAzureLogStorageAccountId; this.RecoveryAzureStorageAccount = details.RecoveryAzureStorageAccount; this.RecoveryAzureVMSize = details.RecoveryAzureVMSize; - this.RecoveryAzureVMName = details.RecoveryAzureVmName; + this.RecoveryAzureVMName = details.RecoveryAzureVMName; this.UseManagedDisks = details.UseManagedDisks; - if (details.AzureVmDiskDetails != null) + if (details.AzureVMDiskDetails != null) { this.AzureVMDiskDetails = - details.AzureVmDiskDetails.ToList() + details.AzureVMDiskDetails.ToList() .ConvertAll(disk => new ASRHyperVReplicaAzureVmDiskDetails(disk)); } this.LicenseType = details.LicenseType; this.SqlServerLicenseType = details.SqlServerLicenseType; - this.RecoveryVmTag = details.TargetVmTags; + this.RecoveryVmTag = details.TargetVMTags; this.RecoveryNicTag = details.TargetNicTags; this.DiskTag = details.TargetManagedDiskTags; } @@ -1682,12 +1682,12 @@ public ASRInMageAzureV2SpecificRPIDetails(InMageAzureV2ReplicationDetails detail this.RecoveryAvailabilitySetId = details.RecoveryAvailabilitySetId; this.AgentVersion = details.AgentVersion; this.DiscoveryType = details.DiscoveryType; - this.IpAddress = details.IpAddress; + this.IpAddress = details.IPAddress; this.MasterTargetId = details.MasterTargetId; - this.MultiVmGroupId = details.MultiVmGroupId; - this.MultiVmGroupName = details.MultiVmGroupName; - this.OSDiskId = details.OsDiskId; - this.OSType = details.OsType; + this.MultiVmGroupId = details.MultiVMGroupId; + this.MultiVmGroupName = details.MultiVMGroupName; + this.OSDiskId = details.OSDiskId; + this.OSType = details.OSType; this.ProcessServerId = details.ProcessServerId; this.ProcessServerName = details.ProcessServerName; this.ProtectionStage = details.ProtectionStage; @@ -1695,12 +1695,12 @@ public ASRInMageAzureV2SpecificRPIDetails(InMageAzureV2ReplicationDetails detail this.VHDName = details.VhdName; this.DiskResized = details.DiskResized; this.EnableRdpOnTargetOption = details.EnableRdpOnTargetOption; - this.InfrastructureVmId = details.InfrastructureVmId; + this.InfrastructureVmId = details.InfrastructureVMId; this.IsAgentUpdateRequired = details.IsAgentUpdateRequired; this.IsRebootAfterUpdateRequired = details.IsRebootAfterUpdateRequired; this.LicenseType = details.LicenseType; - this.MultiVmSyncStatus = details.MultiVmSyncStatus; - this.OsVersion = details.OsVersion; + this.MultiVmSyncStatus = details.MultiVMSyncStatus; + this.OsVersion = details.OSVersion; this.RecoveryAzureResourceGroupId = details.RecoveryAzureResourceGroupId; this.RecoveryAzureStorageAccount = details.RecoveryAzureStorageAccount; this.RecoveryAzureVMName = details.RecoveryAzureVMName; @@ -1710,19 +1710,19 @@ public ASRInMageAzureV2SpecificRPIDetails(InMageAzureV2ReplicationDetails detail this.RpoInSeconds = details.RpoInSeconds; this.SelectedRecoveryAzureNetworkId = details.SelectedRecoveryAzureNetworkId; this.SelectedSourceNicId = details.SelectedSourceNicId; - this.SourceVmCpuCount = details.SourceVmCpuCount; - this.SourceVmRamSizeInMB = details.SourceVmRamSizeInMB; - this.TargetVmId = details.TargetVmId; - this.UncompressedDataRateInMB = details.UncompressedDataRateInMB; + this.SourceVmCpuCount = details.SourceVMCpuCount; + this.SourceVmRamSizeInMB = details.SourceVMRamSizeInMb; + this.TargetVmId = details.TargetVMId; + this.UncompressedDataRateInMB = details.UncompressedDataRateInMb; this.UseManagedDisks = details.UseManagedDisks; this.VCenterInfrastructureId = details.VCenterInfrastructureId; - this.VmId = details.VmId; - this.VmProtectionState = details.VmProtectionState; - this.VmProtectionStateDescription = details.VmProtectionStateDescription; + this.VmId = details.VMId; + this.VmProtectionState = details.VMProtectionState; + this.VmProtectionStateDescription = details.VMProtectionStateDescription; this.RecoveryAvailabilityZone = details.TargetAvailabilityZone; this.RecoveryProximityPlacementGroupId = details.TargetProximityPlacementGroupId; this.SqlServerLicenseType = details.SqlServerLicenseType; - this.RecoveryVmTag = details.TargetVmTags; + this.RecoveryVmTag = details.TargetVMTags; this.RecoveryNicTag = details.TargetNicTags; this.DiskTag = details.TargetManagedDiskTags; if (details.ProtectedDisks != null) @@ -2098,9 +2098,9 @@ public class ASRAzureToAzureSpecificRPIDetails : ASRProviderSpecificRPIDetails public ASRAzureToAzureSpecificRPIDetails(A2AReplicationDetails details) { this.FabricObjectId = details.FabricObjectId; - this.MultiVmGroupId = details.MultiVmGroupId; - this.MultiVmGroupName = details.MultiVmGroupName; - this.OSType = details.OsType; + this.MultiVmGroupId = details.MultiVMGroupId; + this.MultiVmGroupName = details.MultiVMGroupName; + this.OSType = details.OSType; this.PrimaryFabricLocation = details.PrimaryFabricLocation; this.RecoveryFabricObjectId = details.RecoveryFabricObjectId; this.RecoveryAzureResourceGroupId = details.RecoveryAzureResourceGroupId; @@ -2117,7 +2117,7 @@ public ASRAzureToAzureSpecificRPIDetails(A2AReplicationDetails details) this.LastRpoCalculatedTime = details.LastRpoCalculatedTime; this.RpoInSeconds = details.RpoInSeconds; this.IsReplicationAgentUpdateRequired = details.IsReplicationAgentUpdateRequired; - this.VmEncryptionType = details.VmEncryptionType; + this.VmEncryptionType = details.VMEncryptionType; this.InitialPrimaryFabricLocation = details.InitialPrimaryFabricLocation; this.InitialRecoveryFabricLocation = details.InitialRecoveryFabricLocation; this.InitialPrimaryZone = details.InitialPrimaryZone; @@ -2164,10 +2164,10 @@ public ASRAzureToAzureSpecificRPIDetails(A2AReplicationDetails details) } } - if (details.VmSyncedConfigDetails != null) + if (details.VMSyncedConfigDetails != null) { this.VmSyncedConfigDetails = - new ASRAzureToAzureVmSyncedConfigDetails(details.VmSyncedConfigDetails); + new ASRAzureToAzureVmSyncedConfigDetails(details.VMSyncedConfigDetails); } } @@ -2373,20 +2373,20 @@ public ASRInMageRcmSpecificRPIDetails(InMageRcmReplicationDetails details) { this.InternalIdentifier = details.InternalIdentifier; this.FabricDiscoveryMachineId = details.FabricDiscoveryMachineId; - this.MultiVmGroupName = details.MultiVmGroupName; + this.MultiVmGroupName = details.MultiVMGroupName; this.DiscoveryType = details.DiscoveryType; this.ProcessServerId = details.ProcessServerId; this.ProcessServerName = details.ProcessServerName; this.ProcessorCoreCount = details.ProcessorCoreCount; - this.AllocatedMemoryInMB = details.AllocatedMemoryInMB; + this.AllocatedMemoryInMB = details.AllocatedMemoryInMb; this.RunAsAccountId = details.RunAsAccountId; - this.OsType = details.OsType; + this.OsType = details.OSType; this.FirmwareType = details.FirmwareType; - this.PrimaryNicIpAddress = details.PrimaryNicIpAddress; + this.PrimaryNicIpAddress = details.PrimaryNicIPAddress; this.TargetGeneration = details.TargetGeneration; this.LicenseType = details.LicenseType; - this.TargetVmName = details.TargetVmName; - this.TargetVmSize = details.TargetVmSize; + this.TargetVmName = details.TargetVMName; + this.TargetVmSize = details.TargetVMSize; this.TargetResourceGroupId = details.TargetResourceGroupId; this.TargetLocation = details.TargetLocation; this.TargetAvailabilitySetId = details.TargetAvailabilitySetId; @@ -2420,8 +2420,8 @@ public ASRInMageRcmSpecificRPIDetails(InMageRcmReplicationDetails details) new ASRInMageRcmMobilityAgentDetails(details.MobilityAgentDetails) : null; this.DiscoveredVmDetails = - details.DiscoveredVmDetails != null ? - new ASRInMageRcmDiscoveredProtectedVmDetails(details.DiscoveredVmDetails) : + details.DiscoveredVMDetails != null ? + new ASRInMageRcmDiscoveredProtectedVmDetails(details.DiscoveredVMDetails) : null; this.IsAgentRegistrationSuccessfulAfterFailover = details.IsAgentRegistrationSuccessfulAfterFailover; @@ -2432,9 +2432,9 @@ public ASRInMageRcmSpecificRPIDetails(InMageRcmReplicationDetails details) .ConvertAll(disk => new ASRInMageRcmProtectedDiskDetails(disk)); } - if (details.VmNics != null && details.VmNics.Any()) + if (details.VMNics != null && details.VMNics.Any()) { - this.VmNics = details.VmNics.ToList() + this.VmNics = details.VMNics.ToList() .ConvertAll(nic => new ASRInMageRcmNicDetails(nic)); } @@ -2724,13 +2724,13 @@ public ASRInMageRcmFailbackSpecificRPIDetails(InMageRcmFailbackReplicationDetail { this.InternalIdentifier = details.InternalIdentifier; this.AzureVirtualMachineId = details.AzureVirtualMachineId; - this.MultiVmGroupName = details.MultiVmGroupName; + this.MultiVmGroupName = details.MultiVMGroupName; this.ReprotectAgentId = details.ReprotectAgentId; this.ReprotectAgentName = details.ReprotectAgentName; - this.OsType = details.OsType; + this.OsType = details.OSType; this.LogStorageAccountId = details.LogStorageAccountId; this.TargetvCenterId = details.TargetvCenterId; - this.TargetVmName = details.TargetVmName; + this.TargetVmName = details.TargetVMName; this.TargetDataStoreName = details.TargetDataStoreName; this.InitialReplicationProgressPercentage = details.InitialReplicationProgressPercentage; this.InitialReplicationProcessedBytes = details.InitialReplicationProcessedBytes; @@ -2747,8 +2747,8 @@ public ASRInMageRcmFailbackSpecificRPIDetails(InMageRcmFailbackReplicationDetail new ASRInMageRcmFailbackMobilityAgentDetails(details.MobilityAgentDetails) : null; this.DiscoveredVmDetails = - details.DiscoveredVmDetails != null ? - new ASRInMageRcmFailbackDiscoveredProtectedVmDetails(details.DiscoveredVmDetails) : + details.DiscoveredVMDetails != null ? + new ASRInMageRcmFailbackDiscoveredProtectedVmDetails(details.DiscoveredVMDetails) : null; this.LastPlannedFailoverStartTime = details.LastPlannedFailoverStartTime; this.LastPlannedFailoverStatus = details.LastPlannedFailoverStatus; @@ -2763,9 +2763,9 @@ public ASRInMageRcmFailbackSpecificRPIDetails(InMageRcmFailbackReplicationDetail .ConvertAll(disk => new ASRInMageRcmFailbackProtectedDiskDetails(disk)); } - if (details.VmNics != null && details.VmNics.Any()) + if (details.VMNics != null && details.VMNics.Any()) { - this.VmNics = details.VmNics.ToList() + this.VmNics = details.VMNics.ToList() .ConvertAll(nic => new ASRInMageRcmFailbackNicDetails(nic)); } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSObjects.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSObjects.cs index f7117e766078..3d881171030f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSObjects.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSObjects.cs @@ -200,7 +200,7 @@ public ASRFabric( var inMageFabricSpecificDetails = new ASRVMWareSpecificDetails { HostName = vmwareFabricSpecificDetails.HostName, - IpAddress = vmwareFabricSpecificDetails.IpAddress, + IpAddress = vmwareFabricSpecificDetails.IPAddress, AgentVersion = vmwareFabricSpecificDetails.AgentVersion, ProtectedServers = vmwareFabricSpecificDetails.ProtectedServers, LastHeartbeat = vmwareFabricSpecificDetails.LastHeartbeat, @@ -728,7 +728,7 @@ public ASRPolicy( (int)details.RecoveryPointThresholdInMinutes, CrashConsistentFrequencyInMinutes = (int)details.CrashConsistentFrequencyInMinutes, - MultiVmSyncStatus = details.MultiVmSyncStatus + MultiVmSyncStatus = details.MultiVMSyncStatus }; this.ReplicationProviderSettings = replicationProviderSettings; @@ -744,7 +744,7 @@ public ASRPolicy( AppConsistentFrequencyInMinutes = (int)details.AppConsistentFrequencyInMinutes, RecoveryPointHistory = (int)details.RecoveryPointHistory, RecoveryPointThresholdInMinutes = (int)details.RecoveryPointThresholdInMinutes, - MultiVmSyncStatus = details.MultiVmSyncStatus + MultiVmSyncStatus = details.MultiVMSyncStatus }; this.ReplicationProviderSettings = replicationProviderSettings; @@ -762,7 +762,7 @@ public ASRPolicy( (int)details.AppConsistentFrequencyInMinutes, CrashConsistentFrequencyInMinutes = (int)details.CrashConsistentFrequencyInMinutes, - MultiVmSyncStatus = details.MultiVmSyncStatus, + MultiVmSyncStatus = details.MultiVMSyncStatus, RecoveryPointHistory = (int)details.RecoveryPointHistory, RecoveryPointThresholdInMinutes = (int)details.RecoveryPointThresholdInMinutes @@ -785,7 +785,7 @@ public ASRPolicy( CrashConsistentFrequencyInMinutes = (int)details.CrashConsistentFrequencyInMinutes, MultiVmSyncStatus = - details.EnableMultiVmSync.Equals( + details.EnableMultiVMSync.Equals( Constants.True, StringComparison.OrdinalIgnoreCase) ? Constants.Enable : Constants.Disable @@ -1091,7 +1091,7 @@ public ASRVMNicDetails( this.SelectionType = vMNicDetails.SelectionType; this.EnableAcceleratedNetworkingOnRecovery = vMNicDetails.EnableAcceleratedNetworkingOnRecovery; this.RecoveryNetworkSecurityGroupId = vMNicDetails.RecoveryNetworkSecurityGroupId; - this.IpConfigs = vMNicDetails.IpConfigs; + this.IpConfigs = vMNicDetails.IPConfigs; this.TfoVMNetworkId = vMNicDetails.TfoVMNetworkId; this.TfoNicName = vMNicDetails.TfoRecoveryNicName; this.TfoNicResourceGroupName = vMNicDetails.TfoRecoveryNicResourceGroupName; @@ -1228,9 +1228,9 @@ public ASRProtectableItem( var diskDetails = providerSettings.DiskDetails; this.UpdateDiskDetails(diskDetails); - this.OS = providerSettings.OsDetails == null + this.OS = providerSettings.OSDetails == null ? null - : providerSettings.OsDetails.OsType; + : providerSettings.OSDetails.OSType; this.FabricObjectId = providerSettings.SourceItemId; } else if (pi.Properties.CustomDetails is VMwareVirtualMachineDetails) @@ -1241,7 +1241,7 @@ public ASRProtectableItem( // Set the VMWare specific properties. this.FabricSpecificVMDetails = new ASRVMWareSpecificVMDetails { - IpAddress = providerSettings.IpAddress, + IpAddress = providerSettings.IPAddress, AgentVersion = providerSettings.AgentVersion, AgentInstalled = providerSettings.AgentInstalled, AgentGeneratedId = providerSettings.AgentGeneratedId, @@ -1252,7 +1252,7 @@ public ASRProtectableItem( // Update Disk Details for VMWare. var diskDetails = providerSettings.DiskDetails; this.UpdateDiskDetails(diskDetails); - this.OS = providerSettings.OsType; + this.OS = providerSettings.OSType; } } } @@ -1394,7 +1394,7 @@ private void UpdateDiskDetails(IList diskDetails) var hd = new AsrVirtualHardDisk(); hd.Id = disk.DiskId; hd.Name = disk.DiskName; - hd.Capacity = Convert.ToInt64(disk.DiskSizeInMB); + hd.Capacity = Convert.ToInt64(disk.DiskSizeInMb); // Update all the Volumes in this Disk. hd.Volumes = new List(); @@ -1506,7 +1506,7 @@ public ASRReplicationProtectedItem( (HyperVReplicaAzureReplicationDetails)rpi.Properties.ProviderSpecificDetails; this.ReplicationProvider = Constants.HyperVReplicaAzure; - this.RecoveryAzureVMName = providerSpecificDetails.RecoveryAzureVmName; + this.RecoveryAzureVMName = providerSpecificDetails.RecoveryAzureVMName; this.RecoveryAzureVMSize = providerSpecificDetails.RecoveryAzureVMSize; this.RecoveryAzureStorageAccount = providerSpecificDetails.RecoveryAzureStorageAccount; @@ -1517,10 +1517,10 @@ public ASRReplicationProtectedItem( this.RecoveryResourceGroupId = providerSpecificDetails.RecoveryAzureResourceGroupId; - if (providerSpecificDetails.VmNics != null) + if (providerSpecificDetails.VMNics != null) { this.NicDetailsList = new List(); - foreach (var n in providerSpecificDetails.VmNics) + foreach (var n in providerSpecificDetails.VMNics) { this.NicDetailsList.Add(new ASRVMNicDetails(n)); } @@ -1556,10 +1556,10 @@ public ASRReplicationProtectedItem( providerSpecificDetails.SelectedRecoveryAzureNetworkId; this.SelectedSourceNicNetworkId = providerSpecificDetails.SelectedSourceNicId; - if (providerSpecificDetails.VmNics != null) + if (providerSpecificDetails.VMNics != null) { this.NicDetailsList = new List(); - foreach (var n in providerSpecificDetails.VmNics) + foreach (var n in providerSpecificDetails.VMNics) { this.NicDetailsList.Add(new ASRVMNicDetails(n)); } @@ -1574,10 +1574,10 @@ public ASRReplicationProtectedItem( var providerSpecificDetails = (InMageReplicationDetails)rpi.Properties.ProviderSpecificDetails; // Set the common properties specific to InMage. - if (providerSpecificDetails.VmNics != null) + if (providerSpecificDetails.VMNics != null) { this.NicDetailsList = new List(); - foreach (var n in providerSpecificDetails.VmNics) + foreach (var n in providerSpecificDetails.VMNics) { this.NicDetailsList.Add(new ASRVMNicDetails(n)); } @@ -1586,25 +1586,25 @@ public ASRReplicationProtectedItem( // Set the InMage specific properties. var inMageRPIDetails = new ASRInMageSpecificRPIDetails { - IpAddress = providerSpecificDetails.IpAddress, + IpAddress = providerSpecificDetails.IPAddress, ProcessServerId = providerSpecificDetails.ProcessServerId, MasterTargetId = providerSpecificDetails.MasterTargetId, - OSType = providerSpecificDetails.OsDetails != null - ? providerSpecificDetails.OsDetails.OsType + OSType = providerSpecificDetails.OSDetails != null + ? providerSpecificDetails.OSDetails.OSType : null, - OSDiskId = providerSpecificDetails.OsDetails != null - ? providerSpecificDetails.OsDetails.OsVhdId + OSDiskId = providerSpecificDetails.OSDetails != null + ? providerSpecificDetails.OSDetails.OSVhdId : null, - VHDName = providerSpecificDetails.OsDetails != null - ? providerSpecificDetails.OsDetails.VhdName + VHDName = providerSpecificDetails.OSDetails != null + ? providerSpecificDetails.OSDetails.VhdName : null, - MultiVmGroupId = providerSpecificDetails.MultiVmGroupId, - MultiVmGroupName = providerSpecificDetails.MultiVmGroupName, + MultiVmGroupId = providerSpecificDetails.MultiVMGroupId, + MultiVmGroupName = providerSpecificDetails.MultiVMGroupName, AgentVersion = providerSpecificDetails.AgentDetails.AgentVersion, DiscoveryType = providerSpecificDetails.DiscoveryType, LastHeartbeat = providerSpecificDetails.LastHeartbeat, ProtectionStage = providerSpecificDetails.ProtectionStage, - VmId = providerSpecificDetails.VmId + VmId = providerSpecificDetails.VMId }; if (providerSpecificDetails.ProtectedDisks != null) @@ -1634,13 +1634,13 @@ public ASRReplicationProtectedItem( this.RecoveryAzureVMSize = a2aProviderSpecificDetails.RecoveryAzureVMSize; this.SelectedRecoveryAzureNetworkId = a2aProviderSpecificDetails.SelectedRecoveryAzureNetworkId; this.SelectedTfoAzureNetworkId = a2aProviderSpecificDetails.SelectedTfoAzureNetworkId; - this.ProtectionState = a2aProviderSpecificDetails.VmProtectionState; - this.ProtectionStateDescription = a2aProviderSpecificDetails.VmProtectionStateDescription; + this.ProtectionState = a2aProviderSpecificDetails.VMProtectionState; + this.ProtectionStateDescription = a2aProviderSpecificDetails.VMProtectionStateDescription; this.ProviderSpecificDetails = new ASRAzureToAzureSpecificRPIDetails(a2aProviderSpecificDetails); - if (a2aProviderSpecificDetails.VmNics != null) + if (a2aProviderSpecificDetails.VMNics != null) { this.NicDetailsList = - a2aProviderSpecificDetails.VmNics?.ToList() + a2aProviderSpecificDetails.VMNics?.ToList() .ConvertAll(nic => new ASRVMNicDetails(nic)); } } @@ -1650,8 +1650,8 @@ public ASRReplicationProtectedItem( this.ReplicationProvider = Constants.InMageRcm; var providerSpecificDetails = (InMageRcmReplicationDetails)rpi.Properties.ProviderSpecificDetails; - this.RecoveryAzureVMName = providerSpecificDetails.TargetVmName; - this.RecoveryAzureVMSize = providerSpecificDetails.TargetVmSize; + this.RecoveryAzureVMName = providerSpecificDetails.TargetVMName; + this.RecoveryAzureVMSize = providerSpecificDetails.TargetVMSize; this.SelectedRecoveryAzureNetworkId = providerSpecificDetails.TargetNetworkId; this.SelectedTfoAzureNetworkId = providerSpecificDetails.TestNetworkId; this.RecoveryResourceGroupId = @@ -1871,15 +1871,15 @@ public class ASRHyperVReplicaRPIDetails : ASRProviderSpecificRPIDetails public ASRHyperVReplicaRPIDetails(HyperVReplicaReplicationDetails hyperVReplicaReplicationDetails) { this.LastReplicatedTime = hyperVReplicaReplicationDetails.LastReplicatedTime; - if (hyperVReplicaReplicationDetails.VmNics != null) + if (hyperVReplicaReplicationDetails.VMNics != null) { this.VmNics = - hyperVReplicaReplicationDetails.VmNics?.ToList() + hyperVReplicaReplicationDetails.VMNics?.ToList() .ConvertAll(nic => new ASRVMNicDetails(nic)); } - this.VmId = hyperVReplicaReplicationDetails.VmId; - this.VmProtectionState = hyperVReplicaReplicationDetails.VmProtectionState; - this.VmProtectionStateDescription = hyperVReplicaReplicationDetails.VmProtectionStateDescription; + this.VmId = hyperVReplicaReplicationDetails.VMId; + this.VmProtectionState = hyperVReplicaReplicationDetails.VMProtectionState; + this.VmProtectionStateDescription = hyperVReplicaReplicationDetails.VMProtectionStateDescription; } // @@ -1915,15 +1915,15 @@ public class ASRHyperVReplicaBlueRPIDetails : ASRProviderSpecificRPIDetails public ASRHyperVReplicaBlueRPIDetails(HyperVReplicaBlueReplicationDetails hyperVReplicaBlueReplicationDetails) { this.LastReplicatedTime = hyperVReplicaBlueReplicationDetails.LastReplicatedTime; - if (hyperVReplicaBlueReplicationDetails.VmNics != null) + if (hyperVReplicaBlueReplicationDetails.VMNics != null) { this.VmNics = - hyperVReplicaBlueReplicationDetails.VmNics?.ToList() + hyperVReplicaBlueReplicationDetails.VMNics?.ToList() .ConvertAll(nic => new ASRVMNicDetails(nic)); } - this.VmId = hyperVReplicaBlueReplicationDetails.VmId; - this.VmProtectionState = hyperVReplicaBlueReplicationDetails.VmProtectionState; - this.VmProtectionStateDescription = hyperVReplicaBlueReplicationDetails.VmProtectionStateDescription; + this.VmId = hyperVReplicaBlueReplicationDetails.VMId; + this.VmProtectionState = hyperVReplicaBlueReplicationDetails.VMProtectionState; + this.VmProtectionStateDescription = hyperVReplicaBlueReplicationDetails.VMProtectionStateDescription; } @@ -2848,8 +2848,8 @@ public ASRAzureToAzureProtectedDiskDetails(A2AProtectedDiskDetails disk) this.ResyncRequired = disk.ResyncRequired; this.MonitoringPercentageCompletion = disk.MonitoringPercentageCompletion; this.MonitoringJobType = disk.MonitoringJobType; - this.DataPendingInStagingStorageAccountInMB = disk.DataPendingInStagingStorageAccountInMB; - this.DataPendingAtSourceAgentInMB = disk.DataPendingAtSourceAgentInMB; + this.DataPendingInStagingStorageAccountInMB = disk.DataPendingInStagingStorageAccountInMb; + this.DataPendingAtSourceAgentInMB = disk.DataPendingAtSourceAgentInMb; this.DiskCapacityInBytes = disk.DiskCapacityInBytes; this.DiskName = disk.DiskName; this.DiskType = disk.DiskType; @@ -2881,8 +2881,8 @@ public ASRAzureToAzureProtectedDiskDetails(A2AProtectedManagedDiskDetails disk) this.ResyncRequired = disk.ResyncRequired; this.MonitoringPercentageCompletion = disk.MonitoringPercentageCompletion; this.MonitoringJobType = disk.MonitoringJobType; - this.DataPendingInStagingStorageAccountInMB = disk.DataPendingInStagingStorageAccountInMB; - this.DataPendingAtSourceAgentInMB = disk.DataPendingAtSourceAgentInMB; + this.DataPendingInStagingStorageAccountInMB = disk.DataPendingInStagingStorageAccountInMb; + this.DataPendingAtSourceAgentInMB = disk.DataPendingAtSourceAgentInMb; this.DiskCapacityInBytes = disk.DiskCapacityInBytes; this.DiskName = disk.DiskName; this.DiskType = disk.DiskType; @@ -3163,8 +3163,8 @@ public ASRInMageRcmProtectedDiskDetails(InMageRcmProtectedDiskDetails disk) this.SeedManagedDiskId = disk.SeedManagedDiskId; this.TargetManagedDiskId = disk.TargetManagedDiskId; this.DiskType = disk.DiskType; - this.DataPendingInLogDataStoreInMB = disk.DataPendingInLogDataStoreInMB; - this.DataPendingAtSourceAgentInMB = disk.DataPendingAtSourceAgentInMB; + this.DataPendingInLogDataStoreInMB = disk.DataPendingInLogDataStoreInMb; + this.DataPendingAtSourceAgentInMB = disk.DataPendingAtSourceAgentInMb; this.IsInitialReplicationComplete = disk.IsInitialReplicationComplete; this.IrDetails = disk.IrDetails != null ? @@ -3263,8 +3263,8 @@ public ASRInMageRcmFailbackProtectedDiskDetails(InMageRcmFailbackProtectedDiskDe this.IsOSDisk = disk.IsOSDisk; this.CapacityInBytes = disk.CapacityInBytes; this.DiskUuid = disk.DiskUuid; - this.DataPendingInLogDataStoreInMB = disk.DataPendingInLogDataStoreInMB; - this.DataPendingAtSourceAgentInMB = disk.DataPendingAtSourceAgentInMB; + this.DataPendingInLogDataStoreInMB = disk.DataPendingInLogDataStoreInMb; + this.DataPendingAtSourceAgentInMB = disk.DataPendingAtSourceAgentInMb; this.IsInitialReplicationComplete = disk.IsInitialReplicationComplete; this.IrDetails = disk.IrDetails != null ? @@ -3433,7 +3433,7 @@ public ASRInMageRcmFailbackNicDetails(InMageRcmFailbackNicDetails nic) this.MacAddress = nic.MacAddress; this.NetworkName = nic.NetworkName; this.AdapterType = nic.AdapterType; - this.SourceIpAddress = nic.SourceIpAddress; + this.SourceIpAddress = nic.SourceIPAddress; } /// @@ -3544,12 +3544,12 @@ public ASRInMageRcmDiscoveredProtectedVmDetails(InMageRcmDiscoveredProtectedVmDe { this.VCenterId = details.VCenterId; this.VCenterFqdn = details.VCenterFqdn; - this.IpAddresses = details.IpAddresses.ToList(); + this.IpAddresses = details.IPAddresses.ToList(); this.Datastores = details.Datastores.ToList(); this.PowerStatus = details.PowerStatus; this.VmwareToolsStatus = details.VmwareToolsStatus; - this.VmFqdn = details.VmFqdn; - this.OsName = details.OsName; + this.VmFqdn = details.VMFqdn; + this.OsName = details.OSName; this.IsDeleted = details.IsDeleted; this.CreatedTimestamp = details.CreatedTimestamp; this.UpdatedTimestamp = details.UpdatedTimestamp; @@ -3699,12 +3699,12 @@ public ASRInMageRcmFailbackDiscoveredProtectedVmDetails( { this.VCenterId = details.VCenterId; this.VCenterFqdn = details.VCenterFqdn; - this.IpAddresses = details.IpAddresses.ToList(); + this.IpAddresses = details.IPAddresses.ToList(); this.Datastores = details.Datastores.ToList(); this.PowerStatus = details.PowerStatus; this.VmwareToolsStatus = details.VmwareToolsStatus; - this.VmFqdn = details.VmFqdn; - this.OsName = details.OsName; + this.VmFqdn = details.VMFqdn; + this.OsName = details.OSName; this.IsDeleted = details.IsDeleted; this.CreatedTimestamp = details.CreatedTimestamp; this.UpdatedTimestamp = details.UpdatedTimestamp; diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSVCenter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSVCenter.cs index 3134cbf99c75..4487ef7281b2 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSVCenter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/Models/PSVCenter.cs @@ -44,7 +44,7 @@ public ASRvCenter(VCenter vCenterServer) this.ID = vCenterServer.Id; this.Name = vCenterServer.Name; this.FriendlyName = vCenterServer.Properties.FriendlyName; - this.IpOrHostName = vCenterServer.Properties.IpAddress; + this.IpOrHostName = vCenterServer.Properties.IPAddress; this.Port = vCenterServer.Properties.Port; this.FabricArmResourceName = vCenterServer.Properties.FabricArmResourceName; this.ProcessServerId = vCenterServer.Properties.ProcessServerId; diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/NetworkInterfaceCard/NewAzureRmAsrVmNicConfig.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/NetworkInterfaceCard/NewAzureRmAsrVmNicConfig.cs index 011c67485ca5..54cabcc27f67 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/NetworkInterfaceCard/NewAzureRmAsrVmNicConfig.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/NetworkInterfaceCard/NewAzureRmAsrVmNicConfig.cs @@ -350,7 +350,7 @@ private bool ValidateAndPopulateIPConfigs(ASRVMNicDetails vmNic) if (ipConfig.RecoveryLBBackendAddressPoolIds == null) { - ipConfig.RecoveryLBBackendAddressPoolIds = vmNicIPConfig.RecoveryLBBackendAddressPoolIds; + ipConfig.RecoveryLBBackendAddressPoolIds = vmNicIPConfig.RecoveryLbBackendAddressPoolIds; } if (string.IsNullOrEmpty(ipConfig.TfoSubnetName)) @@ -370,7 +370,7 @@ private bool ValidateAndPopulateIPConfigs(ASRVMNicDetails vmNic) if (ipConfig.TfoLBBackendAddressPoolIds == null) { - ipConfig.TfoLBBackendAddressPoolIds = vmNicIPConfig.TfoLBBackendAddressPoolIds; + ipConfig.TfoLBBackendAddressPoolIds = vmNicIPConfig.TfoLbBackendAddressPoolIds; } } @@ -399,11 +399,11 @@ PSIPConfigInputDetails ConvertToPSIPConfig(IPConfigDetails ipConfig) RecoverySubnetName = ipConfig.RecoverySubnetName, RecoveryStaticIPAddress = ipConfig.RecoveryStaticIPAddress, RecoveryPublicIPAddressId = ipConfig.RecoveryPublicIPAddressId, - RecoveryLBBackendAddressPoolIds = ipConfig.RecoveryLBBackendAddressPoolIds, + RecoveryLBBackendAddressPoolIds = ipConfig.RecoveryLbBackendAddressPoolIds, TfoSubnetName = ipConfig.TfoSubnetName, TfoStaticIPAddress = ipConfig.TfoStaticIPAddress, TfoPublicIPAddressId = ipConfig.TfoPublicIPAddressId, - TfoLBBackendAddressPoolIds = ipConfig.TfoLBBackendAddressPoolIds + TfoLBBackendAddressPoolIds = ipConfig.TfoLbBackendAddressPoolIds }; } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/Policy/NewAzureRmRecoveryServicesAsrPolicy.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/Policy/NewAzureRmRecoveryServicesAsrPolicy.cs index f392f330e646..49d40f74ac97 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/Policy/NewAzureRmRecoveryServicesAsrPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/Policy/NewAzureRmRecoveryServicesAsrPolicy.cs @@ -512,7 +512,7 @@ private void V2AandV2VPolicyObject() RecoveryPointHistory = this.RecoveryPointRetentionInHours * 60, // Convert from hours to minutes. RecoveryPointThresholdInMinutes = this.RPOWarningThresholdInMinutes, - MultiVmSyncStatus = this.MultiVmSyncStatus, + MultiVMSyncStatus = this.MultiVmSyncStatus, CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes }; } @@ -526,7 +526,7 @@ private void V2AandV2VPolicyObject() RecoveryPointHistory = this.RecoveryPointRetentionInHours * 60, // Convert from hours to minutes. RecoveryPointThresholdInMinutes = this.RPOWarningThresholdInMinutes, - MultiVmSyncStatus = this.MultiVmSyncStatus + MultiVMSyncStatus = this.MultiVmSyncStatus }; } @@ -554,7 +554,7 @@ private void CreateA2APolicy() { AppConsistentFrequencyInMinutes = this.ApplicationConsistentSnapshotFrequencyInHours * 60, CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes, - MultiVmSyncStatus = this.MultiVmSyncStatus, + MultiVMSyncStatus = this.MultiVmSyncStatus, RecoveryPointHistory = this.RecoveryPointRetentionInHours * 60 }; @@ -614,7 +614,7 @@ private void CreateInMageRcmPolicy() CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes, AppConsistentFrequencyInMinutes = this.ApplicationConsistentSnapshotFrequencyInHours * 60, - EnableMultiVmSync = this.MultiVmSyncStatus.Equals(Constants.Enable) ? + EnableMultiVMSync = this.MultiVmSyncStatus.Equals(Constants.Enable) ? Constants.True : Constants.False } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/Policy/UpdateAzureRmRecoveryServicesAsrPolicy.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/Policy/UpdateAzureRmRecoveryServicesAsrPolicy.cs index 6f89fb74f4c5..7a48839436f0 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/Policy/UpdateAzureRmRecoveryServicesAsrPolicy.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/Policy/UpdateAzureRmRecoveryServicesAsrPolicy.cs @@ -588,7 +588,7 @@ private void UpdateV2APolicyObject() this.applicationConsistentSnapshotFrequencyInMinutes, RecoveryPointHistory = this.RecoveryPointRetentionInHours * 60, // Convert from hours to minutes. RecoveryPointThresholdInMinutes = this.rpoWarningThresholdInMinutes, - MultiVmSyncStatus = this.multiVmSyncStatus, + MultiVMSyncStatus = this.multiVmSyncStatus, CrashConsistentFrequencyInMinutes = this.crashConsistentFrequencyInMinutes }; @@ -673,7 +673,7 @@ private void UpdateV2VPolicyObject() this.applicationConsistentSnapshotFrequencyInMinutes, RecoveryPointHistory = this.RecoveryPointRetentionInHours * 60, // Convert from hours to minutes. RecoveryPointThresholdInMinutes = this.rpoWarningThresholdInMinutes, - MultiVmSyncStatus = this.multiVmSyncStatus + MultiVMSyncStatus = this.multiVmSyncStatus }; var updatePolicyProperties = new UpdatePolicyInputProperties @@ -760,7 +760,7 @@ private void UpdateA2APolicy() AppConsistentFrequencyInMinutes = this.applicationConsistentSnapshotFrequencyInMinutes, RecoveryPointHistory = this.RecoveryPointRetentionInHours * 60, // Convert from hours to minutes. - MultiVmSyncStatus = this.multiVmSyncStatus, + MultiVMSyncStatus = this.multiVmSyncStatus, CrashConsistentFrequencyInMinutes = this.crashConsistentFrequencyInMinutes }; @@ -842,7 +842,7 @@ private void UpdateInMageRcmPolicy() CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes, AppConsistentFrequencyInMinutes = this.applicationConsistentSnapshotFrequencyInMinutes, - EnableMultiVmSync = this.multiVmSyncStatus.Equals(Constants.Enable) + EnableMultiVMSync = this.multiVmSyncStatus.Equals(Constants.Enable) ? Constants.True : Constants.False } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ProtectableItem/NewAzureRmRecoveryServicesAsrProtectableItem.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ProtectableItem/NewAzureRmRecoveryServicesAsrProtectableItem.cs index d57b0d46fdb6..36caff65c47e 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ProtectableItem/NewAzureRmRecoveryServicesAsrProtectableItem.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ProtectableItem/NewAzureRmRecoveryServicesAsrProtectableItem.cs @@ -96,8 +96,8 @@ public override void ExecuteSiteRecoveryCmdlet() Properties = new DiscoverProtectableItemRequestProperties { FriendlyName = this.FriendlyName, - IpAddress = this.IPAddress, - OsType = this.OSType + IPAddress = this.IPAddress, + OSType = this.OSType } }; diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/RecoveryPlan/NewAzureRmRecoveryServicesAsrRecoveryPlan.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/RecoveryPlan/NewAzureRmRecoveryServicesAsrRecoveryPlan.cs index 0fd610ef7f69..612152b8a7ae 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/RecoveryPlan/NewAzureRmRecoveryServicesAsrRecoveryPlan.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/RecoveryPlan/NewAzureRmRecoveryServicesAsrRecoveryPlan.cs @@ -364,35 +364,35 @@ private void CreateRecoveryPlan() typeof(HyperVReplicaAzureReplicationDetails)) { VmId = ((HyperVReplicaAzureReplicationDetails)replicationProtectedItemResponse - .Properties.ProviderSpecificDetails).VmId; + .Properties.ProviderSpecificDetails).VMId; } else if (replicationProtectedItemResponse.Properties.ProviderSpecificDetails .GetType() == typeof(HyperVReplicaReplicationDetails)) { VmId = ((HyperVReplicaReplicationDetails)replicationProtectedItemResponse - .Properties.ProviderSpecificDetails).VmId; + .Properties.ProviderSpecificDetails).VMId; } else if (replicationProtectedItemResponse.Properties.ProviderSpecificDetails .GetType() == typeof(HyperVReplicaBlueReplicationDetails)) { VmId = ((HyperVReplicaBlueReplicationDetails)replicationProtectedItemResponse - .Properties.ProviderSpecificDetails).VmId; + .Properties.ProviderSpecificDetails).VMId; } else if (replicationProtectedItemResponse.Properties.ProviderSpecificDetails .GetType() == typeof(InMageAzureV2ReplicationDetails)) { VmId = ((InMageAzureV2ReplicationDetails)replicationProtectedItemResponse - .Properties.ProviderSpecificDetails).VmId; + .Properties.ProviderSpecificDetails).VMId; } else if (replicationProtectedItemResponse.Properties.ProviderSpecificDetails .GetType() == typeof(InMageReplicationDetails)) { VmId = ((InMageReplicationDetails)replicationProtectedItemResponse - .Properties.ProviderSpecificDetails).VmId; + .Properties.ProviderSpecificDetails).VMId; } else if (replicationProtectedItemResponse.Properties.ProviderSpecificDetails.GetType() == typeof(A2AReplicationDetails)) { diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/AddAzureRmRecoveryServicesAsrReplicationProtectedItemDisk.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/AddAzureRmRecoveryServicesAsrReplicationProtectedItemDisk.cs index 2c6d086856b1..16f7695620a8 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/AddAzureRmRecoveryServicesAsrReplicationProtectedItemDisk.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/AddAzureRmRecoveryServicesAsrReplicationProtectedItemDisk.cs @@ -94,15 +94,15 @@ private void AzureToAzureReplication(AddDisksInput input) { var providerSettings = new A2AAddDisksInput() { - VmDisks = new List(), - VmManagedDisks = new List() + VMDisks = new List(), + VMManagedDisks = new List() }; foreach (ASRAzuretoAzureDiskReplicationConfig disk in this.AzureToAzureDiskReplicationConfiguration) { if (disk.IsManagedDisk) { - providerSettings.VmManagedDisks.Add(new A2AVmManagedDiskInputDetails + providerSettings.VMManagedDisks.Add(new A2AVmManagedDiskInputDetails { DiskId = disk.DiskId, RecoveryResourceGroupId = disk.RecoveryResourceGroupId, @@ -114,7 +114,7 @@ private void AzureToAzureReplication(AddDisksInput input) } else { - providerSettings.VmDisks.Add(new A2AVmDiskInputDetails + providerSettings.VMDisks.Add(new A2AVmDiskInputDetails { DiskUri = disk.VhdUri, RecoveryAzureStorageAccountId = disk.RecoveryAzureStorageAccountId, diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/NewAzureRmRecoveryServicesAsrReplicationProtectedItem.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/NewAzureRmRecoveryServicesAsrReplicationProtectedItem.cs index 397059e96d44..ba88157c2cf5 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/NewAzureRmRecoveryServicesAsrReplicationProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/NewAzureRmRecoveryServicesAsrReplicationProtectedItem.cs @@ -712,10 +712,10 @@ private void VMwareToAzureReplication(EnableProtectionInput input) TargetAzureNetworkId = this.RecoveryAzureNetworkId, TargetAzureSubnetId = this.RecoveryAzureSubnetName, LogStorageAccountId = this.LogStorageAccountId, - MultiVmGroupName = this.ReplicationGroupName, + MultiVMGroupName = this.ReplicationGroupName, DiskType = this.DiskType, - MultiVmGroupId = this.ReplicationGroupName, - TargetAzureVmName = string.IsNullOrEmpty(this.RecoveryVmName) + MultiVMGroupId = this.ReplicationGroupName, + TargetAzureVMName = string.IsNullOrEmpty(this.RecoveryVmName) ? this.ProtectableItem.FriendlyName : this.RecoveryVmName, EnableRdpOnTargetOption = Constants.NeverEnableRDPOnTargetOption, @@ -723,9 +723,9 @@ private void VMwareToAzureReplication(EnableProtectionInput input) TargetAvailabilityZone = this.RecoveryAvailabilityZone, TargetProximityPlacementGroupId = this.RecoveryProximityPlacementGroupId, TargetAvailabilitySetId = this.RecoveryAvailabilitySetId, - TargetVmSize = this.Size, + TargetVMSize = this.Size, SqlServerLicenseType = this.SqlServerLicenseType, - TargetVmTags = this.RecoveryVmTag, + TargetVMTags = this.RecoveryVmTag, TargetNicTags = this.RecoveryNicTag, SeedManagedDiskTags = seedManagedDiskTag, TargetManagedDiskTags = this.DiskTag @@ -778,16 +778,16 @@ private void VMwareToAzureReplication(EnableProtectionInput input) // Compare the Multi VM Group Name. if (string.Compare( this.ReplicationGroupName, - providerSpecificDetails.MultiVmGroupName, + providerSpecificDetails.MultiVMGroupName, StringComparison.OrdinalIgnoreCase) == 0) { // Multi VM Group found. // Set the values in the InMageAzureV2 Provider specific input. - providerSettings.MultiVmGroupName = - providerSpecificDetails.MultiVmGroupName; - providerSettings.MultiVmGroupId = - providerSpecificDetails.MultiVmGroupId; + providerSettings.MultiVMGroupName = + providerSpecificDetails.MultiVMGroupName; + providerSettings.MultiVMGroupId = + providerSpecificDetails.MultiVMGroupId; flag = true; break; } @@ -800,8 +800,8 @@ private void VMwareToAzureReplication(EnableProtectionInput input) // Multi VM Group was not found. // Create a new Multi VM Group and Set the values in the // InMageAzureV2 Provider specific input. - providerSettings.MultiVmGroupName = this.ReplicationGroupName; - providerSettings.MultiVmGroupId = Guid.NewGuid().ToString(); + providerSettings.MultiVMGroupName = this.ReplicationGroupName; + providerSettings.MultiVMGroupId = Guid.NewGuid().ToString(); } } @@ -816,9 +816,9 @@ private void EnterpriseAndHyperVToAzure(EnableProtectionInput input) { var providerSettings = new HyperVReplicaAzureEnableProtectionInput(); - providerSettings.HvHostVmId = this.ProtectableItem.FabricObjectId; - providerSettings.VmName = this.ProtectableItem.FriendlyName; - providerSettings.TargetAzureVmName = string.IsNullOrEmpty(this.RecoveryVmName) + providerSettings.HvHostVMId = this.ProtectableItem.FabricObjectId; + providerSettings.VMName = this.ProtectableItem.FriendlyName; + providerSettings.TargetAzureVMName = string.IsNullOrEmpty(this.RecoveryVmName) ? this.ProtectableItem.FriendlyName : this.RecoveryVmName; providerSettings.TargetProximityPlacementGroupId = this.RecoveryProximityPlacementGroupId; @@ -826,9 +826,9 @@ private void EnterpriseAndHyperVToAzure(EnableProtectionInput input) providerSettings.UseManagedDisks = this.UseManagedDisk; providerSettings.UseManagedDisksForReplication = this.UseManagedDisksForReplication; providerSettings.TargetAvailabilitySetId = this.RecoveryAvailabilitySetId; - providerSettings.TargetVmSize = this.Size; + providerSettings.TargetVMSize = this.Size; providerSettings.SqlServerLicenseType = this.SqlServerLicenseType; - providerSettings.TargetVmTags = this.RecoveryVmTag; + providerSettings.TargetVMTags = this.RecoveryVmTag; providerSettings.TargetNicTags = this.RecoveryNicTag; providerSettings.TargetManagedDiskTags = this.DiskTag; @@ -873,7 +873,7 @@ private void EnterpriseAndHyperVToAzure(EnableProtectionInput input) if (string.IsNullOrWhiteSpace(this.OS)) { - providerSettings.OsType = (string.Compare( + providerSettings.OSType = (string.Compare( this.ProtectableItem.OS, Constants.OSWindows, StringComparison.OrdinalIgnoreCase) == @@ -887,7 +887,7 @@ private void EnterpriseAndHyperVToAzure(EnableProtectionInput input) } else { - providerSettings.OsType = this.OS; + providerSettings.OSType = this.OS; } if (string.IsNullOrWhiteSpace(this.OSDiskName)) @@ -954,8 +954,8 @@ private void AzureToAzureReplication(EnableProtectionInput input) FabricObjectId = this.AzureVmId, RecoveryContainerId = this.ProtectionContainerMapping.TargetProtectionContainerId, - VmDisks = new List(), - VmManagedDisks = new List(), + VMDisks = new List(), + VMManagedDisks = new List(), RecoveryResourceGroupId = this.RecoveryResourceGroupId, RecoveryCloudServiceId = this.RecoveryCloudServiceId, RecoveryAvailabilitySetId = this.RecoveryAvailabilitySetId, @@ -974,7 +974,7 @@ private void AzureToAzureReplication(EnableProtectionInput input) if (!string.IsNullOrEmpty(this.ReplicationGroupName)) { - providerSettings.MultiVmGroupName = this.ReplicationGroupName; + providerSettings.MultiVMGroupName = this.ReplicationGroupName; } if (!string.IsNullOrEmpty(this.RecoveryCloudServiceId)) @@ -1008,7 +1008,7 @@ private void AzureToAzureReplication(EnableProtectionInput input) throw new Exception("Recovery Storage account is not required for managed disk vm to protect"); } var osDisk = virtualMachine.StorageProfile.OsDisk; - providerSettings.VmManagedDisks.Add(new A2AVmManagedDiskInputDetails + providerSettings.VMManagedDisks.Add(new A2AVmManagedDiskInputDetails { DiskId = osDisk.ManagedDisk.Id, RecoveryResourceGroupId = this.RecoveryResourceGroupId, @@ -1020,7 +1020,7 @@ private void AzureToAzureReplication(EnableProtectionInput input) { foreach (var dataDisk in virtualMachine.StorageProfile.DataDisks) { - providerSettings.VmManagedDisks.Add(new A2AVmManagedDiskInputDetails + providerSettings.VMManagedDisks.Add(new A2AVmManagedDiskInputDetails { DiskId = dataDisk.ManagedDisk.Id, RecoveryResourceGroupId = this.RecoveryResourceGroupId, @@ -1039,7 +1039,7 @@ private void AzureToAzureReplication(EnableProtectionInput input) } var osDisk = virtualMachine.StorageProfile.OsDisk; - providerSettings.VmDisks.Add(new A2AVmDiskInputDetails + providerSettings.VMDisks.Add(new A2AVmDiskInputDetails { DiskUri = osDisk.Vhd.Uri, RecoveryAzureStorageAccountId = this.RecoveryAzureStorageAccountId, @@ -1049,7 +1049,7 @@ private void AzureToAzureReplication(EnableProtectionInput input) { foreach (var dataDisk in virtualMachine.StorageProfile.DataDisks) { - providerSettings.VmDisks.Add(new A2AVmDiskInputDetails + providerSettings.VMDisks.Add(new A2AVmDiskInputDetails { DiskUri = dataDisk.Vhd.Uri, RecoveryAzureStorageAccountId = this.RecoveryAzureStorageAccountId, @@ -1070,7 +1070,7 @@ private void AzureToAzureReplication(EnableProtectionInput input) { if (disk.IsManagedDisk) { - providerSettings.VmManagedDisks.Add(new A2AVmManagedDiskInputDetails + providerSettings.VMManagedDisks.Add(new A2AVmManagedDiskInputDetails { DiskId = disk.DiskId, RecoveryResourceGroupId = disk.RecoveryResourceGroupId, @@ -1089,7 +1089,7 @@ private void AzureToAzureReplication(EnableProtectionInput input) } else { - providerSettings.VmDisks.Add(new A2AVmDiskInputDetails + providerSettings.VMDisks.Add(new A2AVmDiskInputDetails { DiskUri = disk.VhdUri, RecoveryAzureStorageAccountId = @@ -1171,14 +1171,14 @@ private void InMageRcmToAzureReplication(EnableProtectionInput input) TargetProximityPlacementGroupId = this.RecoveryProximityPlacementGroupId, TargetBootDiagnosticsStorageAccountId = this.RecoveryBootDiagStorageAccountId, TargetSubnetName = this.RecoveryAzureSubnetName, - TargetVmName = string.IsNullOrEmpty(this.RecoveryVmName) + TargetVMName = string.IsNullOrEmpty(this.RecoveryVmName) ? this.ProtectableItem.FriendlyName : this.RecoveryVmName, - TargetVmSize = this.Size, + TargetVMSize = this.Size, LicenseType = this.LicenseType, TestNetworkId = this.TestNetworkId, TestSubnetName = this.TestSubnetName, - MultiVmGroupName = this.ReplicationGroupName, + MultiVMGroupName = this.ReplicationGroupName, ProcessServerId = processServer.Id, DisksDefault = new InMageRcmDisksDefaultInput() { @@ -1233,14 +1233,14 @@ private void InMageRcmToAzureReplication(EnableProtectionInput input) // Compare the multi VM group name. if (string.Compare( this.ReplicationGroupName, - providerSpecificDetails.MultiVmGroupName, + providerSpecificDetails.MultiVMGroupName, StringComparison.OrdinalIgnoreCase) == 0) { // Multi VM group found. // Set the values in the InMageRcm provider specific input. - providerSettings.MultiVmGroupName = - providerSpecificDetails.MultiVmGroupName; + providerSettings.MultiVMGroupName = + providerSpecificDetails.MultiVMGroupName; flag = true; break; } @@ -1253,7 +1253,7 @@ private void InMageRcmToAzureReplication(EnableProtectionInput input) // Multi VM group was not found. // Create a new multi VM group and set the values in the // InMageRcm provider specific input. - providerSettings.MultiVmGroupName = this.ReplicationGroupName; + providerSettings.MultiVMGroupName = this.ReplicationGroupName; } } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/RemoveAzureRmRecoveryServicesAsrReplicationProtectedItem.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/RemoveAzureRmRecoveryServicesAsrReplicationProtectedItem.cs index a092bcd69964..b2384bf6713d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/RemoveAzureRmRecoveryServicesAsrReplicationProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/RemoveAzureRmRecoveryServicesAsrReplicationProtectedItem.cs @@ -88,7 +88,7 @@ public override void ExecuteSiteRecoveryCmdlet() input.Properties.ReplicationProviderInput = new InMageDisableProtectionProviderSpecificInput() { - ReplicaVmDeletionStatus = Constants.NotRequired + ReplicaVMDeletionStatus = Constants.NotRequired }; } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/RemoveAzureRmRecoveryServicesAsrReplicationProtectedItemDisk.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/RemoveAzureRmRecoveryServicesAsrReplicationProtectedItemDisk.cs index edc22e8d4e08..b8882e722930 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/RemoveAzureRmRecoveryServicesAsrReplicationProtectedItemDisk.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/RemoveAzureRmRecoveryServicesAsrReplicationProtectedItemDisk.cs @@ -92,17 +92,17 @@ private void FillRemoveDiskInputForAzureToAzureReplication(RemoveDisksInput inpu { var providerSettings = new A2ARemoveDisksInput() { - VmDisksUris = new List(), - VmManagedDisksIds = new List() + VMDisksUris = new List(), + VMManagedDisksIds = new List() }; switch (this.ParameterSetName) { case ASRParameterSets.AzureToAzure: - providerSettings.VmDisksUris = this.VhdUri; + providerSettings.VMDisksUris = this.VhdUri; break; case ASRParameterSets.AzureToAzureManagedDisk: - providerSettings.VmManagedDisksIds = this.DiskId; + providerSettings.VMManagedDisksIds = this.DiskId; break; } diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/SetAzureRmRecoveryServicesAsrReplicationProtectedItem.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/SetAzureRmRecoveryServicesAsrReplicationProtectedItem.cs index 5e64f3f5c28a..753949d4ce7f 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/SetAzureRmRecoveryServicesAsrReplicationProtectedItem.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/SetAzureRmRecoveryServicesAsrReplicationProtectedItem.cs @@ -430,7 +430,7 @@ public override void ExecuteSiteRecoveryCmdlet() if (string.IsNullOrEmpty(this.Name)) { - vmName = providerSpecificDetails.RecoveryAzureVmName; + vmName = providerSpecificDetails.RecoveryAzureVMName; } if (string.IsNullOrEmpty(this.Size)) @@ -486,13 +486,13 @@ public override void ExecuteSiteRecoveryCmdlet() if (this.DiskIdToDiskEncryptionSetMap == null || this.DiskIdToDiskEncryptionSetMap.Count == 0) { - diskIdToDiskEncryptionMap = providerSpecificDetails.AzureVmDiskDetails. + diskIdToDiskEncryptionMap = providerSpecificDetails.AzureVMDiskDetails. ToDictionary(x => x.DiskId, x => x.DiskEncryptionSetId); } if (this.RecoveryVmTag == null) { - recoveryVmTag = providerSpecificDetails.TargetVmTags; + recoveryVmTag = providerSpecificDetails.TargetVMTags; } if (this.RecoveryNicTag == null) @@ -538,13 +538,13 @@ public override void ExecuteSiteRecoveryCmdlet() TargetAvailabilityZone = availabilityZone, TargetProximityPlacementGroupId = proximityPlacementGroupId, SqlServerLicenseType = sqlServerLicenseType, - TargetVmTags = recoveryVmTag, + TargetVMTags = recoveryVmTag, TargetManagedDiskTags = diskTag, TargetNicTags = recoveryNicTag }; } - vMNicInputDetailsList = getNicListToUpdate(providerSpecificDetails.VmNics); + vMNicInputDetailsList = getNicListToUpdate(providerSpecificDetails.VMNics); } else if (provider is InMageAzureV2ReplicationDetails) { @@ -603,7 +603,7 @@ public override void ExecuteSiteRecoveryCmdlet() if (this.RecoveryVmTag == null) { - recoveryVmTag = providerSpecificDetails.TargetVmTags; + recoveryVmTag = providerSpecificDetails.TargetVMTags; } if (this.RecoveryNicTag == null) @@ -625,7 +625,7 @@ public override void ExecuteSiteRecoveryCmdlet() } var deploymentType = Utilities.GetValueFromArmId( - providerSpecificDetails.TargetVmId, + providerSpecificDetails.TargetVMId, ARMResourceTypeConstants.Providers); if (deploymentType.ToLower() .Contains(Constants.ClassicCompute.ToLower())) @@ -648,12 +648,12 @@ public override void ExecuteSiteRecoveryCmdlet() TargetAvailabilityZone = availabilityZone, TargetProximityPlacementGroupId = proximityPlacementGroupId, SqlServerLicenseType = sqlServerLicenseType, - TargetVmTags = recoveryVmTag, + TargetVMTags = recoveryVmTag, TargetNicTags = recoveryNicTag, TargetManagedDiskTags = diskTag }; } - vMNicInputDetailsList = getNicListToUpdate(providerSpecificDetails.VmNics); + vMNicInputDetailsList = getNicListToUpdate(providerSpecificDetails.VMNics); } else if (provider is A2AReplicationDetails) { @@ -810,7 +810,7 @@ public override void ExecuteSiteRecoveryCmdlet() tfoNetworkId = providerSpecificDetails.SelectedTfoAzureNetworkId; } - vMNicInputDetailsList = getNicListToUpdate(providerSpecificDetails.VmNics); + vMNicInputDetailsList = getNicListToUpdate(providerSpecificDetails.VMNics); } else if (provider is InMageRcmReplicationDetails) { @@ -820,13 +820,13 @@ public override void ExecuteSiteRecoveryCmdlet() if (!this.MyInvocation.BoundParameters.ContainsKey( Utilities.GetMemberName(() => this.Name))) { - vmName = providerSpecificDetails.TargetVmName; + vmName = providerSpecificDetails.TargetVMName; } if (!this.MyInvocation.BoundParameters.ContainsKey( Utilities.GetMemberName(() => this.Size))) { - vmSize = providerSpecificDetails.TargetVmSize; + vmSize = providerSpecificDetails.TargetVMSize; } if (!this.MyInvocation.BoundParameters.ContainsKey( @@ -871,8 +871,8 @@ public override void ExecuteSiteRecoveryCmdlet() providerSpecificInput = new InMageRcmUpdateReplicationProtectedItemInput { - TargetVmName = vmName, - TargetVmSize = vmSize, + TargetVMName = vmName, + TargetVMSize = vmSize, TargetResourceGroupId = recoveryResourceGroupId, TargetAvailabilitySetId = availabilitySetId, TargetAvailabilityZone = availabilityZone, @@ -881,7 +881,7 @@ public override void ExecuteSiteRecoveryCmdlet() LicenseType = this.LicenseType, TargetNetworkId = vmRecoveryNetworkId, TestNetworkId = vmTestNetworkId, - VmNics = GetInMageRcmNicListToUpdate(providerSpecificDetails.VmNics) + VMNics = GetInMageRcmNicListToUpdate(providerSpecificDetails.VMNics) }; } @@ -893,7 +893,7 @@ public override void ExecuteSiteRecoveryCmdlet() SelectedRecoveryAzureNetworkId = vmRecoveryNetworkId, SelectedTfoAzureNetworkId = tfoNetworkId, SelectedSourceNicId = primaryNic, - VmNics = vMNicInputDetailsList, + VMNics = vMNicInputDetailsList, LicenseType = licenseType == Management.RecoveryServices.SiteRecovery.Models.LicenseType @@ -964,20 +964,20 @@ private List getNicListToUpdate(IList vmNicList nic.EnableAcceleratedNetworkingOnRecovery; vMNicInputDetails.RecoveryNetworkSecurityGroupId = nic.RecoveryNetworkSecurityGroupId; - vMNicInputDetails.IpConfigs = nic.IPConfigs?.Select(ip => + vMNicInputDetails.IPConfigs = nic.IPConfigs?.Select(ip => new IPConfigInputDetails() { - IpConfigName = ip.IPConfigName, + IPConfigName = ip.IPConfigName, IsPrimary = ip.IsPrimary, IsSeletedForFailover = ip.IsSeletedForFailover, RecoverySubnetName = ip.RecoverySubnetName, RecoveryStaticIPAddress = ip.RecoveryStaticIPAddress, RecoveryPublicIPAddressId = ip.RecoveryPublicIPAddressId, - RecoveryLBBackendAddressPoolIds = ip.RecoveryLBBackendAddressPoolIds, + RecoveryLbBackendAddressPoolIds = ip.RecoveryLBBackendAddressPoolIds, TfoSubnetName = ip.TfoSubnetName, TfoStaticIPAddress = ip.TfoStaticIPAddress, TfoPublicIPAddressId = ip.TfoPublicIPAddressId, - TfoLBBackendAddressPoolIds = ip.TfoLBBackendAddressPoolIds + TfoLbBackendAddressPoolIds = ip.TfoLBBackendAddressPoolIds }).ToList() ?? null; vMNicInputDetails.TfoNicName = nic.TfoNicName; vMNicInputDetails.TfoNicResourceGroupName = nic.TfoNicResourceGroupName; @@ -1005,18 +1005,18 @@ private List getNicListToUpdate(IList vmNicList { vMNicInputDetails.NicId = this.UpdateNic; - var dbIpConfig = nDetails.IpConfigs?[0]; + var dbIpConfig = nDetails.IPConfigs?[0]; var ipConfig = new IPConfigInputDetails() { - IpConfigName = dbIpConfig?.Name, + IPConfigName = dbIpConfig?.Name, IsPrimary = dbIpConfig?.IsPrimary ?? true, IsSeletedForFailover = true, RecoverySubnetName = this.RecoveryNicSubnetName, RecoveryStaticIPAddress = this.RecoveryNicStaticIPAddress, RecoveryPublicIPAddressId = this.RecoveryPublicIPAddressId, - RecoveryLBBackendAddressPoolIds = this.RecoveryLBBackendAddressPoolId?.ToList() + RecoveryLbBackendAddressPoolIds = this.RecoveryLBBackendAddressPoolId?.ToList() }; - vMNicInputDetails.IpConfigs = new List() { ipConfig }; + vMNicInputDetails.IPConfigs = new List() { ipConfig }; vMNicInputDetails.SelectionType = string.IsNullOrEmpty(this.NicSelectionType) ? Constants.SelectedByUser : this.NicSelectionType; @@ -1040,16 +1040,16 @@ private List getNicListToUpdate(IList vmNicList { vMNicInputDetails.NicId = nDetails.NicId; vMNicInputDetails.SelectionType = nDetails.SelectionType; - vMNicInputDetails.IpConfigs = nDetails.IpConfigs?.Select(ip => + vMNicInputDetails.IPConfigs = nDetails.IPConfigs?.Select(ip => new IPConfigInputDetails() { - IpConfigName = ip.Name, + IPConfigName = ip.Name, IsPrimary = ip.IsPrimary, IsSeletedForFailover = ip.IsSeletedForFailover, RecoverySubnetName = ip.RecoverySubnetName, RecoveryStaticIPAddress = ip.RecoveryStaticIPAddress, RecoveryPublicIPAddressId = ip.RecoveryPublicIPAddressId, - RecoveryLBBackendAddressPoolIds = ip.RecoveryLBBackendAddressPoolIds + RecoveryLbBackendAddressPoolIds = ip.RecoveryLbBackendAddressPoolIds })?.ToList(); vMNicInputDetails.EnableAcceleratedNetworkingOnRecovery = nDetails.EnableAcceleratedNetworkingOnRecovery; vMNicInputDetails.RecoveryNetworkSecurityGroupId = diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrPlannedFailoverJob.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrPlannedFailoverJob.cs index a50df6fe5234..f1702d9a8141 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrPlannedFailoverJob.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrPlannedFailoverJob.cs @@ -219,7 +219,7 @@ private void StartRPIPlannedFailover() DataSyncOption = this.Optimize == Constants.ForDownTime ? Constants.ForDownTime : Constants.ForSynchronization, - RecoveryVmCreationOption = string.Compare( + RecoveryVMCreationOption = string.Compare( this.CreateVmIfNotFound, Constants.Yes, StringComparison.OrdinalIgnoreCase) == @@ -359,7 +359,7 @@ private void StartRpPlannedFailover() this.Optimize == Constants.ForDownTime ? DataSyncStatus.ForDownTime : DataSyncStatus.ForSynchronization, - RecoveryVmCreationOption = string.Compare( + RecoveryVMCreationOption = string.Compare( this.CreateVmIfNotFound, Constants.Yes, StringComparison @@ -394,7 +394,7 @@ private void StartRpPlannedFailover() new RecoveryPlanInMageRcmFailbackFailoverInput { RecoveryPointType = recoveryPointType, - UseMultiVmSyncPoint = + UseMultiVMSyncPoint = this.MultiVmSyncPoint == Constants.Enable ? Constants.True : Constants.False diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrTestFailoverJob.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrTestFailoverJob.cs index 51c65ff191fd..16a35ec9b05b 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrTestFailoverJob.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrTestFailoverJob.cs @@ -538,7 +538,7 @@ private void StartRpTestFailover() new RecoveryPlanInMageRcmFailoverInput { RecoveryPointType = recoveryPointType, - UseMultiVmSyncPoint = + UseMultiVMSyncPoint = this.MultiVmSyncPoint == Constants.Enable ? Constants.True : Constants.False diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrUnPlannedFailover.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrUnPlannedFailover.cs index 12fb8bea5b3b..6bf44bc6453d 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrUnPlannedFailover.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/StartAzureRmRecoveryServicesAsrUnPlannedFailover.cs @@ -551,7 +551,7 @@ private void StartRpUnplannedFailover() new RecoveryPlanInMageRcmFailoverInput { RecoveryPointType = recoveryPointType, - UseMultiVmSyncPoint = + UseMultiVMSyncPoint = this.MultiVmSyncPoint == Constants.Enable ? Constants.True : Constants.False diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/UpdateAzureRmRecoveryServicesAsrProtectionDirection.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/UpdateAzureRmRecoveryServicesAsrProtectionDirection.cs index 7556e15ddb71..60195be237ec 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/UpdateAzureRmRecoveryServicesAsrProtectionDirection.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/ReplicationProtectedItem/UpdateAzureRmRecoveryServicesAsrProtectionDirection.cs @@ -497,9 +497,9 @@ private void SetRPIReprotect() { var reprotectInput = new HyperVReplicaAzureReprotectInput { - HvHostVmId = asrProtectableItem.FabricObjectId, - VmName = asrProtectableItem.FriendlyName, - OsType = string.Compare( + HvHostVMId = asrProtectableItem.FabricObjectId, + VMName = asrProtectableItem.FriendlyName, + OSType = string.Compare( asrProtectableItem.OS, "Windows") == 0 || @@ -509,7 +509,7 @@ private void SetRPIReprotect() 0 ? asrProtectableItem.OS : "Windows", - VHDId = asrProtectableItem.OSDiskId + VHdId = asrProtectableItem.OSDiskId }; var providerSpecificDetails = @@ -775,8 +775,8 @@ private void A2ARPIReprotect() PolicyId = this.ProtectionContainerMapping.PolicyId, RecoveryContainerId = this.ProtectionContainerMapping.TargetProtectionContainerId, - VmDisks = new List(), - VmManagedDisks = new List(), + VMDisks = new List(), + VMManagedDisks = new List(), RecoveryResourceGroupId = this.RecoveryResourceGroupId, RecoveryCloudServiceId = this.RecoveryCloudServiceId, RecoveryAvailabilitySetId = this.RecoveryAvailabilitySetId, @@ -858,7 +858,7 @@ private void populateManagedDiskInputDetails( // Passing all managedDisk data if no details is passed. var osDisk = virtualMachine.StorageProfile.OsDisk; - a2aSwitchInput.VmManagedDisks.Add(new A2AVmManagedDiskInputDetails + a2aSwitchInput.VMManagedDisks.Add(new A2AVmManagedDiskInputDetails { DiskId = osDisk.ManagedDisk.Id, RecoveryResourceGroupId = this.RecoveryResourceGroupId, @@ -870,7 +870,7 @@ private void populateManagedDiskInputDetails( { foreach (var dataDisk in virtualMachine.StorageProfile.DataDisks) { - a2aSwitchInput.VmManagedDisks.Add(new A2AVmManagedDiskInputDetails + a2aSwitchInput.VMManagedDisks.Add(new A2AVmManagedDiskInputDetails { DiskId = dataDisk.ManagedDisk.Id, RecoveryResourceGroupId = this.RecoveryResourceGroupId, @@ -885,7 +885,7 @@ private void populateManagedDiskInputDetails( { foreach (ASRAzuretoAzureDiskReplicationConfig disk in this.AzureToAzureDiskReplicationConfiguration) { - a2aSwitchInput.VmManagedDisks.Add(new A2AVmManagedDiskInputDetails + a2aSwitchInput.VMManagedDisks.Add(new A2AVmManagedDiskInputDetails { DiskId = disk.DiskId, RecoveryResourceGroupId = disk.RecoveryResourceGroupId, @@ -921,7 +921,7 @@ private void populateUnManagedDiskInputDetails(string fabricFriendlyName, .Properties.ProviderSpecificDetails) .ProtectedDisks) { - a2aSwitchInput.VmDisks.Add(new A2AVmDiskInputDetails + a2aSwitchInput.VMDisks.Add(new A2AVmDiskInputDetails { DiskUri = disk.RecoveryDiskUri, RecoveryAzureStorageAccountId = @@ -948,7 +948,7 @@ private void populateUnManagedDiskInputDetails(string fabricFriendlyName, disk.VhdUri)); } - a2aSwitchInput.VmDisks.Add(new A2AVmDiskInputDetails + a2aSwitchInput.VMDisks.Add(new A2AVmDiskInputDetails { DiskUri = disk.VhdUri, RecoveryAzureStorageAccountId = disk.RecoveryAzureStorageAccountId, diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/VCenter/NewAzureRmRecoveryServicesAsrVCenter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/VCenter/NewAzureRmRecoveryServicesAsrVCenter.cs index 0b921d45e3d7..5409b3383ebb 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/VCenter/NewAzureRmRecoveryServicesAsrVCenter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/VCenter/NewAzureRmRecoveryServicesAsrVCenter.cs @@ -94,11 +94,11 @@ private void DiscovervCenter() var addvCenterRequestProperties = new AddVCenterRequestProperties(); addvCenterRequestProperties.FriendlyName = this.Name; - addvCenterRequestProperties.IpAddress = this.IpOrHostName; + addvCenterRequestProperties.IPAddress = this.IpOrHostName; addvCenterRequestProperties.Port = this.Port.ToString(); string processServerId = vmwareFabricDetails.ProcessServers.First( vmd => ( - vmd.IpAddress.Equals(vmwareFabricDetails.IpAddress) + vmd.IPAddress.Equals(vmwareFabricDetails.IPAddress) || string.Compare( vmwareFabricDetails.HostName, vmd.FriendlyName, diff --git a/src/RecoveryServices/RecoveryServices.SiteRecovery/VCenter/UpdateAzureRmRecoveryServicesAsrVCenter.cs b/src/RecoveryServices/RecoveryServices.SiteRecovery/VCenter/UpdateAzureRmRecoveryServicesAsrVCenter.cs index 95efa1acf63e..7db03d6cf0aa 100644 --- a/src/RecoveryServices/RecoveryServices.SiteRecovery/VCenter/UpdateAzureRmRecoveryServicesAsrVCenter.cs +++ b/src/RecoveryServices/RecoveryServices.SiteRecovery/VCenter/UpdateAzureRmRecoveryServicesAsrVCenter.cs @@ -106,7 +106,7 @@ private void UpdatevCenter() new UpdateVCenterRequestProperties() { FriendlyName = vcenterResponse.Properties.FriendlyName, - IpAddress = vcenterResponse.Properties.IpAddress, + IPAddress = vcenterResponse.Properties.IPAddress, ProcessServerId = vcenterResponse.Properties.ProcessServerId, Port = vcenterResponse.Properties.Port, RunAsAccountId = vcenterResponse.Properties.RunAsAccountId diff --git a/src/RecoveryServices/RecoveryServices/ChangeLog.md b/src/RecoveryServices/RecoveryServices/ChangeLog.md index a70ff9c99db2..9d933333b3a4 100644 --- a/src/RecoveryServices/RecoveryServices/ChangeLog.md +++ b/src/RecoveryServices/RecoveryServices/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Fixed minor issues ## Version 6.6.0 * Added support for custom RG with suffix while creating or modifying policy for workload type AzureVM. diff --git a/src/RecoveryServices/RecoveryServices/Common/PSRecoveryServicesVaultClient.cs b/src/RecoveryServices/RecoveryServices/Common/PSRecoveryServicesVaultClient.cs index 7bf70cbfca71..c8108812eedc 100644 --- a/src/RecoveryServices/RecoveryServices/Common/PSRecoveryServicesVaultClient.cs +++ b/src/RecoveryServices/RecoveryServices/Common/PSRecoveryServicesVaultClient.cs @@ -115,7 +115,7 @@ public Rest.Azure.AzureOperationResponse DeleteVault(string resouceGroupName, st public void UpdateVaultStorageType(string resouceGroupName, string vaultName, BackupResourceConfigResource backupStorageConfig) { - GetRecoveryServicesBackupClient.BackupResourceStorageConfigsNonCRR.UpdateWithHttpMessagesAsync( + GetRecoveryServicesBackupClient.BackupResourceStorageConfigsNonCrr.UpdateWithHttpMessagesAsync( vaultName, resouceGroupName, backupStorageConfig, GetRequestHeaders()); } @@ -129,7 +129,7 @@ public void UpdateVaultStorageType(string resouceGroupName, string vaultName, public void PatchVaultStorageConfigProperties(string resouceGroupName, string vaultName, BackupResourceConfigResource backupStorageConfig) { - GetRecoveryServicesBackupClient.BackupResourceStorageConfigsNonCRR.PatchWithHttpMessagesAsync( + GetRecoveryServicesBackupClient.BackupResourceStorageConfigsNonCrr.PatchWithHttpMessagesAsync( vaultName, resouceGroupName, backupStorageConfig, GetRequestHeaders()); } @@ -141,7 +141,7 @@ public void PatchVaultStorageConfigProperties(string resouceGroupName, string va /// Azure Resource Storage response object. public BackupResourceConfigResource GetVaultStorageConfig(string resouceGroupName, string vaultName) { - return GetRecoveryServicesBackupClient.BackupResourceStorageConfigsNonCRR.GetWithHttpMessagesAsync( + return GetRecoveryServicesBackupClient.BackupResourceStorageConfigsNonCrr.GetWithHttpMessagesAsync( vaultName, resouceGroupName, GetRequestHeaders()).Result.Body; } } diff --git a/src/RecoveryServices/RecoveryServices/Models/PSContracts.cs b/src/RecoveryServices/RecoveryServices/Models/PSContracts.cs index 8a484f2ae0ec..afc391080703 100644 --- a/src/RecoveryServices/RecoveryServices/Models/PSContracts.cs +++ b/src/RecoveryServices/RecoveryServices/Models/PSContracts.cs @@ -492,7 +492,7 @@ public AcsNamespace(ResourceCertificateAndAcsDetails acsDetails) { this.HostName = acsDetails.GlobalAcsHostName; this.Namespace = acsDetails.GlobalAcsNamespace; - this.ResourceProviderRealm = acsDetails.GlobalAcsRPRealm; + this.ResourceProviderRealm = acsDetails.GlobalAcsRpRealm; } /// diff --git a/tools/StaticAnalysis/Exceptions/Az.RecoveryServices/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.RecoveryServices/BreakingChangeIssues.csv new file mode 100644 index 000000000000..1c62f2d4aa54 --- /dev/null +++ b/tools/StaticAnalysis/Exceptions/Az.RecoveryServices/BreakingChangeIssues.csv @@ -0,0 +1,4 @@ +"Module","ClassName","Target","Severity","ProblemId","Description","Remediation" +"Az.RecoveryServices","Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.AddAzureRmRecoveryServicesAsrReplicationProtectedItemDisk","Add-AzRecoveryServicesAsrReplicationProtectedItemDisk","0","3010","The property 'RecoveryLBBackendAddressPoolIds' of type 'Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models.IPConfigDetails' has been removed.","Add the property 'RecoveryLBBackendAddressPoolIds' back to type 'Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models.IPConfigDetails'." +"Az.RecoveryServices","Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.AddAzureRmRecoveryServicesAsrReplicationProtectedItemDisk","Add-AzRecoveryServicesAsrReplicationProtectedItemDisk","0","3010","The property 'TfoLBBackendAddressPoolIds' of type 'Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models.IPConfigDetails' has been removed.","Add the property 'TfoLBBackendAddressPoolIds' back to type 'Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models.IPConfigDetails'." +"Az.RecoveryServices","Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.AddAzureRmRecoveryServicesAsrReplicationProtectedItemDisk","Add-AzRecoveryServicesAsrReplicationProtectedItemDisk","0","3010","The property 'IpAddressType' of type 'Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models.IPConfigDetails' has been removed.","Add the property 'IpAddressType' back to type 'Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models.IPConfigDetails'." \ No newline at end of file diff --git a/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 b/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 index 55d717bf2fbc..5e3d309e384f 100644 --- a/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 +++ b/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 @@ -36,6 +36,7 @@ $skipModules = @( 'Az.CosmosDB', 'Az.KeyVault', 'Az.NetAppFiles', + 'Az.RecoveryServices', 'Az.RedisCache', 'Az.Storage', 'Az.Search', @@ -156,4 +157,4 @@ finally { if ($ExceptionList.Length -ne 0) { $ExceptionList | Sort-Object -Unique -Property Module,Sdk,Description | Export-Csv $ExceptionFilePath -NoTypeInformation } -} \ No newline at end of file +}